get_qc()
. For instance, if you're targeting a 2-qubit QVM, the call might look something like:get_qc()
function call. For example, to target the Aspen-9
QPU, you can change the line above to:qc
object will be an instance of a pyQuil QuantumComputer
. A QuantumComputer
is comprised of:qc.qam
(class QAM
)qc.compiler
(class AbstractCompiler
)qc.qam
or qc.compiler
, it's important to understand that the QAM
and AbstractCompiler
implementations differ between QPU and QVM use cases.qc.qam
will be a QVM
instance, and qc.compiler
will be a QVMCompiler
instance. However, if your code targets a QPU, qc.qam
will be a QPU
instance, and qc.compiler
will be a QPUCompiler
instance.QAM
and AbstractCompiler
, there may be some methods or properties that are accessible on the QPU-based instances but not on the QVM-based instances, and vice versa.qc.qam
and/or qc.compiler
. For example:get_calibration_program()
is not available on QVMCompiler
). With the type check in place, your code will run seamlessly between both cases.Device Calibration
under a QPU when making a reservation, as shown above.as_qvm
parameter of get_qc()
:RESET
instruction at the beginning of a program — forces all qubits to their ground states. This is useful when running sequential programs against a QPU, as it reduces the time needed for qubits to return to their ground states between programs.