qcs_sdk.qpu
Encapsulates data returned from the QPU after executing a job.
QpuResultData contains "mappings", which map declared memory regions
in a program (ie. "ro[0]") to that region's readout key in QpuResultData.readout_values.
readout_values maps those readout keys to the values emitted for that region
across all shots.
Read more about QPU readout data in the QCS Documentation
Convert into a [RegisterMap].
The [RegisterMatrix] for each register will be
constructed such that each row contains all the final values in the register for a single shot.
Errors
Returns a [RegisterMatrixConversionError] if the execution data for any of the
registers would result in a jagged matrix.
[QpuResultData] data is captured per measure,
meaning a value is returned for every measure to a memory reference, not just once per shot.
This is often the case in programs that use mid-circuit measurement or dynamic control flow,
where measurements to the same memory reference might occur multiple times in a shot, or be
skipped conditionally. In these cases, building a rectangular [RegisterMatrix] would
necessitate making assumptions about the data that could skew the data in undesirable ways.
Instead, it's recommended to manually build a matrix from [QpuResultData] that accurately
selects the last value per-shot based on the program that was run.
A wrapper type for data returned by the QPU in a more flat structure than
[QpuResultData] offers. This makes it more convenient to work with
the data if you don't care what type of number the readout values for
each register contains.
A row of readout values from the QPU.
Each row contains all the values emitted to a memory reference across all shots. There is a variant for each possible type the list of readout values could be.
Inherited Members
Inherited Members
Inherited Members
A row of data containing the contents of a memory region at the end of a job.
There is a variant for each possible type the memory region could be.
Inherited Members
Inherited Members
Inherited Members
API Errors encountered when trying to list available quantum processors.
Returns all available Quantum Processor (QPU) IDs.
Parameters
- client: The
Qcsclient to use. Creates one using environment configuration if unset - see https: //docs.rigetti.com/qcs/references/qcs-client-configuration - timeout: Maximum duration to wait for API calls to complete, in seconds.
Raises
- ListQuantumProcessorsError: If the request to list available QPU IDs failed.
Returns all available Quantum Processor (QPU) IDs.
Parameters
- client: The
Qcsclient to use. Creates one using environment configuration if unset - see https: //docs.rigetti.com/qcs/references/qcs-client-configuration - timeout: Maximum duration to wait for API calls to complete, in seconds.
Raises
- ListQuantumProcessorsError: If the request to list available QPU IDs failed.