-
-
Notifications
You must be signed in to change notification settings - Fork 166
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
reset operator needed #2042
Comments
Hello @Marsmmz, thank you for your interest in Mitiq! |
Hi @Marsmmz, thank you for opening this issue. Mitiq uses a circuit converter to convert a Qiskit circuit to a Cirq circuit before implementing an error mitigation technique. When the first few error mitigation techniques were added, there was no Cirq equivalent to the It seems Cirq now has a reset gate (added 9 months ago). I think if all circuit representations allowed by mitiq have a Pinging others to correct me @andreamari @Misty-W @natestemen |
Thanks @purva-thakre! In terms of conversions it should work, but we'd need to think carefully about how to handle reset gates in ZNE before introducing them into Mitiq. |
Based on Andrea's comments from Oct 6 Community Call: To close this issue,
|
about the first step: "Figure out if QASM Converter in Cirq has the ability to handle the conversion with a reset gate in the circuit." On the other hand, cirq has a Reset gate: import cirq
from cirq.ops import reset
circuit = cirq.Circuit(reset(cirq.LineQubit(0)))
print(circuit)
I'll investigate more on what we can do and I'll write any new update here. |
About the sub-issue "Figure out if all allowed circuit representations in Mitiq have a reset gate:"
I don't think it's a huge problems however. If you are using braket as a front end and you don't have reset gates you can still use mitiq as usual. So, all we need to do is supporting the reset gate only for the frontends in which it exist. |
About the sub-issue " If yes to both above, reset gate will be an exception to gate-level manipulations by mitiq techniques like unitary folding." Based on the current code, the user will get an error when trying to apply ZNE to a non-unitary circuit. This is due to the check_foldable function mitiq/mitiq/zne/scaling/folding.py Line 58 in ec3feb6
This is good since it avoids any unexpected behavior due to the potentially unintentional/unknown presence of reset gates somewhere in the circuit! I think supporting a reset gate for ZNE is a further issue that could be considered as a second step. This is highly non-trivial. As a first step we could focus on just supporting the reset gate for conversions: frontend->cirq->frontend. ZNE is a special case since it requires circuit inversions. So I would suggest to consider the potential support of ZNE + Reset as a different issue. |
With #2128, PEC should become fully compatible with Cirq circuits containing reset gates. |
Issue Description
It would be really helpful if a "reset" operation could be supported by Mitiq which is corresponded to reset in Qiskit.
Additional References
The text was updated successfully, but these errors were encountered: