Returns operations for a 3 qubit unitary.
cirq.three_qubit_matrix_to_operations(
q0: cirq.Qid
,
q1: cirq.Qid
,
q2: cirq.Qid
,
u: np.ndarray,
atol: float = 1e-08
) -> Sequence[cirq.Operation
]
The algorithm is described in Shende et al.:
Synthesis of Quantum Logic Circuits. Tech. rep. 2006,
https://arxiv.org/abs/quant-ph/0406176
Args |
q0
|
first qubit
|
q1
|
second qubit
|
q2
|
third qubit
|
u
|
unitary matrix
|
atol
|
A limit on the amount of absolute error introduced by the
construction.
|
Returns |
The resulting operations will have only known two-qubit and one-qubit
gates based operations, namely CZ, CNOT and rx, ry, PhasedXPow gates.
|
Raises |
ValueError
|
If the u matrix is non-unitary or not of shape (8,8).
|
ImportError
|
If the decomposition cannot be done because the SciPy version is less than
1.5.0 and so does not contain the required cossin method.
|