Skip to content

Latest commit

 

History

History
114 lines (93 loc) · 2.1 KB

gates.rst

File metadata and controls

114 lines (93 loc) · 2.1 KB

Gates and Instructions

A :py~pyquil.quil.Program is effectively a list of gates and instructions which can be created using the function documented in this section:

>>> p = Program()
>>> p += H(qubit=0)
>>> p += RY(angle=pi/3, qubit=1)
>>> p += CNOT(0, 1)
    ...

pyquil.gates

Native gates for Rigetti QPUs

Physical quantum processors can enact a subset of all named gates. Luckily, a small set of gates is universal for quantum computation, so all named gates can be enacted by suitable combinations of physically realizable gates. Rigetti's superconducting quantum processors can perform :pyRX with angle=+-pi/2 or angle=+-pi, :pyRZ with an arbitrary angle, and :pyCZ interactions between neighboring qubits. Rigetti QPUs can natively measure in the computational (Z) basis.

RX RZ CZ MEASURE

All gates and instructions

In general, you will write a quantum program using the full suite of Quil gates and instructions and use the Quil compiler <compiler> to compile programs into the target instruction set (ISA). The full list of quantum gates and classical Quil instructions is enumerated here.

Single-qubit gates

I X Y Z H S T RX RY RZ PHASE

Multi-qubit gates

CZ CNOT CCNOT CPHASE00 CPHASE01 CPHASE10 CPHASE SWAP CSWAP ISWAP PSWAP

Classical instructions

WAIT RESET NOP HALT MEASURE NEG NOT AND OR IOR XOR MOVE EXCHANGE LOAD STORE CONVERT ADD SUB MUL DIV EQ LT LE GT GE

Collections

QUANTUM_GATES STANDARD_INSTRUCTIONS