r1Gate
Installation Required: This functionality requires MATLAB Support Package for Quantum Computing.
Description
applies an R1 gate (z-axis rotation gate with global phase) to a single
target qubit and returns a g
= r1Gate(targetQubit
,theta
)quantum.gate.SimpleGate
object. This gate changes the phase of the state by an angle of theta
.
If
targetQubit
andtheta
are vectors of qubit indices and angles with the same length,r1Gate
returns a column vector of gates, whereg(i)
represents a z-axis rotation gate with global phase applied to a qubit with indextargetQubit(i)
with a rotation angle oftheta(i)
.If either
targetQubit
ortheta
is a scalar, and the other input is a vector, then MATLAB® expands the scalar to match the size of the vector input.
Examples
Input Arguments
More About
Version History
Introduced in R2023a
See Also
quantumCircuit
| quantum.gate.SimpleGate
| rxGate
| ryGate
| rzGate
| cr1Gate
| getMatrix