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
leads to a wrong outcome (for example {'0 0': 1015, '1 0': 1016})
What is the expected behavior?
Results should be like {'0 0': 1015, '1 1': 1016}.
The correct answer is obtained if one use if_test + reset (see code in comments above)
The correct answer is obtained using c_if or if_test + reset on real systems
The text was updated successfully, but these errors were encountered:
Originally (until 0.11.*), Aer did not support c_if for reset operation in qobj (error: Failed to load qobj: Invalid instruction: "reset" cannot be conditional.). Now we do not use qobj and AerCompiler generates AER::circuit directly and ignore c_if for reset while converting reset of Qiskit to of AER::circuit. We should raise exception when c_if comes for reset in AerCompiler or add support c_if for reset.
@jakelishman Is there specification about coverage of c_if in terra? I think that simulator can support c_if for reset (but hardware may not). If so, I would like to add support of c_if otherwise raise an exception as previous Aer did.
There's no reason in Terra that reset can't have a condition, so it's up to hardware vendors to support it or not. Aer should feel free to support it. For what it's worth, IBM dynamic-circuits hardware tends to implement "mid-circuit reset" as a measurement followed by a conditional (c_if-like) X.
Informations
What is the current behavior?
Wrong outcome using
c_if
instead ofif_test
+reset
on simulators. Correct outcome on real systemsSteps to reproduce the problem
Executing this circuit :
leads to a wrong outcome (for example {'0 0': 1015, '1 0': 1016})
What is the expected behavior?
Results should be like {'0 0': 1015, '1 1': 1016}.
The correct answer is obtained if one use if_test + reset (see code in comments above)
The correct answer is obtained using c_if or if_test + reset on real systems
The text was updated successfully, but these errors were encountered: