RXGate

class RXGate(theta, label=None)[source]

Single-qubit rotation about the X axis.

Circuit symbol:

     ┌───────┐
q_0: ┤ Rx(ϴ) ├
     └───────┘

Matrix Representation:

\[ \begin{align}\begin{aligned}\newcommand{\th}{\frac{\theta}{2}}\\\begin{split}RX(\theta) = exp(-i \th X) = \begin{pmatrix} \cos{\th} & -i\sin{\th} \\ -i\sin{\th} & \cos{\th} \end{pmatrix}\end{split}\end{aligned}\end{align} \]

Create new RX gate.

Attributes

RXGate.decompositions

Get the decompositions of the instruction from the SessionEquivalenceLibrary.

RXGate.definition

Return definition in terms of other basic gates.

RXGate.label

Return gate label

RXGate.params

return instruction params.

Methods

RXGate.add_decomposition(decomposition)

Add a decomposition of the instruction to the SessionEquivalenceLibrary.

RXGate.assemble()

Assemble a QasmQobjInstruction

RXGate.broadcast_arguments(qargs, cargs)

Validation and handling of the arguments and its relationship.

RXGate.c_if(classical, val)

Add classical condition on register classical and value val.

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

Return a (mutli-)controlled-RX gate.

RXGate.copy([name])

Copy of the instruction.

RXGate.inverse()

Return inverted RX gate.

RXGate.is_parameterized()

Return True .IFF.

RXGate.mirror()

DEPRECATED: use instruction.reverse_ops().

RXGate.power(exponent)

Creates a unitary gate as gate^exponent.

RXGate.qasm()

Return a default OpenQASM string for the instruction.

RXGate.repeat(n)

Creates an instruction with gate repeated n amount of times.

RXGate.reverse_ops()

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

RXGate.to_matrix()

Return a numpy.array for the RX gate.