cirq.two_qubit_matrix_to_operations(q0: cirq.ops.raw_types.QubitId, q1: cirq.ops.raw_types.QubitId, mat: numpy.ndarray, allow_partial_czs: bool, tolerance: float = 1e-08) → List[cirq.ops.raw_types.Operation][source]

Decomposes a two-qubit operation into Z/XY/CZ gates.

  • 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.
  • allow_partial_czs – Enables the use of Partial-CZ gates.
  • tolerance – A limit on the amount of error introduced by the construction.

A list of operations implementing the matrix.