Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion qnexus/client/circuits.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ def cost(
backend_config: BackendConfig,
syntax_checker: str | None = None,
project: ProjectRef | None = None,
timeout: float | int | None = None,
) -> float | None:
"""Estimate the cost (in HQC) of running Circuit programs for n_shots
number of shots on a Quantinuum H2 system.
Expand Down Expand Up @@ -371,6 +372,6 @@ def cost(
project=project,
name="Circuit cost estimation job",
)
status = qnx.jobs.wait_for(job_ref)
status = qnx.jobs.wait_for(job_ref, timeout=timeout)

return cast(float, status.cost)
3 changes: 2 additions & 1 deletion qnexus/client/hugr.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ def cost(
n_shots: int | list[int],
project: ProjectRef | None = None,
system_name: Literal["Helios-1"] = "Helios-1",
timeout: float | int | None = None
) -> float:
"""Estimate the cost (in HQC) of running Hugr programs for n_shots
number of shots on a Quantinuum Helios system.
Expand All @@ -303,7 +304,7 @@ def cost(
project=project,
name="Hugr cost estimation job",
)
status = qnx.jobs.wait_for(job_ref)
status = qnx.jobs.wait_for(job_ref, timeout=timeout)

return cast(float, status.cost)

Expand Down
3 changes: 2 additions & 1 deletion qnexus/client/qir.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ def cost(
n_shots: int | list[int],
project: ProjectRef | None = None,
system_name: Literal["Helios-1"] = "Helios-1",
timeout: float | int | None = None
) -> float:
"""Estimate the cost (in HQC) of running QIR programs for n_shots
number of shots on a Quantinuum Helios system.
Expand All @@ -282,7 +283,7 @@ def cost(
project=project,
name="QIR cost estimation job",
)
status = qnx.jobs.wait_for(job_ref)
status = qnx.jobs.wait_for(job_ref, timeout=timeout)

return cast(float, status.cost)

Expand Down