RXXGate

class RXXGate(theta)[source]

A parameteric 2-qubit \(X \otimes X\) interaction (rotation about XX).

This gate is symmetric, and is maximally entangling at \(\theta = \pi/2\).

Circuit Symbol:

     ┌─────────┐
q_0: ┤1        ├
     │  Rxx(ϴ) │
q_1: ┤0        ├
     └─────────┘

Matrix Representation:

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

Examples:

\[R_{XX}(\theta = 0) = I\]
\[R_{XX}(\theta = \pi) = i X \otimes X\]
\[\begin{split}R_{XX}(\theta = \frac{\pi}{2}) = \frac{1}{\sqrt{2}} \begin{pmatrix} 1 & 0 & 0 & -i \\ 0 & 1 & -i & 0 \\ 0 & -i & 1 & 0 \\ -i & 0 & 0 & 1 \end{pmatrix}\end{split}\]

Create new RXX gate.

Attributes

RXXGate.decompositions

Get the decompositions of the instruction from the SessionEquivalenceLibrary.

RXXGate.definition

Return definition in terms of other basic gates.

RXXGate.label

Return gate label

RXXGate.params

return instruction params.

Methods

RXXGate.add_decomposition(decomposition)

Add a decomposition of the instruction to the SessionEquivalenceLibrary.

RXXGate.assemble()

Assemble a QasmQobjInstruction

RXXGate.broadcast_arguments(qargs, cargs)

Validation and handling of the arguments and its relationship.

RXXGate.c_if(classical, val)

Add classical condition on register classical and value val.

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

Return controlled version of gate.

RXXGate.copy([name])

Copy of the instruction.

RXXGate.inverse()

Return inverse RXX gate (i.e.

RXXGate.is_parameterized()

Return True .IFF.

RXXGate.mirror()

DEPRECATED: use instruction.reverse_ops().

RXXGate.power(exponent)

Creates a unitary gate as gate^exponent.

RXXGate.qasm()

Return a default OpenQASM string for the instruction.

RXXGate.repeat(n)

Creates an instruction with gate repeated n amount of times.

RXXGate.reverse_ops()

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

RXXGate.to_matrix()

Return a Numpy.array for the RXX gate.