-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Repeated execution #34
Comments
Not being explicit may lead to user misunderstanding of what’s happening
because results from repeated execution are only the same as density matrix
simulation in the limit of infinite shots
…On Tue, 18 Jun 2024 at 10:52, Alessandro Candido ***@***.***> wrote:
We should reconsider how *repeated execution* is being triggered, and
when it is possible to enable it automatically.
The extreme option is to have a single execute_circuit function with no
flag at all, just decide whether to execute
- state vector simulation
- density matrix simulation
- shots execution
just based on the content of the Circuit and the initial_state.
Cf.:
- #26 (comment)
<#26 (comment)>
- #26 (comment)
<#26 (comment)>
—
Reply to this email directly, view it on GitHub
<#34>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABH5QVR77YEGUAVSJ6E3W7TZH7KKTAVCNFSM6AAAAABJPL74M2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGM2TSMBXG43TQNI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
What I mean is not avoiding being explicit, but just avoiding duplicated features (even now, If there is an error, it means that there is an invalid combination of inputs. It'd be better if most of the inputs' combinations are valid, preserving at the same time the meaning of the parameters (avoiding the usage of weird combinations, leading to poor understanding by users), and if there were only one way of doing things (cf. PEP 20), and not many different combinations of invocations leading to the same result. The proposal in the comments was along the line:
This should reproduce the behavior of the current Qibo (more or less, since it extracts more information from the |
Maybe we have a nomenclature conflict here. Repeated execution, as I always understood and as is stated in the Qibo doc here, is about simulating noise models on statevectors probabilistically instead of exact noisy simulation on density matrices. In the limit of infinite samples, the former converges to the latter. Note that, in principle, "repeated execution" as defined above is independent of the presence of measurement gates in the circuit. In any case, I wouldn't advise on defaulting to "repeated execution" if the combination of noise channels and statevector simulation is true. That may lead to misunderstanding because the results wouldn't be exact but could be naively interpreted as such. On the other hand, the current requirements are noise channels + statevector simulation + measurements. But those are not necessary conditions, since measurements are not necessary as I stated above. Maybe an extra boolean flag is needed, or the triggering of repeated execution also triggers a warning saying that the simulation won't be exact. |
Even better: instead of raising a warning, we could return an object explicitly telling that is coming from repeated execution (as a result object with a flag set to "not exact"). |
We should reconsider how repeated execution is being triggered, and when it is possible to enable it automatically.
The extreme option is to have a single
execute_circuit
function with no flag at all, just decide whether to executejust based on the content of the
Circuit
and theinitial_state
.Cf.:
NumpyBackend
#26 (comment)NumpyBackend
#26 (comment)The text was updated successfully, but these errors were encountered: