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
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:
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.
The barriers after the measurements in the circuit prevent the optimiser to remove the measurements and the equivalence checker, then, can't handle them.
## 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 <burgholzer@me.com>
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: