-
Notifications
You must be signed in to change notification settings - Fork 21
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
Different behaviour with and without barriers #439
Comments
I can confirm that this is a bug in how we eliminate measurements at the end of the circuit before we perform the equivalence check. This should be a pretty easy fix here: https://github.com/cda-tum/mqt-core/blob/5be1c3ec4efb773d0330298621704e876afa7c16/src/circuit_optimizer/CircuitOptimizer.cpp#L468-L570 On vacation right now, but can look at that once I am back. |
## Description The previous implementation of the `isDynamicCircuit` check would falsely report a circuit to not be dynamic if the circuit contains multiple measurements on one qubit. This PR fixes the underlying error and refactors the logic of the respective method to handle more cases. This was discovered while working on cda-tum/mqt-qcec#439 ## Checklist: <!--- This checklist serves as a reminder of a couple of things that ensure your pull request will be merged swiftly. --> - [x] The pull request only contains commits that are related to it. - [x] I have added appropriate tests and documentation. - [x] I have made sure that all CI jobs on GitHub pass. - [x] The pull request introduces no new warnings and follows the project's style guidelines. --------- Signed-off-by: burgholzer <[email protected]>
Environment information
OS: MacOS
MQT version: 2.6.0
Compiler: C++
Description
This is related to the earlier issue 424
I'm trying to run a circuit equivalence check for two particular circuits (Steane code).
The segmentation fault was fixed by removing measurements of two qubits onto the same clbit.
But now, when I run the code with Barriers, it runs properly (the result being non_equivalent)
However, when I run it after removing all the barriers I get the following error:
Circuit 1:
Circuit 2:
Circuit 2 without barriers:
Output:
ValueError: DD for non-unitary operation not available!
Circuit 2 with barriers:
Output:
not_equivalent
Expected behavior
Not equivalent even when running the code with circuits that do not have barriers
How to Reproduce
Import qiskit, mqt.qcec and the run the code blocks mentioned above.
The text was updated successfully, but these errors were encountered: