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
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
persist-credentials: false
- uses: actions/setup-python@v6
with:
python-version: '3.10'
python-version: '3.11'
- name: Install Rust
run: rustup toolchain install "$RUSTUP_TOOLCHAIN" --profile minimal --component rustfmt --component clippy --no-self-update
- name: Rust formatting
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
persist-credentials: false
- uses: actions/setup-python@v6
with:
python-version: '3.10'
python-version: '3.11'
- name: Install Rust
run: rustup toolchain install "$RUSTUP_TOOLCHAIN" --profile minimal --no-self-update
- uses: Swatinem/rust-cache@v2
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/wheels-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- uses: actions/setup-python@v6
if: runner.os != 'Linux'
with:
python-version: '3.10'
python-version: '3.11'
- name: Set up native build tools
if: runner.os != 'Linux'
run: |
Expand All @@ -66,50 +66,50 @@ jobs:
-e PLATFORM -e RUSTUP_TOOLCHAIN -e CARGO_PROFILE_DEV_DEBUG \
-e CARGO_PROFILE_TEST_DEBUG -e CARGO_INCREMENTAL -e CARGO_BUILD_JOBS \
"$IMAGE" bash -euo pipefail -c '
export PATH="/opt/python/cp310-cp310/bin:$HOME/.cargo/bin:$PATH"
export PATH="/opt/python/cp311-cp311/bin:$HOME/.cargo/bin:$PATH"
export CARGO_TARGET_DIR=/tmp/cqlib-manylinux-target
curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs -o /tmp/rustup.sh
sh /tmp/rustup.sh -y --profile minimal --default-toolchain "$RUSTUP_TOOLCHAIN"
python -m pip install maturin==1.14.1 packaging==25.0 tomli==2.2.1 cmake==3.31.6
cargo test --locked -p cqlib-core -p binding-c -p cqlib
python tools/ci.py release --platform "$PLATFORM"
for version in 311 312 313 314; do
for version in 312 313 314 315; do
/opt/python/cp$version-cp$version/bin/python -m pip install packaging==25.0
/opt/python/cp$version-cp$version/bin/python tools/ci.py wheel-test
done
'
- uses: actions/setup-python@v6
if: runner.os != 'Linux'
with:
python-version: '3.11'
- name: Test the same wheel on Python 3.11
python-version: '3.12'
- name: Test the same wheel on Python 3.12
if: runner.os != 'Linux'
run: |
python -m pip install packaging==25.0
python tools/ci.py wheel-test
- uses: actions/setup-python@v6
if: runner.os != 'Linux'
with:
python-version: '3.12'
- name: Test the same wheel on Python 3.12
python-version: '3.13'
- name: Test the same wheel on Python 3.13
if: runner.os != 'Linux'
run: |
python -m pip install packaging==25.0
python tools/ci.py wheel-test
- uses: actions/setup-python@v6
if: runner.os != 'Linux'
with:
python-version: '3.13'
- name: Test the same wheel on Python 3.13
python-version: '3.14'
- name: Test the same wheel on Python 3.14
if: runner.os != 'Linux'
run: |
python -m pip install packaging==25.0
python tools/ci.py wheel-test
- uses: actions/setup-python@v6
if: runner.os != 'Linux'
with:
python-version: '3.14'
- name: Test the same wheel on Python 3.14
python-version: '3.15'
- name: Test the same wheel on Python 3.15
if: runner.os != 'Linux'
run: |
python -m pip install packaging==25.0
Expand All @@ -131,7 +131,7 @@ jobs:
persist-credentials: false
- uses: actions/setup-python@v6
with:
python-version: '3.10'
python-version: '3.11'
- name: Install build tools
run: |
rustup toolchain install "$RUSTUP_TOOLCHAIN" --profile minimal --no-self-update
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
persist-credentials: false
- uses: actions/setup-python@v6
with:
python-version: '3.10'
python-version: '3.11'
- run: python -m pip install packaging==25.0 tomli==2.2.1
- name: Check tag and component versions
env:
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ docs/ 文档相关文件
本项目当前要求:

- Rust 1.89+
- Python 3.10+
- Python 3.11+
- C 11+ 工具链,用于 C 绑定相关开发

建议使用 `rustup` 管理 Rust 工具链,并使用 Python 虚拟环境隔离开发依赖。
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Keep common changes scoped to the relevant module when possible, and avoid combi
The project currently requires:

- Rust 1.89+
- Python 3.10+
- Python 3.11+
- A C 11+ toolchain for C binding development

