rzGate
Installation Required: This functionality requires MATLAB Support Package for Quantum Computing.
Description
applies a z-axis rotation gate to a single target qubit and returns a
g
= rzGate(targetQubit
,theta
)quantum.gate.SimpleGate
object. This gate rotates the qubit state around the
z-axis by an angle of theta
.
If
targetQubit
andtheta
are vectors of the same length,rzGate
returns a column vector of gates, whereg(i)
represents a z-axis rotation gate 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
| r1Gate
| crzGate
| getMatrix