Open zywang12 opened 3 weeks ago
Please can you read this documentation on Qiskit's conventions, and see if you still believe the problem exists: https://docs.quantum.ibm.com/api/qiskit/circuit#circuit-conventions.
I had a look, and I suspect the problem might be somewhere in Aer misinterpreting unitary
instructions that aren't on qubits in the correct order. Using translation_method="synthesis"
with Aer as the backend will cause everything to just get collapsed to unitary matrices. Omitting the measure_all
and instead using qiskit.quantum_info.Statevector
to simulate the circuit shows that it's finding a statevector of [0, 0, 0, 1.0]
, which is consistent with measuring 11
. So it might be Aer making a mistake when applying a unitary gate to [1, 0]
(but I'm not sure).
Thank you for your prompt reply! Should I open the same issue in qiskit-aer and close this one?
Environment
What is happening?
When running the following circuit,
dcx
is represented as a unitary matrix:which applies to qubit 1 and qubit 0.
However, all backends are producing incorrect measurement results. It appears that the unitary is being applied to qubits 0 and 1 instead. Is there a potential error in the qubit mapping or in how the applied qubits are accessed?
How can we reproduce the issue?
What should happen?
The correct measurement result should be
{'11': 1024}
. For the noisy backends, '11' should have the highest frequency.Any suggestions?
No response