cirq.SingleQubitMatrixGate

class cirq.SingleQubitMatrixGate(matrix: numpy.ndarray)[source]

A 1-qubit or qudit gate defined by its matrix.

More general than specialized classes like ZPowGate, but more expensive
and more float-error sensitive to work with (due to using
eigendecompositions).
__init__(matrix: numpy.ndarray) → None[source]

THIS FUNCTION IS DEPRECATED.

IT WILL BE REMOVED IN cirq v0.8.

Use cirq.MatrixGate instead.

Initializes the single qubit matrix gate.

Args:
    matrix: The matrix that defines the gate.