qcs_sdk.qvm
The QVM module contains the API for interacting with the Quantum Virtual Machine (QVM).
🔨 This page is under construction and the documentation for some submodules is missing. In the meantime, you can find documentation in the the type hints.
Encapsulates data returned from the QVM after executing a program.
Build a QVMResultData
from a mapping of register names to a RegisterData
matrix.
Get a copy of this result data flattened into a RawQVMReadoutData
Options avaialable for running programs on the QVM.
Get the default set of QVMOptions
used for QVM requests.
Settings: timeout: 30.0 seconds
Client used to communicate with QVM
Errors that can occur when running a Quil program on the QVM.
Inherited Members
- builtins.RuntimeError
- RuntimeError
- builtins.BaseException
- with_traceback
- add_note
- args
Runs the given program on the QVM.
Parameters
- quil: A quil program as a string.
- shots: The number of times to run the program. Should be a value greater than zero.
- addresses: A mapping of memory region names to an
AddressRequest
describing what data to get back for that memory region from the QVM at the end of execution. - params: A mapping of memory region names to their desired values.
- client: An optional
QCSClient
to use. If unset, creates one using the environemnt configuration (see https: //docs.rigetti.com/qcs/references/qcs-client-configuration). - options: An optional
QVMOptions
to use. If unset, usesQVMOptions.default()
for the request.
:returns: A QVMResultData
containing the final state of of memory for the requested readouts after the program finished running.
Raises
- QVMError: If one of the parameters is invalid, or if there was a problem communicating with the QVM server.
Asynchronously runs the given program on the QVM.
Parameters
- quil: A quil program as a string.
- shots: The number of times to run the program. Should be a value greater than zero.
- addresses: A mapping of memory region names to an
AddressRequest
describing what data to get back for that memory region from the QVM at the end of execution. - params: A mapping of memory region names to their desired values.
- client: An optional
QCSClient
to use. If unset, creates one using the environemnt configuration (see https: //docs.rigetti.com/qcs/references/qcs-client-configuration). - options: An optional
QVMOptions
to use. If unset, usesQVMOptions.default()
for the request.
:returns: A QVMResultData
containing the final state of of memory for the requested readouts after the program finished running.
Raises
- QVMError: If one of the parameters is invalid, or if there was a problem communicating with the QVM server.