gates

class qiskit_rigetti.gates.CPhase00Gate(theta: float)

Class for representing a CPhase00 gate, a variant of CPhase that affects state |00>

CPHASE00(theta) = [[exp(i*theta), 0, 0, 0],
                   [0,            1, 0, 0],
                   [0,            0, 1, 0],
                   [0,            0, 0, 1]]
Parameters

theta – Phase angle

class qiskit_rigetti.gates.CPhase01Gate(theta: float)

Class for representing a CPhase01 gate, a variant of CPhase that affects state |01>

CPHASE01(theta) = [[1, 0,            0, 0],
                   [0, exp(i*theta), 0, 0],
                   [0, 0,            1, 0],
                   [0, 0,            0, 1]]
Parameters

theta – Phase angle

class qiskit_rigetti.gates.CPhase10Gate(theta: float)

Class for representing a CPhase10 gate, a variant of CPhase that affects state |10>

CPHASE01(theta) = [[1, 0, 0,            0],
                   [0, 1, 0,            0],
                   [0, 0, exp(i*theta), 0],
                   [0, 0, 0,            1]]
Parameters

theta – Phase angle

class qiskit_rigetti.gates.CanonicalGate(alpha: float, beta: float, gamma: float)

Class for representing a canonical gate

CAN(alpha, beta, gamma) = [[(exp(i*(alpha+beta-gamma)/2)+exp(i*(alpha-beta+gamma)/2))/2, 0,                                                                    0,                                                                    (exp(i*(alpha-beta+gamma)/2)-exp(i*(alpha+beta-gamma)/2))/2],
                           [0,                                                                 (exp(i*(alpha+beta+gamma)/(-2))+exp(i*(beta+gamma-alpha)/2))/2, (exp(i*(alpha+beta+gamma)/(-2))-exp(i*(beta+gamma-alpha)/2))/2, 0                                                                ],
                           [0,                                                                 (exp(i*(alpha+beta+gamma)/(-2))-exp(i*(beta+gamma-alpha)/2))/2, (exp(i*(alpha+beta+gamma)/(-2))+exp(i*(beta+gamma-alpha)/2))/2, 0                                                                ],
                           [(exp(i*(alpha-beta+gamma)/2)-exp(i*(alpha+beta-gamma)/2))/2, 0,                                                                    0,                                                                    (exp(i*(alpha+beta-gamma)/2)+exp(i*(alpha-beta+gamma)/2))/2]]
Parameters
  • alpha – X-axis phase angle

  • beta – Y-axis phase angle

  • gamma – Z-axis phase angle

class qiskit_rigetti.gates.PSwapGate(theta: float)

Class for representing a parametric Swap gate

PSWAP(theta) = [[1, 0,              0,              0],
                [0, 0,              exp(i * theta), 0],
                [0, exp(i * theta), 0,              0],
                [0, 0,              0,              1]]
Parameters

theta – Phase angle

class qiskit_rigetti.gates.XYGate(theta: float)

Class for representing an XY gate (parametric iSwap gate)

XY(theta) = [[1, 0,                0,                0],
             [0, cos(theta/2),     i * sin(theta/2), 0],
             [0, i * sin(theta/2), cos(theta/2),     0],
             [0, 0,                0,                1]]

See https://arxiv.org/pdf/1912.04424.pdf for technical details.

Parameters

theta – Phase angle