We recommend using `rustup` for Rust toolchains and a Python virtual environment for Python dependencies.
Expand Down
8 changes: 4 additions & 4 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ members = [
resolver = "2"

[workspace.package]
version = "0.1.0-beta.4"
version = "0.1.0-beta.5"
edition = "2024"
rust-version = "1.89"
license = "Apache-2.0"
Expand Down
8 changes: 4 additions & 4 deletions README.CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE.txt)
[![Rust](https://img.shields.io/badge/rust-1.89%2B-orange.svg)](https://www.rust-lang.org)
[![Python](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org)
[![Python](https://img.shields.io/badge/python-3.11%2B-blue.svg)](https://www.python.org)
[![C](https://img.shields.io/badge/c-11%2B-lightgrey.svg)](https://en.cppreference.com/w/c/11)

[English](README.md)
Expand All @@ -16,7 +16,7 @@
## 概述

Cqlib 是一个高性能量子计算 SDK,为量子程序的构建、优化与执行提供统一基础。核心采用 Rust 实现,兼顾极致性能与内存安全,并原生支持
Python 3.10+ 和 C 11+ 语言接口。
Python 3.11+ 和 C 11+ 语言接口。

Cqlib 从底层设计兼顾科研与生产需求,覆盖量子计算全流程:从线路构建与参数化,到多层 IR 变换、基于规则的编译优化
Pass,再到搭载噪声模型的真实设备模拟,并内置零噪声外推(ZNE)和虚拟蒸馏(Virtual
Expand Down Expand Up @@ -138,12 +138,12 @@ int main(void) {
| 语言 | 最低版本 | 绑定技术 |
|--------|------|-------------------|
| Rust | 1.89 | 原生 |
| Python | 3.10 | PyO3 (abi3-py310) |
| Python | 3.11 | PyO3 (abi3-py311) |
| C | 11 | cbindgen |

## 从源码构建

**前置条件:** Rust 1.89+,Python 3.10+(用于 Python 绑定)
**前置条件:** Rust 1.89+,Python 3.11+(用于 Python 绑定)

```bash
git clone https://gitee.com/cq-lib/cqlib.git
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE.txt)
[![Rust](https://img.shields.io/badge/rust-1.89%2B-orange.svg)](https://www.rust-lang.org)
[![Python](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org)
[![Python](https://img.shields.io/badge/python-3.11%2B-blue.svg)](https://www.python.org)
[![C](https://img.shields.io/badge/c-11%2B-lightgrey.svg)](https://en.cppreference.com/w/c/11)

[中文文档](README.CN.md)
Expand All @@ -17,7 +17,7 @@

Cqlib is a high-performance quantum computing SDK that provides a unified foundation for building, optimizing, and
executing quantum programs. Its core is written in Rust for maximum safety and speed, with first-class language bindings
for Python 3.10+ and C 11+.
for Python 3.11+ and C 11+.

Designed from the ground up for both research and production use, Cqlib covers the full quantum computing workflow: from
circuit construction and parameterization, through multi-level IR transformations, rule-based compilation and
Expand Down Expand Up @@ -142,12 +142,12 @@ int main(void) {
| Language | Minimum Version | Binding Technology |
|----------|-----------------|--------------------|
| Rust | 1.89 | Native |
| Python | 3.10 | PyO3 (abi3-py310) |
| Python | 3.11 | PyO3 (abi3-py311) |
| C | 11 | cbindgen |

## Building from Source

**Prerequisites:** Rust 1.89+, Python 3.10+ (for Python bindings)
**Prerequisites:** Rust 1.89+, Python 3.11+ (for Python bindings)

```bash
git clone https://gitee.com/cq-lib/cqlib.git
Expand Down
2 changes: 1 addition & 1 deletion crates/binding-c/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ license.workspace = true
crate-type = ["rlib", "staticlib", "cdylib"]

[dependencies]
cqlib-core = { path = "../cqlib-core", version = "0.1.0-beta.4" }
cqlib-core = { path = "../cqlib-core", version = "0.1.0-beta.5" }
libc = "0.2"
bitvec.workspace = true
ndarray.workspace = true
Expand Down
6 changes: 3 additions & 3 deletions crates/binding-python/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "binding-python"
version = "2.0.0-beta4"
version = "2.0.0-beta5"
edition.workspace = true
rust-version.workspace = true
license-file.workspace = true
Expand All @@ -12,9 +12,9 @@ name = "_native"
crate-type = ["cdylib", "rlib"]

[dependencies]
pyo3 = { version = "0.29", features = ["abi3-py310", "num-complex", "chrono"] }
pyo3 = { version = "0.29", features = ["abi3-py311", "num-complex", "chrono"] }
chrono = "0.4"
cqlib-core = { path = "../cqlib-core", version = '0.1.0-beta.4' }
cqlib-core = { path = "../cqlib-core", version = '0.1.0-beta.5' }
num-complex.workspace = true
numpy.workspace = true
rustworkx-core.workspace = true
Expand Down
4 changes: 2 additions & 2 deletions crates/binding-python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ mitigation, and visualization.

## Installation

Cqlib requires Python 3.10 or later.
Cqlib requires Python 3.11 or later.

Install the latest pre-release from PyPI:

Expand Down Expand Up @@ -50,7 +50,7 @@ bound = circuit.assign_parameters({"theta": 0.5})

## Supported environments

- Python 3.10 or later on CPython
- CPython 3.11–3.15 with the GIL enabled
- Linux, macOS, and Windows
- Type information is included for static type checkers

Expand Down
4 changes: 2 additions & 2 deletions crates/binding-python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "cqlib"
description = "A high-performance quantum computing SDK with a Rust core and Python bindings."
requires-python = ">=3.10"
requires-python = ">=3.11"
license = "Apache-2.0"
readme = "README.md"
authors = [
Expand All @@ -15,11 +15,11 @@ classifiers = [
"Programming Language :: Rust",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.15",
"Topic :: Software Development :: Libraries",
"Typing :: Typed",
]
Expand Down
4 changes: 2 additions & 2 deletions crates/cqlib-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ Add the crate to your project:

```toml
[dependencies]
cqlib-core = "0.1.0-beta.4"
cqlib-core = "0.1.0-beta.5"
```

Or use Cargo:

```shell
cargo add cqlib-core@0.1.0-beta.4
cargo add cqlib-core@0.1.0-beta.5
```

## Quick start
Expand Down
2 changes: 1 addition & 1 deletion crates/cqlib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ categories = [


[dependencies]
cqlib-core = { path = "../cqlib-core", version = "0.1.0-beta.4" }
cqlib-core = { path = "../cqlib-core", version = "0.1.0-beta.5" }
2 changes: 1 addition & 1 deletion docs/documentation/cn/0_get_started/1_installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

在安装 Cqlib 之前,请确保您的计算机环境满足以下条件:

- Python 环境:支持 Python 3.10 – 3.14(建议使用 64 位版本);
- Python 环境:支持启用 GIL 的 CPython 3.11 – 3.15(建议使用 64 位版本);
- 操作系统:
- Linux
- macOS
Expand Down
2 changes: 1 addition & 1 deletion docs/documentation/cn/0_get_started/2_quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

在开始之前,请确保您的环境已准备就绪:

- Python 环境:支持 Python 3.10 – 3.14
- Python 环境:支持启用 GIL 的 CPython 3.11 – 3.15
- 完成 Cqlib 安装与环境配置(安装方式见 “[Cqlib 安装与环境配置](../0_get_started/1_installation.md)”)

---
Expand Down
2 changes: 1 addition & 1 deletion docs/documentation/en/0_get_started/1_installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This guide covers the installation of Cqlib and the setup of a development envir

Before installing Cqlib, ensure that the environment meets the following conditions:

- Python environment: Python 3.10 – 3.14 is supported (a 64-bit build is recommended);
- Python environment: CPython 3.11 – 3.15 with the GIL enabled is supported (a 64-bit build is recommended);
- Operating system:
- Linux
- macOS
Expand Down
2 changes: 1 addition & 1 deletion docs/documentation/en/0_get_started/2_quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This guide builds a minimal working quantum circuit with Cqlib and completes an

Before starting, ensure that the environment is ready:

- Python environment: Python 3.10 – 3.14 is supported
- Python environment: CPython 3.11 – 3.15 with the GIL enabled is supported
- Cqlib is installed and the environment is configured (for installation, see "[Cqlib Installation and Environment Setup](../0_get_started/1_installation.md)")

---
Expand Down
14 changes: 7 additions & 7 deletions docs/releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@ Tags use the Python version to identify a release batch:

- Stable releases: `vX.Y.Z`.
- Prereleases: `vX.Y.Z-alpha.N`, `vX.Y.Z-beta.N`, or `vX.Y.Z-rc.N`, with N starting at 1.
- Current tag: `v2.0.0-beta.4`.
- Current Python source version: `2.0.0-beta4`, normalized to `2.0.0b4` for PEP 440 and wheel filenames.
- Current Rust/C version: `0.1.0-beta.4`; both inherit the workspace version.
- Current tag: `v2.0.0-beta.5`.
- Current Python source version: `2.0.0-beta5`, normalized to `2.0.0b5` for PEP 440 and wheel filenames.
- Current Rust/C version: `0.1.0-beta.5`; both inherit the workspace version.

Python and Rust/C versions evolve independently and do not need matching
numbers. The Cargo.toml files at a given tag record the version mapping for that
release; no separate release.toml is maintained.
CI checks that the tag is equivalent to the Python version, core dependency
versions are consistent across bindings, the minimum Python version is 3.10,
and `abi3-py310` is enabled. Maintainers must update versions before tagging.
versions are consistent across bindings, the minimum Python version is 3.11,
and `abi3-py311` is enabled. Maintainers must update versions before tagging.

## Platforms and Artifacts

Expand All @@ -69,8 +69,8 @@ Images use the latest tag, with the resolved digest recorded in logs.
On macOS, CI checks the shared library's minimum deployment version. Tests
actually run on macOS 15; this does not constitute execution testing on macOS 11.

Each platform produces one `cp310-abi3` wheel. That same wheel is installed into
separate CPython 3.10, 3.11, 3.12, 3.13, and 3.14 environments for import checks,
Each platform produces one `cp311-abi3` wheel. That same wheel is installed into
separate CPython 3.11, 3.12, 3.13, 3.14, and 3.15 environments for import checks,
pip check, and the full pytest suite. Tests are copied alongside the installed
package to satisfy existing sibling-directory assertions. They do not import
cqlib from the checkout, and existing tests are not modified, skipped, or marked
Expand Down
Loading
Loading