cirq.SingleQubitMatrixGate¶
-
class
cirq.SingleQubitMatrixGate(matrix: numpy.ndarray)[source]¶ A 1-qubit gate defined by its matrix.
More general than specialized classes likeZPowGate, but more expensiveand more float-error sensitive to work with (due to usingeigendecompositions).-
__init__(matrix: numpy.ndarray) → None[source]¶ Initializes the 2-qubit matrix gate.
Parameters: matrix – The matrix that defines the gate.
Methods
approx_eq(other[, ignore_global_phase])on(*qubits)Returns an application of this gate to the given qubits. validate_args(qubits)Checks if this gate can be applied to the given qubits. -