qir

Client API for QIR in Nexus.

qnexus.client.qir.cost(
programs: QIRRef | list[QIRRef],
n_shots: int | list[int],
project: ProjectRef | None = None,
system_name: Literal['Helios-1'] = 'Helios-1',
) float[source]

Estimate the cost (in HQC) of running QIR programs for n_shots number of shots on a Quantinuum Helios system.

NB: This will execute a costing job on a dedicated cost estimation device.

Once run, the cost will be visible also in the Nexus web portal as part of the job.

qnexus.client.qir.get(
*,
id: UUID | str | None = None,
name_like: str | None = None,
creator_email: list[str] | None = None,
project: ProjectRef | None = None,
properties: OrderedDict[str, bool | int | float | str] | None = None,
created_before: datetime | None = None,
created_after: datetime | None = datetime.datetime(2023, 1, 1, 0, 0),
modified_before: datetime | None = None,
modified_after: datetime | None = None,
sort_filters: list[SortFilterEnum] | None = None,
page_number: int | None = None,
page_size: int | None = None,
scope: ScopeFilterEnum = ScopeFilterEnum.USER,
) QIRRef[source]

Get a single QIR using filters. Throws an exception if the filters do not match exactly one object.

qnexus.client.qir.get_all(
name_like: str | None = None,
creator_email: list[str] | None = None,
project: ProjectRef | None = None,
properties: OrderedDict[str, bool | int | float | str] | None = None,
created_before: datetime | None = None,
created_after: datetime | None = datetime.datetime(2023, 1, 1, 0, 0),
modified_before: datetime | None = None,
modified_after: datetime | None = None,
sort_filters: list[SortFilterEnum] | None = None,
page_number: int | None = None,
page_size: int | None = None,
scope: ScopeFilterEnum = ScopeFilterEnum.USER,
) NexusIterator[QIRRef][source]

Get a NexusIterator over QIRs with optional filters.

qnexus.client.qir.update(
ref: QIRRef,
name: str | None = None,
description: str | None = None,
properties: OrderedDict[str, bool | int | float | str] | None = None,
) QIRRef[source]

Update the annotations on a QIRRef.

qnexus.client.qir.upload(
qir: bytes,
name: str,
project: ProjectRef | None = None,
description: str | None = None,
properties: OrderedDict[str, bool | int | float | str] | None = None,
) QIRRef[source]

Upload a QIR to Nexus.

class qnexus.qir.QIRRef(
*,
id: UUID,
annotations: Annotations,
project: ProjectRef,
type: Literal['QIRRef'] = 'QIRRef',
)[source]

Proxy object to a QIR program in Nexus.

df() DataFrame[source]

Present in a pandas DataFrame.

download_qir() bytes[source]

Get the QIR program.