QuantumFlow Gate Decompositions
Converts a 1-qubit gate into a Rn gate, a 1-qubit rotation of angle theta about axis (nx, ny, nz) in the Bloch sphere.
A Circuit containing a single Rn gate
Decompose a 2-qubit unitary composed of two 1-qubit local gates.
Uses the “Nearest Kronecker Product” algorithm. Will give erratic results if the gate is not the direct product of two 1-qubit gates.
Decompose a 2-qubit gate by removing local 1-qubit gates to leave the non-local canonical two-qubit gate. [1] [2] [3] [4]
Returns: A Circuit of 3 operations: a circuit of initial 1-qubit gates; a canonical gate, with coordinates in the Weyl chamber; and a final circuit contains the final 1-qubits gates.
The canonical coordinates can be found in circ.elements[2].params
More or less follows the algorithm outlined in [2].
Returns the canonical coordinates of a 2-qubit gate
Decompose any 2-qubit gate into a circuit of (at most) three CNot gates.
Optimal Quantum Circuits for General Two-Qubit Gates, Vatan & Williams (2004) (quant-ph/0308006) Fig. 6
Decompose any 2-qubit gate into a sandwich of two B gates.
Minimum construction of two-qubit quantum operations https://arxiv.org/abs/quant-ph/0312193