Closed gideonuchehara closed 9 months ago
Many thanks for opening this issue. That seems like a big to me. I would guess it has to do something with the way the qubits are ordered after the transformation. I remember it wasn't really straight forward to decide how this should be done best. I'll come back to you once I know more 👍🏻
that's exactly what we suspected as well!
The primary underlying cause was really the initial layout of the transformed dynamic circuit. It turns out that it's not so easy to correctly guess the intended initial layout of the qubits at the beginning of the circuit.
I added both instances from above as regression tests and added some further dynamic circuit tests on the C++ side using MQT Core's algorithm implementations of BV, QFT, QPE (and their dynamic variant).
All of these can be successfully verified now (given the new backpropagate_output_permutation
option).
I will probably add a couple more convenience features to QCEC over the next couple days and release a new version afterwards. Please let me know if you should encounter any further issues and feel free to re-open this one in case some new failures pop up.
Environment information
mqt-qcec version: 2.2.3 qiskit version: 0.25.1 C++ compiler: g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 OS: DISTRIB_DESCRIPTION="Ubuntu 22.04.3 LTS"
Description
The following circuits, one static and the other dynamic, are supposed to be equivalent. But your equivalent check returned
not_equivalent
which is wrong. Why is this so? I guess the problem could be from the relabelling of the circuits when your equivalent checker converts from dynamic to static circuits before checking for equivalence. Could you please fix this? Copying @glassnotes.Below are two bv circuits as written in qiskit qasm that are supposed to be equivalent but failed the test. Note that I couldn't attach them as qasm file hence, I pasted them here.
First static circuit:
The second dynamic circuit equivalent:
Expected behavior
No response
How to Reproduce
config = qcec.Configuration() config.optimizations.transform_dynamic_circuit = True result = qcec.verify(quantinuum_circ, quantinuum_dynamic_circ, configuration=config)
I have included other qasm files to reproduce the error for dynamic circuits equivalence checking. Here is the result I got: