View source on GitHub |
Decomposes a two-qubit unitary matrix into cirq_google.SYC
+ single qubit rotations.
cirq_google.transformers.two_qubit_matrix_to_sycamore_operations(
q0: cirq.Qid,
q1: cirq.Qid,
mat: np.ndarray,
*,
atol: float = 1e-08,
clean_operations: bool = True
) -> cirq.OP_TREE
The analytical decomposition first Synthesizes the given operation using cirq.CZPowGate
+
single qubit rotations and then decomposes each cirq.CZPowGate
into cirq_google.SYC
+
single qubit rotations using cirq_google.known_2q_op_to_sycamore_operations
.
Note that the resulting decomposition may not be optimal, and users should first try to
decompose a given operation using cirq_google.known_2q_op_to_sycamore_operations
.
Args | |
---|---|
q0
|
The first qubit being operated on. |
q1
|
The other qubit being operated on. |
mat
|
Defines the operation to apply to the pair of qubits. |
atol
|
A limit on the amount of absolute error introduced by the construction. |
clean_operations
|
Merges runs of single qubit gates to a single cirq.PhasedXZGate in
the resulting operations list.
|
Returns | |
---|---|
A cirq.OP_TREE that implements the given unitary operation using only cirq_google.SYC +
single qubit rotations.
|