jet.gate.Rot¶
-
class
Rot
(phi: float, theta: float, omega: float)[source]¶ Bases:
jet.gate.QubitGate
Rot represents an arbitrary single-qubit rotation gate with three Euler angles. Each Pauli rotation gate can be recovered by fixing two of the three parameters:
>>> assert RX(theta).tensor() == Rot(pi/2, -pi/2, theta).tensor() >>> assert RY(theta).tensor() == Rot(0, 0, theta).tensor() >>> assert RZ(theta).tensor() == Rot(theta, 0, 0).tensor()
See qml.Rot for more details.
- Parameters
phi (float) – First rotation angle.
theta (float) – Second rotation angle.
omega (float) – Third rotation angle.
Attributes
Returns the dimension of this gate.
Returns the indices of this gate.
Returns the number of wires this gate acts on.
Returns the parameters of this gate.
-
dimension
¶ Returns the dimension of this gate.
-
indices
¶ Returns the indices of this gate. An index is a label associated with an axis of the tensor representation of a gate; the indices of a tensor determine its connectivity in the context of a tensor network.
-
num_wires
¶ Returns the number of wires this gate acts on.
-
params
¶ Returns the parameters of this gate.
Methods
tensor
([dtype])Returns the tensor representation of this gate.
-
tensor
(dtype: numpy.dtype = <class 'numpy.complex128'>) → Union[jet.bindings.TensorC64, jet.bindings.TensorC128]¶ Returns the tensor representation of this gate.
- Parameters
dtype (np.dtype) – Data type of the tensor.
Downloads