inquanto-nexus¶
InQuanto Nexus extension.
- class HugrAdapter(backend, project_ref)¶
Adapter for accessing Helios and Selene backends through qNexus.
Implements all methods that directly interact with the backend for all users with Nexus subscriptions.
- Parameters:
backend (
HeliosConfig|HeliosEmulatorConfig|SeleneConfig|SelenePlusConfig) – Target backend to use for quantum computations.project_ref (
ProjectRef) – Reference to the Nexus project where experiments will be stored.
- get_program_results(handles)¶
Returns results of the execution job from Nexus.
- Parameters:
handles (
ExecuteJobRef) – Result handles.- Raises:
ResourceFetchFailed – If the results could not be fetched from Nexus.
ZeroMatches – If no results could be found.
- Returns:
list[QsysResult|BackendResult|QIRResult] – Results from the circuit execution.
- process_programs(hugr_programs, n_shots=None, valid_check=True, execute_job_annotations=None, program_annotations=None, **kwargs)¶
Starts an execution job of HUGR programs on Nexus.
- Parameters:
hugr_programs (
Sequence[Hugr]) – Programs to process on the backend.n_shots (
Union[list[int],list[None],None], default:None) – Number of shots for each program.execute_job_annotations (
Optional[ProtocolAnnotations], default:None) – Annotations of the execution job for all executed programs.program_annotations (
Optional[ProtocolAnnotations], default:None) – Annotations of the HUGR program for all executed programs.valid_check (
bool, default:True)
- Raises:
ResourceCreateFailed – If the circuit program or job could not be submitted to Nexus.
- Returns:
ExecuteJobRef– Results from the program execution.
- property supports_state¶
Whether this backend supports statevector retrieval.
- class ProtocolAnnotations(name=None, description=None, properties=None)¶
Annotations describing information about circuits or jobs which will be created in Nexus.
- Parameters:
name (
Optional[str], default:None) – Name of the circuit or job to be created in Nexus.description (
Optional[str], default:None) – Description of the circuit or job to be created in Nexus.properties (
Optional[OrderedDict[str,bool|int|float|str]], default:None) – Properties of the circuit or job to be created in Nexus. Note