Module: cirq_rigetti.quil_input

Classes

class UndefinedQuilGate: Common base class for all non-exit exceptions.

class UnsupportedQuilInstruction: Common base class for all non-exit exceptions.

Functions

CCNOT(...): The Tofolli gate, also known as the Controlled-Controlled-X gate.

CNOT(...): The controlled NOT gate.

CSWAP(...): The Controlled Swap gate, also known as the Fredkin gate.

CZ(...): The controlled Z gate.

H(...): The Hadamard gate.

I(...): The one qubit identity gate.

ISWAP(...): The iswap gate.

S(...): The Clifford S gate.

SWAP(...): The swap gate.

T(...): The non-Clifford T gate.

X(...): The Pauli X gate.

Y(...): The Pauli Y gate.

Z(...): The Pauli Z gate.

circuit_from_quil(...): Convert a Quil program to a Cirq Circuit.

cphase(...): Returns a controlled-phase gate as a Cirq CZPowGate with exponent determined by the input param.

cphase00(...): Returns a Cirq TwoQubitDiagonalGate for pyQuil's CPHASE00 gate.

cphase01(...): Returns a Cirq TwoQubitDiagonalGate for pyQuil's CPHASE01 gate.

cphase10(...): Returns a Cirq TwoQubitDiagonalGate for pyQuil's CPHASE10 gate.

phase(...): Returns a single-qubit phase gate as a Cirq ZPowGate with exponent determined by the input param.

pswap(...): Returns a Cirq MatrixGate for pyQuil's PSWAP gate.

xy(...): Returns an ISWAP-family gate as a Cirq ISwapPowGate with exponent determined by the input param.

PRAGMA_ERROR ('\n' 'Please remove PRAGMAs from your Quil program.\n' 'If you would like to add noise, do so after conversion.\n')
RESET_ERROR ('\n' 'Please remove RESETs from your Quil program.\n' 'RESET directives have special meaning on QCS, to enable active reset.\n')
SUPPORTED_GATES

{
 'CCNOT': cirq.TOFFOLI,
 'CNOT': cirq.CNOT,
 'CPHASE': <function cphase>,
 'CPHASE00': <function cphase00>,
 'CPHASE01': <function cphase01>,
 'CPHASE10': <function cphase10>,
 'CSWAP': cirq.FREDKIN,
 'CZ': cirq.CZ,
 'H': cirq.H,
 'I': cirq.I,
 'ISWAP': cirq.ISWAP,
 'PHASE': <function phase>,
 'PSWAP': <function pswap>,
 'RX': <function rx>,
 'RY': <function ry>,
 'RZ': <function rz>,
 'S': cirq.S,
 'SWAP': cirq.SWAP,
 'T': cirq.T,
 'X': cirq.X,
 'XY': <function xy>,
 'Y': cirq.Y,
 'Z': cirq.Z
}