Skip to content

Commit 1da11d3

Browse files
authored
feat: add new HeliosConfig, replacing QuantinuumConfig for Helios-generation systems. (#281)
1 parent c71dedb commit 1da11d3

File tree

5 files changed

+38
-10
lines changed

5 files changed

+38
-10
lines changed

DEPENDENCIES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212
| `pytket` | `>=2.3.1, <3.0` | Quantum computing toolkit and interface to the TKET compiler | [https://pypi.org/project/pytket/](https://pypi.org/project/pytket/) |
1313
| `websockets` | `>11, <16` | An implementation of the WebSocket Protocol (RFC 6455 & 7692) | [https://pypi.org/project/websockets/](https://pypi.org/project/websockets/) |
1414
| `pydantic-settings` | `>=2, <3.0` | Settings management using Pydantic | [https://pypi.org/project/pydantic-settings/](https://pypi.org/project/pydantic-settings/) |
15-
| `quantinuum-schemas` | `>=7.0, <8.0` | Shared data models for Quantinuum. | [https://github.com/CQCL/quantinuum-schemas](https://github.com/CQCL/quantinuum-schemas) |
15+
| `quantinuum-schemas` | `>=7.3, <8.0` | Shared data models for Quantinuum. | [https://github.com/CQCL/quantinuum-schemas](https://github.com/CQCL/quantinuum-schemas) |
1616
| `hugr` | `>=0.12.5, <1.0.0` | Quantinuum's common representation for quantum programs | [https://github.com/CQCL/hugr/tree/main/hugr-py](https://github.com/CQCL/hugr/tree/main/hugr-py) |

integration/test_qsys_jobs.py

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,18 @@
22

33
from typing import Any, Callable, ContextManager, cast
44

5+
import pytest
56
from guppylang import guppy
67
from guppylang.std.builtins import result
78
from guppylang.std.quantum import cx, h, measure, qubit, x, z
89
from hugr.qsystem.result import QsysResult
910
from pytket.backends.backendinfo import BackendInfo
10-
from quantinuum_schemas.models.backend_config import SeleneConfig
11+
from quantinuum_schemas.models.backend_config import (
12+
BackendConfig,
13+
HeliosConfig,
14+
HeliosEmulatorConfig,
15+
SeleneConfig,
16+
)
1117

1218
import qnexus as qnx
1319
from qnexus.models.references import (
@@ -48,15 +54,27 @@ def main() -> None:
4854
return main.compile()
4955

5056

57+
@pytest.mark.parameterize(
58+
"backend_config",
59+
[
60+
SeleneConfig(
61+
n_qubits=5,
62+
),
63+
HeliosConfig(
64+
system_name="Helios-1E-lite",
65+
emulator_config=HeliosEmulatorConfig(n_qubits=5),
66+
),
67+
],
68+
)
5169
def test_guppy_execution(
5270
test_case_name: str,
5371
create_project: Callable[[str], ContextManager[ProjectRef]],
72+
backend_config: BackendConfig,
5473
) -> None:
5574
"""Test the execution of a guppy program
5675
on a next-generation QSys device."""
5776

5877
with create_project(f"project for {test_case_name}") as project_ref:
59-
n_qubits = 3
6078
n_shots = 10
6179

6280
hugr_ref = qnx.hugr.upload(
@@ -68,7 +86,7 @@ def test_guppy_execution(
6886
job_ref = qnx.start_execute_job(
6987
programs=[hugr_ref],
7088
n_shots=[n_shots],
71-
backend_config=SeleneConfig(n_qubits=n_qubits),
89+
backend_config=backend_config,
7290
project=project_ref,
7391
name=f"selene job for {test_case_name}",
7492
)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ dependencies = [
2121
"pytket >=2.3.1, <3.0",
2222
"websockets >11, <16",
2323
"pydantic-settings >=2, <3.0",
24-
"quantinuum-schemas>=7.0, <8.0",
24+
"quantinuum-schemas>=7.3, <8.0",
2525
"hugr >=0.12.5, <1.0.0",
2626
]
2727

qnexus/models/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
AerUnitaryConfig,
2020
BackendConfig,
2121
BraketConfig,
22+
HeliosConfig,
23+
HeliosEmulatorConfig,
2224
IBMQConfig,
2325
IBMQEmulatorConfig,
2426
QuantinuumConfig,
@@ -31,14 +33,17 @@
3133
ClassicalReplaySimulator,
3234
CoinflipSimulator,
3335
DepolarizingErrorModel,
36+
HeliosCustomErrorModel,
3437
MatrixProductStateSimulator,
3538
NoErrorModel,
3639
QSystemErrorModel,
3740
SimpleRuntime,
41+
HeliosRuntime,
3842
StabilizerSimulator,
3943
StatevectorSimulator,
4044
)
4145
from quantinuum_schemas.models.quantinuum_systems_noise import (
46+
HeliosErrorParams,
4247
UserErrorParams,
4348
)
4449

@@ -74,6 +79,11 @@
7479
"WAITING_STATUS",
7580
"QSystemErrorModel",
7681
"UserErrorParams",
82+
"HeliosConfig",
83+
"HeliosRuntime",
84+
"HeliosEmulatorConfig",
85+
"HeliosCustomErrorModel",
86+
"HeliosErrorParams",
7787
]
7888

7989

uv.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)