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
6 changes: 3 additions & 3 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist -i python3.8
args: --release --out dist -i python3.10
sccache: "true"
manylinux: auto
docker-options: -e SENTRY_DSN
Expand All @@ -50,7 +50,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.8"
python-version: "3.10"
architecture: ${{ matrix.target }}
- name: Build wheels
uses: PyO3/maturin-action@v1
Expand All @@ -73,7 +73,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.8"
python-version: "3.10"
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ jobs:
- run: cargo clippy --workspace --all-targets -- -D warnings
- run: cargo test --workspace
- run: cargo run -- --version
- name: Python tests
run: |
uv sync --no-install-project
uv run --no-sync pytest test/test_qiskit_provider.py

check-wasm:
name: Check WASM
Expand Down
14 changes: 7 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ resolver = "2"
members = ["archiver", "config", "runner", "template", "data-utils", "client"]

[workspace.package]
version = "0.24.0"
version = "0.25.0-alpha.1"
license = "MIT"

[package]
Expand All @@ -23,7 +23,7 @@ name = "aqora"

[features]
default = []
extension-module = ["pyo3/extension-module", "pyo3/abi3-py38", "pyo3/abi3"]
extension-module = ["pyo3/extension-module", "pyo3/abi3-py310", "pyo3/abi3"]

[dependencies]
aqora-client = { path = "client" }
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = "maturin"
name = "aqora-cli"
description = "The aqora command line interface"
authors = [{ name = "S.A.S Aqora Quantum", email = "hello@aqora.io" }]
requires-python = ">=3.8"
requires-python = ">=3.10"
dynamic = ["version"]
# keywords = []
# classifiers = []
Expand All @@ -29,6 +29,7 @@ venv = [

fsspec = ["fsspec>=2025.3.0"]
pyarrow = ["fsspec>=2025.3.0", "pyarrow>=17.0.0"]
qiskit = ["qio>=0.2.2", "qiskit>=2.3.1"]

[project.urls]
Repository = "https://github.com/aqora-io/cli"
Expand Down
22 changes: 22 additions & 0 deletions python/aqora_cli/qiskit/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from __future__ import annotations

from . import backend, client, job, primitives
from ._deps import QuantumCircuit
from .backend import AqoraBackend, AqoraProvider, ProviderPlatform
from .job import AqoraJob, ProviderJobResultItem
from .primitives import estimator, sampler

__all__ = [
"AqoraBackend",
"AqoraJob",
"AqoraProvider",
"ProviderPlatform",
"ProviderJobResultItem",
"QuantumCircuit",
"backend",
"client",
"estimator",
"job",
"primitives",
"sampler",
]
Comment on lines +9 to +22
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Sort __all__ to satisfy Ruff.

Ruff flags this list with RUF022; ProviderJobResultItem should come before ProviderPlatform.

🧹 Proposed fix
 __all__ = [
     "AqoraBackend",
     "AqoraJob",
     "AqoraProvider",
-    "ProviderPlatform",
     "ProviderJobResultItem",
+    "ProviderPlatform",
     "QuantumCircuit",
     "backend",
     "client",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
__all__ = [
"AqoraBackend",
"AqoraJob",
"AqoraProvider",
"ProviderPlatform",
"ProviderJobResultItem",
"QuantumCircuit",
"backend",
"client",
"estimator",
"job",
"primitives",
"sampler",
]
__all__ = [
"AqoraBackend",
"AqoraJob",
"AqoraProvider",
"ProviderJobResultItem",
"ProviderPlatform",
"QuantumCircuit",
"backend",
"client",
"estimator",
"job",
"primitives",
"sampler",
]
🧰 Tools
🪛 Ruff (0.15.10)

[warning] 9-22: __all__ is not sorted

Apply an isort-style sorting to __all__

(RUF022)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@python/aqora_cli/qiskit/__init__.py` around lines 9 - 22, The __all__ list in
python/aqora_cli/qiskit/__init__.py is not alphabetically sorted and triggers
Ruff RUF022; reorder the exported names so ProviderJobResultItem appears before
ProviderPlatform (i.e., sort the list or swap those two entries). Update the
__all__ definition that contains "AqoraBackend", "AqoraJob", "AqoraProvider",
"ProviderPlatform", "ProviderJobResultItem", ... so that "ProviderJobResultItem"
precedes "ProviderPlatform", preserving the rest of the entries.

38 changes: 38 additions & 0 deletions python/aqora_cli/qiskit/_deps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
from __future__ import annotations

try:
from qio.core import (
BackendData,
ClientData,
QuantumComputationModel,
QuantumProgram,
QuantumProgramResult,
)
from qiskit import QuantumCircuit
from qiskit.primitives import BackendEstimatorV2, BackendSamplerV2
from qiskit.providers import BackendV2, JobV1, Options
from qiskit.providers.jobstatus import JobStatus
from qiskit.result import Result
from qiskit.transpiler import Target
except ImportError as exc: # pragma: no cover - depends on optional deps
raise ImportError(
"aqora_cli.qiskit requires the optional Qiskit dependencies. "
"Install `aqora-cli[qiskit]` to use this module."
) from exc

__all__ = [
"BackendData",
"BackendEstimatorV2",
"BackendSamplerV2",
"BackendV2",
"ClientData",
"JobStatus",
"JobV1",
"Options",
"QuantumCircuit",
"QuantumComputationModel",
"QuantumProgram",
"QuantumProgramResult",
"Result",
"Target",
]
Loading
Loading