execute

qnexus.execute(
programs: CircuitRef | HUGRRef | list[CircuitRef | HUGRRef],
n_shots: list[int] | list[None],
backend_config: Annotated[AerConfig | AerStateConfig | AerUnitaryConfig | BraketConfig | QuantinuumConfig | IBMQConfig | IBMQEmulatorConfig | ProjectQConfig | QulacsConfig | SeleneQuestConfig | SeleneStimConfig | SeleneLeanConfig | SeleneCoinFlipConfig | SeleneClassicalReplayConfig, FieldInfo(annotation=NoneType, required=True, discriminator='type')],
name: str,
description: str = '',
properties: OrderedDict[str, bool | int | float | str] | None = None,
project: ProjectRef | None = None,
valid_check: bool = True,
postprocess: bool = False,
noisy_simulator: bool = True,
wasm_module: WasmModuleRef | None = None,
language: Language = Language.AUTO,
seed: int | None = None,
credential_name: str | None = None,
user_group: str | None = None,
timeout: float | None = 300.0,
) list[QsysResult | BackendResult][source]

Utility method to run an execute job and return the results. Blocks until the results are available. See qnexus.start_execute_job for a function that submits the job and returns immediately, rather than waiting for results.

qnexus.start_execute_job(
programs: CircuitRef | HUGRRef | list[CircuitRef | HUGRRef],
n_shots: list[int] | list[None],
backend_config: Annotated[AerConfig | AerStateConfig | AerUnitaryConfig | BraketConfig | QuantinuumConfig | IBMQConfig | IBMQEmulatorConfig | ProjectQConfig | QulacsConfig | SeleneQuestConfig | SeleneStimConfig | SeleneLeanConfig | SeleneCoinFlipConfig | SeleneClassicalReplayConfig, FieldInfo(annotation=NoneType, required=True, discriminator='type')],
name: str,
description: str = '',
properties: OrderedDict[str, bool | int | float | str] | None = None,
project: ProjectRef | None = None,
valid_check: bool = True,
postprocess: bool = False,
noisy_simulator: bool = True,
language: Language = Language.AUTO,
seed: int | None = None,
credential_name: str | None = None,
wasm_module: WasmModuleRef | None = None,
user_group: str | None = None,
) ExecuteJobRef[source]

Submit an execute job to be run in Nexus. Returns an ExecuteJobRef object which can be used to check the job’s status. See qnexus.execute for a utility method that waits for the results and returns them.

class qnexus.models.references.ExecuteJobRef(
*,
id: UUID,
annotations: Annotations,
job_type: JobType = JobType.EXECUTE,
last_status: StatusEnum,
last_message: str,
project: ProjectRef,
backend_config_store: Annotated[AerConfig | AerStateConfig | AerUnitaryConfig | BraketConfig | QuantinuumConfig | IBMQConfig | IBMQEmulatorConfig | ProjectQConfig | QulacsConfig | SeleneQuestConfig | SeleneStimConfig | SeleneLeanConfig | SeleneCoinFlipConfig | SeleneClassicalReplayConfig, FieldInfo(annotation=NoneType, required=True, discriminator='type')] | None = None,
type: Literal['ExecuteJobRef'] = 'ExecuteJobRef',
)[source]

Proxy object to an ExecuteJob in Nexus.

df() DataFrame

Present in a pandas DataFrame.

class qnexus.models.references.ExecutionResultRef(
*,
id: UUID,
annotations: Annotations,
project: ProjectRef,
result_type: ResultType = ResultType.PYTKET,
type: Literal['ExecutionResultRef'] = 'ExecutionResultRef',
)[source]

Proxy object to the results of a circuit execution through Nexus.

df() DataFrame[source]

Present in a pandas DataFrame.

download_backend_info() BackendInfo[source]

Get a copy of the pytket BackendInfo.

download_result() QsysResult | BackendResult[source]

Get a copy of the result of the program execution.

get_input() CircuitRef | HUGRRef[source]

Get the Program Ref of the input program.