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',
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.cost_confidence(
- programs: QIRRef | list[QIRRef],
- n_shots: int | list[int],
- project: ProjectRef | None = None,
- system_name: Literal['Helios-1'] = 'Helios-1',
Estimate the cost (in HQC) of running QIR programs for n_shots number of shots on a Quantinuum Helios system.
Returns a list of tuples of (cost, confidence) for each job item.
- 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: 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,
Get a single QIR using filters. Throws an exception if the filters do not match exactly one object.
Examples
>>> import qnexus as qnx >>> qir_ref = qnx.qir.get(name="my_qir", project=project_ref)
- qnexus.client.qir.get_all(
- *,
- name_like: str | None = None,
- name_exact: list[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,
Get a NexusIterator over QIRs with optional filters.
Examples
>>> import qnexus as qnx >>> all_qirs = qnx.qir.get_all(project=project_ref) >>> all_qirs.df()
- qnexus.client.qir.update(
- ref: QIRRef,
- name: str | None = None,
- description: str | None = None,
- properties: OrderedDict[str, bool | int | float | str] | None = None,
Update the annotations on a QIRRef.
Examples
>>> import qnexus as qnx >>> updated = qnx.qir.update(qir_ref, name="renamed_qir")
- 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,
Upload a QIR to Nexus.
Examples
>>> import qnexus as qnx >>> qir_ref = qnx.qir.upload( ... qir=qir_bytes, ... name="my_qir_program", ... project=project_ref, ... )