# qiskit.circuit.Gate.to_matrix¶

Gate.to_matrix()[소스]

Return a Numpy.array for the gate unitary matrix.

반환값

if the Gate subclass has a matrix definition.

반환 형식

np.ndarray

예외

CircuitError – If a Gate subclass does not implement this method an exception will be raised when this base class method is called.