Forest

Interface to pyQuil and the Rigetti Forest.

quantumflow.xforest.circuit_to_pyquil(circ: Circuit, translate: bool = False) pqProgram

Convert a QuantumFlow circuit to a pyQuil program

quantumflow.xforest.pyquil_to_circuit(program: pqProgram) Circuit

Convert a protoquil pyQuil program to a QuantumFlow Circuit

quantumflow.xforest.QUIL_TO_QF = {'CCNOT': 'CCNot', 'CHPHASE10': 'CPhase10', 'CNOT': 'CNot', 'CPHASE': 'CPhase', 'CPHASE00': 'CPhase00', 'CPHASE01': 'CPhase01', 'CSWAP': 'CSwap', 'CZ': 'CZ', 'H': 'H', 'I': 'I', 'ISWAP': 'ISwap', 'PSWAP': 'PSwap', 'PhaseShift': 'PhaseShift', 'RX': 'Rx', 'RY': 'Ry', 'RZ': 'Rz', 'S': 'S', 'SWAP': 'Swap', 'T': 'T', 'X': 'X', 'Y': 'Y', 'Z': 'Z'}

Map from QUIL operation names to QuantumFlow names