Open kevinsung opened 7 months ago
The default synthesis plugin used by UnitarySynthesis
relies on the Quantum Shannon Decomposition module in qiskit.synthesis
(https://github.com/Qiskit/qiskit/blob/main/qiskit/synthesis/unitary/qsd.py) for unitaries of > 2 qubits. It currently doesn't look at any basis gates or target constraints.
At the pass level I'm not sure we can always guarantee the output synthesis is going to respect the basis_gates
or target
arguments as different synthesis plugins can explicitly ignore the arguments. But I think we should look at fixing this for the default plugin though because it does advertise it does respect the basis gates and target, and this issue would potentially break the synthesis
translation stage plugin too.
Environment
What is happening?
I create a circuit with a 3-qubit UnitaryGate. I use UnitarySynthesis and pass a CZ gate basis. It gets synthesized down to CX instead of CZ.
How can we reproduce the issue?
What should happen?
Should be synthesized down to CZ as requested.
Any suggestions?
No response