I am writing some python code to be able to optimise the total error in two qubit gate decomposition.
I am using the Qiskit module qiskit.quantum_info.synthesis.two_qubit_decompose
My question relates to the difference between the two classes given in this code. One is
TwoQubitWeylDecomposition and seems to decompose using the
KAK1 method detailed on page two here.
TwoQubitBasisDecomposer() allows you to input which specific two-qubit gate you want to use in the decomposition of an arbitrary
CNOT, Molmer-Sorensen etc).
One of the methods of this class allows you to find the fidelity of a target unitary, using $0$, $1$, $2$ or $3$ implementations of the basis gate of your choice (higher fidelity with more basis gate usage). However, you have to turn the target unitary into the
TwoQubitWeylDecomposition class, otherwise, you get errors (target doesn't have the attribute
I'm uncertain why the target unitary needs to be a
TwoQubitWeylDecomposition class. The documentation isn't very helpful either.
Thanks for any help.