Skip to content

Commit 09059bd

Browse files
authored
Fix CI working directory (#4)
1 parent 7b47abd commit 09059bd

File tree

4 files changed

+33
-19
lines changed

4 files changed

+33
-19
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,21 @@ on:
55
branches: ["main", "master"]
66
pull_request:
77

8+
concurrency:
9+
# group by workflow and ref; the last slightly strange component ensures that for pull
10+
# requests, we limit to 1 concurrent job, but for the master branch we don't
11+
group: ${{ github.workflow }}-${{ github.ref }}-${{ (github.ref != 'refs/heads/master' && github.ref != 'refs/heads/main') || github.run_number }}
12+
# Cancel intermediate builds, but only if it is a pull request build.
13+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
14+
815
jobs:
916
test:
1017
runs-on: ${{ matrix.os }}
1118
strategy:
1219
fail-fast: false
1320
matrix:
1421
os: [ubuntu-latest, macos-latest, windows-latest]
15-
python-version: ["3.10", "3.11", "3.12", "3.13", "3"]
22+
python-version: ["3.11", "3.12", "3.13", "3"]
1623
steps:
1724
- uses: actions/checkout@v4
1825
- uses: actions/setup-python@v5
@@ -21,10 +28,7 @@ jobs:
2128
- uses: astral-sh/setup-uv@v3
2229
- name: Install dependencies
2330
run: uv sync --dev
24-
working-directory: pyquantumclifford
2531
- name: Run tests
2632
run: uv run pytest
27-
working-directory: pyquantumclifford
2833
- name: Ruff
2934
run: uv run ruff check .
30-
working-directory: pyquantumclifford

README.md

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,33 @@
11
# pyquantumclifford
22

3-
Thin Python wrapper for `QuantumClifford.jl` and `QuantumClifford.ECC` using the JuliaPy stack.
3+
Thin Python wrapper for [`QuantumClifford.jl`](https://qc.quantumsavory.org/stable/) and [`QuantumClifford.ECC`](https://qc.quantumsavory.org/stable/ECC_API/) using the JuliaPy stack.
4+
Supports extremely fast Stabilizer state simulations, weakly non-Clifford dynamics, and generation of many modern quantum error correcting codes.
5+
6+
## Instalation
7+
8+
```
9+
pip install pyquantumclifford
10+
```
11+
12+
or
13+
14+
```
15+
uv add pyquantumclifford
16+
```
17+
18+
On first `import` the Julia runtime will be downloaded and QuantumClifford.jl will be compiled (optimized for your hardware). This is a slow process, might take around 5 minutes.
19+
20+
Optional: Having [`juliaup`](https://github.com/JuliaLang/juliaup) installed in your system (and available in your PATH) makes managing Julia versions much simpler behind the scenes. Consider manually installing `juliaup` before installing `pyquantumclifford`. The install command is `curl -fsSL https://install.julialang.org | sh` for a selfcontained install in `~/.julia` that you can delete at any time.
421

522
## Usage
623

724
```python
825
import numpy as np
926
from pyquantumclifford import QuantumClifford, ECC
1027

11-
# Create an empty tableau and stabilizer
28+
# Optional, for calling arbitrary Julia code
1229
from juliacall import Main as jl
1330

14-
empty_tab = QuantumClifford.Tableau(
15-
jl.zeros(jl.UInt8, 0),
16-
0,
17-
jl.zeros(jl.UInt8, 0, 0),
18-
)
19-
stabilizer = QuantumClifford.Stabilizer(empty_tab)
20-
2131
# Simple ECC code
2232
code = ECC.Shor9()
2333

@@ -29,5 +39,5 @@ np.array(ECC.parity_matrix(ECC.Shor9()))
2939

3040
## Notes
3141

32-
- Julia dependencies are declared in `juliapkg.json` and installed by JuliaPkg.
42+
- Windows is not supported due to the Oscar computer algebra system being unavailable on it. Use WSL on Windows.
3343
- `juliacall` provides access to Julia modules from Python.

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[project]
22
name = "pyquantumclifford"
3-
version = "0.1.0"
4-
description = "Thin Python wrapper for the Julia library QuantumClifford.jl and QuantumClifford.ECC"
3+
version = "0.10.1"
4+
description = "Thin Python wrapper for the Julia library QuantumClifford.jl and QuantumClifford.ECC. Supports extremely fast Stabilizer state simulations, weakly non-Clifford dynamics, and generation of many modern quantum error correcting codes."
55
readme = "README.md"
66
authors = [
77
{ name = "Stefan Krastanov", email = "stefan@krastanov.org" }
88
]
9-
requires-python = ">=3.10"
9+
requires-python = ">=3.11"
1010
dependencies = [
1111
"juliacall>=0.9.27",
1212
"juliapkg>=0.1.13",
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"julia": "1.12",
2+
"julia": "^1.10",
33
"packages": {
44
"QuantumClifford": {
55
"uuid": "0525e862-1e90-11e9-3e4d-1b39d7109de1",
6-
"version": "0.10"
6+
"version": "0.10.1"
77
},
88
"Nemo": {
99
"uuid": "2edaba10-b0f1-5616-af89-8c11ac63239a"

0 commit comments

Comments
 (0)