Module: cirq_rigetti.quil_input


class CPHASE00: Cirq equivalent to Quil CPHASE00.

class CPHASE01: Cirq equivalent to Quil CPHASE01.

class CPHASE10: Cirq equivalent to Quil CPHASE10.

class PSWAP: Cirq equivalent to Quil PSWAP.

class UndefinedQuilGate: Error for a undefined Quil Gate.

class UnsupportedQuilInstruction: Error for a unsupported instruction.


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.

defgate_to_cirq(...): Convert a Quil DefGate to a Cirq Gate class.

get_defined_gates(...): Get the gate definitions for the program.

kraus_noise_model_to_cirq(...): Construct a Cirq noise model from the provided Kraus operators.

quil_expression_to_sympy(...): Convert a quil expression to a Sympy expression.

remove_gate_from_kraus(...): Recover the kraus operators from a kraus composed with a gate.

Type Aliases




 'CPHASE': <function <lambda>>,
 'CPHASE00': <function <lambda>>,
 'CPHASE01': <function <lambda>>,
 'CPHASE10': <function <lambda>>,
 'FSIM': <function <lambda>>,
 'PHASE': <function <lambda>>,
 'PHASEDFSIM': <function <lambda>>,
 'PSWAP': <function <lambda>>,
 'RX': <function <lambda>>,
 'RXX': <function <lambda>>,
 'RY': <function <lambda>>,
 'RYY': <function <lambda>>,
 'RZ': <function <lambda>>,
 'RZZ': <function <lambda>>,
 'XY': <function <lambda>>

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')

 'CNOT': cirq.CNOT,
 'CPHASE': <class 'cirq.ops.common_gates.CZPowGate'>,
 'CPHASE00': <class 'cirq_rigetti.quil_input.CPHASE00'>,
 'CPHASE01': <class 'cirq_rigetti.quil_input.CPHASE01'>,
 'CPHASE10': <class 'cirq_rigetti.quil_input.CPHASE10'>,
 'CZ': cirq.CZ,
 'FSIM': <class 'cirq.ops.fsim_gate.FSimGate'>,
 'H': cirq.H,
 'I': cirq.I,
 'ISWAP': cirq.ISWAP,
 'PHASE': <class 'cirq.ops.common_gates.ZPowGate'>,
 'PHASEDFSIM': <class 'cirq.ops.fsim_gate.PhasedFSimGate'>,
 'PSWAP': <class 'cirq_rigetti.quil_input.PSWAP'>,
 'RX': <class 'cirq.ops.common_gates.XPowGate'>,
 'RXX': <class 'cirq.ops.parity_gates.XXPowGate'>,
 'RY': <class 'cirq.ops.common_gates.YPowGate'>,
 'RYY': <class 'cirq.ops.parity_gates.YYPowGate'>,
 'RZ': <class 'cirq.ops.common_gates.ZPowGate'>,
 'RZZ': <class 'cirq.ops.parity_gates.ZZPowGate'>,
 'S': cirq.S,
 'SWAP': cirq.SWAP,
 'T': cirq.T,
 'X': cirq.X,
 'XY': <class 'cirq.ops.swap_gates.ISwapPowGate'>,
 'Y': cirq.Y,
 'Z': cirq.Z