Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK. Go to the latest version.

RXXGate

class qiskit.circuit.library.RXXGate(theta, label=None)

GitHub

Bases: Gate

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

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

Can be applied to a QuantumCircuit with the rxx() method.

Circuit Symbol:

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

Matrix Representation:

RXX(θ)=exp(iθ2XX)=(cos(θ2)00isin(θ2)0cos(θ2)isin(θ2)00isin(θ2)cos(θ2)0isin(θ2)00cos(θ2))\providecommand{\th}{\frac{\theta}{2}}\\\begin{split}R_{XX}(\theta) = \exp\left(-i \th X{\otimes}X\right) = \begin{pmatrix} \cos\left(\th\right) & 0 & 0 & -i\sin\left(\th\right) \\ 0 & \cos\left(\th\right) & -i\sin\left(\th\right) & 0 \\ 0 & -i\sin\left(\th\right) & \cos\left(\th\right) & 0 \\ -i\sin\left(\th\right) & 0 & 0 & \cos\left(\th\right) \end{pmatrix}\end{split}

Examples:

RXX(θ=0)=IR_{XX}(\theta = 0) = I RXX(θ=π)=iXXR_{XX}(\theta = \pi) = i X \otimes X RXX(θ=π2)=12(100i01i00i10i001)\begin{split}R_{XX}\left(\theta = \frac{\pi}{2}\right) = \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

condition_bits

Get Clbits in condition.

decompositions

Get the decompositions of the instruction from the SessionEquivalenceLibrary.

definition

Return definition in terms of other basic gates.

duration

Get the duration.

label

Return instruction label

name

Return the name.

num_clbits

Return the number of clbits.

num_qubits

Return the number of qubits.

params

return instruction params.

unit

Get the time unit of duration.


Methods

inverse

inverse()

Return inverse RXX gate (i.e. with the negative rotation angle).

power

power(exponent)

Raise gate to a power.

Was this page helpful?
Report a bug or request content on GitHub.