qcs_sdk.qpu.translation
Options available for Quil program translation.
This wraps [ApiTranslationOptions] in order to improve the user experience,
because the structs auto-generated by prost can be clumsy to use directly.
Use the first-generation translation backend available on QCS since 2018.
Use the second-generation translation backend available on QCS since 2023.
Compile the program through Q-CTRL's API prior to translation.
The client should generally leave the q_ctrl compile options unset
as it is specially authorized and not generally available.
Configure Riverlane features prior to execution.
Options here are specially authorized and are not generally available to the client.
Use the v2 backend for translation, available on QCS since 2023.
Parameters
prepend_default_calibrations: If False, do not prepend the default calibrations to the translated program.passive_reset_delay_seconds: The delay between passive resets, in seconds.allow_unchecked_pointer_arithmetic: If True, disable runtime memory bounds checking. Only available to certain users.allow_frame_redefinition: If True, allow defined frames to differ from Rigetti defaults. Only available to certain users. Otherwise, onlyINITIAL-FREQUENCYandCHANNEL-DELAYmay be modified.
The result of a call to [translate] which provides information about the translated program.
The backend used for translation.
Options for compiling programs through the Q-CTRL API.
Options here are specially authorized and are not generally available to the client.
Options for configuring Riverlane features prior to execution.
Options here are specially authorized and are not generally available to the client.
Errors raised due to failure to translate a program.
Retrieve the calibration data used for client-side Quil-T generation.
Parameters
quantum_processor_id: The ID of the quantum processor.client: TheQcsclient to use. Creates one using environment configuration if unset - see https: //docs.rigetti.com/qcs/references/qcs-client-configurationtimeout: Maximum duration to wait for API calls to complete, in seconds. Defaults to 10 seconds.
:returns: The Quil calibration program for the requested quantum processor.
Raises
LoadClientError: If there is an issue loading the QCS Client configuration.TranslationError: If there was a problem fetching Quil-T calibrations.
Retrieve the calibration data used for client-side Quil-T generation.
Parameters
quantum_processor_id: The ID of the quantum processor.client: TheQcsclient to use. Creates one using environment configuration if unset - see https: //docs.rigetti.com/qcs/references/qcs-client-configurationtimeout: Maximum duration to wait for API calls to complete, in seconds. Defaults to 10 seconds.
:returns: The Quil calibration program for the requested quantum processor.
Raises
LoadClientError: If there is an issue loading the QCS Client configuration.TranslationError: If there was a problem fetching Quil-T calibrations.
Translates a native Quil program into an executable program.
Parameters
native_quil: A Quil program.num_shots: The number of shots to perform.quantum_processor_id: The ID of the quantum processor the executable will run on (e.g. "Aspen-M-2").client: TheQcsclient to use. Creates one using environment configuration if unset - see https: //docs.rigetti.com/qcs/references/qcs-client-configurationtranslation_options: Optional translation options.
Raises
LoadClientError: If there is an issue loading the QCS Client configuration.TranslationError: If thenative_quilprogram could not be translated.
Translates a native Quil program into an executable program.
Parameters
native_quil: A Quil program.num_shots: The number of shots to perform.quantum_processor_id: The ID of the quantum processor the executable will run on (e.g. "Aspen-M-2").client: TheQcsclient to use. Creates one using environment configuration if unset - see https: //docs.rigetti.com/qcs/references/qcs-client-configurationtranslation_options: Optional translation options.
Raises
LoadClientError: If there is an issue loading the QCS Client configuration.TranslationError: If thenative_quilprogram could not be translated.