Skip to content
Merged
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
7 changes: 7 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
branches:
- main

permissions:
contents: read

jobs:
test:
name: Test Workspace
Expand All @@ -30,6 +33,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.25.4"
version = "0.26.0-rc.3"
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Installation

To install the CLI, we recommend using [uv](https://docs.astral.sh/uv/). Note
that the CLI requires Python 3.9 or greater.
that the CLI requires Python 3.10 or greater.

If you don't already have `uv`, follow the [installation
instructions](https://docs.astral.sh/uv/getting-started/installation/). Then
Expand Down
12 changes: 12 additions & 0 deletions client/src/s3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,22 @@ impl Client {
}

pub async fn s3_put(&self, url: Url, body: impl Into<Body>) -> Result<S3PutResponse> {
self.s3_put_with_content_type(url, body, None).await
}

pub async fn s3_put_with_content_type(
&self,
url: Url,
body: impl Into<Body>,
content_type: Option<&str>,
) -> Result<S3PutResponse> {
self.validate_host(&url)?;
let mut request = http::Request::builder()
.method(http::Method::PUT)
.uri(url.to_string());
if let Some(content_type) = content_type {
request = request.header(reqwest::header::CONTENT_TYPE, content_type);
}
let body = body.into();
if let Some(content_length) = body.content_length() {
request.headers_mut().map(|headers| {
Expand Down
4 changes: 2 additions & 2 deletions install.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def is_rosetta_translated():

def get_python_clib():
system = platform.system()
for major, minor in [(3, 12), (3, 11), (3, 10), (3, 9), (3, 8)]:
for major, minor in [(3, 12), (3, 11), (3, 10)]:
if system == "Windows":
name = f"python{major}{minor}"
else:
Expand All @@ -46,7 +46,7 @@ def get_release_asset_name():
py_version = get_python_clib()
if py_version is None:
raise Exception(
"Python bindings not found. Make sure Python >= 3.8 shared library is installed."
"Python bindings not found. Make sure a Python 3.10-3.12 shared library is installed."
)
py_version = f"py{py_version[0]}_{py_version[1]}"

Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "aqora"
description = "The aqora command line interface"
readme = "README.md"
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 @@ -30,6 +30,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
7 changes: 6 additions & 1 deletion python/aqora/_aqora.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,17 @@ class ClientError(Exception): ...

class Client:
authenticated: bool
def __init__(self, url: str | None = None) -> None: ...
def __init__(
self, url: str | None = None, *, allow_insecure_host: bool | None = None
) -> None: ...
async def authenticate(self) -> None: ...
async def send(self, query: str, **variables: Any) -> Any: ...
async def s3_get(
self, url: str, *, range: tuple[int | None, int | None] | None = None
) -> bytes: ...
async def s3_put(
self, url: str, body: bytes, *, content_type: str | None = None
) -> str: ...
async def _download_workspace_notebook(
self,
owner: str,
Expand Down
20 changes: 20 additions & 0 deletions python/aqora/qiskit/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from __future__ import annotations

from . import backend, client, job, primitives
from ._deps import QuantumCircuit
from .backend import QPU
from .job import ProviderJobResultItem, QPUJob
from .primitives import estimator, sampler

__all__ = [
"QPU",
"ProviderJobResultItem",
"QPUJob",
"QuantumCircuit",
"backend",
"client",
"estimator",
"job",
"primitives",
"sampler",
]
39 changes: 39 additions & 0 deletions python/aqora/qiskit/_deps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
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, JobError, 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.qiskit requires the optional Qiskit dependencies. "
"Install `aqora[qiskit]` to use this module."
) from exc

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