You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current simulator interface and behavior mimics interface to hardware, where we run multiple repetitions of a circuit and get back measurement samples for each repetition. The simulator also returns a list of "final states", one for each repetition, which are the final wavefunctions. However, the final states are not particularly useful if you have measurement gates, since you get the post-collapse state. And doing anything more than one repetition when you want the wavefunction is a bad idea because the wavefunction will always be the same (if there are no intermediate measurements). I think it would be good to clean up this interface. One idea would be to have a completely separate method to run a simulation and get out wavefunctions, which would not take a repetition count. Another possibility would be to just add additional arguments on the existing run methods to control whether to return the final wavefunctions. I would vote for a separate method to do wavefunction simulation, but I'm curious what other people think.
The text was updated successfully, but these errors were encountered:
I agree that we should have separate methods for different kinds of results. Methods whose return type depend on their arguments in complicated ways are no fun.
The current simulator interface and behavior mimics interface to hardware, where we run multiple repetitions of a circuit and get back measurement samples for each repetition. The simulator also returns a list of "final states", one for each repetition, which are the final wavefunctions. However, the final states are not particularly useful if you have measurement gates, since you get the post-collapse state. And doing anything more than one repetition when you want the wavefunction is a bad idea because the wavefunction will always be the same (if there are no intermediate measurements). I think it would be good to clean up this interface. One idea would be to have a completely separate method to run a simulation and get out wavefunctions, which would not take a repetition count. Another possibility would be to just add additional arguments on the existing run methods to control whether to return the final wavefunctions. I would vote for a separate method to do wavefunction simulation, but I'm curious what other people think.
The text was updated successfully, but these errors were encountered: