RZGate

class RZGate(phi, label=None)[source]

Single-qubit rotation about the Z axis.

This is a diagonal gate. It can be implemented virtually in hardware via framechanges (i.e. at zero error and duration).

Circuit symbol:

     ┌───────┐
q_0: ┤ Rz(λ) ├
     └───────┘

Matrix Representation:

\[\begin{split}RZ(\lambda) = exp(-i\frac{\lambda}{2}Z) = \begin{pmatrix} e^{-i\frac{\lambda}{2}} & 0 \\ 0 & e^{i\frac{\lambda}{2}} \end{pmatrix}\end{split}\]

See also

U1Gate This gate is equivalent to U1 up to a phase factor.

\[U1(\lambda) = e^{i{\lambda}/2}RZ(\lambda)\]

Reference for virtual Z gate implementation: 1612.00858

Create new RZ gate.

Attributes

RZGate.decompositions

Get the decompositions of the instruction from the SessionEquivalenceLibrary.

RZGate.definition

Return definition in terms of other basic gates.

RZGate.label

Return gate label

RZGate.params

return instruction params.

Methods

RZGate.add_decomposition(decomposition)

Add a decomposition of the instruction to the SessionEquivalenceLibrary.

RZGate.assemble()

Assemble a QasmQobjInstruction

RZGate.broadcast_arguments(qargs, cargs)

Validation and handling of the arguments and its relationship.

RZGate.c_if(classical, val)

Add classical condition on register classical and value val.

RZGate.control([num_ctrl_qubits, label, …])

Return a (mutli-)controlled-RZ gate.

RZGate.copy([name])

Copy of the instruction.

RZGate.inverse()

Return inverted RZ gate

RZGate.is_parameterized()

Return True .IFF.

RZGate.mirror()

For a composite instruction, reverse the order of sub-gates.

RZGate.power(exponent)

Creates a unitary gate as gate^exponent.

RZGate.qasm()

Return a default OpenQASM string for the instruction.

RZGate.repeat(n)

Creates an instruction with gate repeated n amount of times.

RZGate.to_matrix()

Return a Numpy.array for the gate unitary matrix.