ftalgo 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ftalgo-0.1.0/.claude/launch.json +11 -0
- ftalgo-0.1.0/.github/workflows/ci.yml +64 -0
- ftalgo-0.1.0/.github/workflows/grid.yml +141 -0
- ftalgo-0.1.0/.github/workflows/pages.yml +34 -0
- ftalgo-0.1.0/.github/workflows/wheels.yml +133 -0
- ftalgo-0.1.0/.gitignore +14 -0
- ftalgo-0.1.0/.zenodo.json +38 -0
- ftalgo-0.1.0/CITATION.cff +33 -0
- ftalgo-0.1.0/CNAME +1 -0
- ftalgo-0.1.0/Cargo.lock +184 -0
- ftalgo-0.1.0/Cargo.toml +39 -0
- ftalgo-0.1.0/LICENSE +21 -0
- ftalgo-0.1.0/PKG-INFO +172 -0
- ftalgo-0.1.0/README.md +143 -0
- ftalgo-0.1.0/conftest.py +4 -0
- ftalgo-0.1.0/docs/releasing.md +32 -0
- ftalgo-0.1.0/pyproject.toml +42 -0
- ftalgo-0.1.0/python/ftalgo/__init__.py +11 -0
- ftalgo-0.1.0/python/ftalgo/_data/model.json +4204 -0
- ftalgo-0.1.0/python/ftalgo/_data/model_mr.json +4182 -0
- ftalgo-0.1.0/python/ftalgo/_data/synth_cache.json +1 -0
- ftalgo-0.1.0/python/ftalgo/arch.py +192 -0
- ftalgo-0.1.0/python/ftalgo/arith.py +170 -0
- ftalgo-0.1.0/python/ftalgo/arith_modern.py +366 -0
- ftalgo-0.1.0/python/ftalgo/calib/__init__.py +0 -0
- ftalgo-0.1.0/python/ftalgo/calib/channels.py +83 -0
- ftalgo-0.1.0/python/ftalgo/calib/choi.py +88 -0
- ftalgo-0.1.0/python/ftalgo/calib/circuit_noise.py +225 -0
- ftalgo-0.1.0/python/ftalgo/calib/compose.py +153 -0
- ftalgo-0.1.0/python/ftalgo/calib/model.py +394 -0
- ftalgo-0.1.0/python/ftalgo/calib/qec.py +123 -0
- ftalgo-0.1.0/python/ftalgo/chem/__init__.py +0 -0
- ftalgo-0.1.0/python/ftalgo/chem/basis.py +150 -0
- ftalgo-0.1.0/python/ftalgo/chem/lih.py +144 -0
- ftalgo-0.1.0/python/ftalgo/chem/qubit.py +269 -0
- ftalgo-0.1.0/python/ftalgo/chem/scf.py +85 -0
- ftalgo-0.1.0/python/ftalgo/chem_lih.py +16 -0
- ftalgo-0.1.0/python/ftalgo/circuit.py +243 -0
- ftalgo-0.1.0/python/ftalgo/engine.py +114 -0
- ftalgo-0.1.0/python/ftalgo/estimate.py +194 -0
- ftalgo-0.1.0/python/ftalgo/experiment.py +96 -0
- ftalgo-0.1.0/python/ftalgo/phase.py +68 -0
- ftalgo-0.1.0/python/ftalgo/qiskit_bridge.py +112 -0
- ftalgo-0.1.0/python/ftalgo/qpe.py +174 -0
- ftalgo-0.1.0/python/ftalgo/revsim.py +73 -0
- ftalgo-0.1.0/python/ftalgo/scale.py +200 -0
- ftalgo-0.1.0/python/ftalgo/schedule.py +261 -0
- ftalgo-0.1.0/python/ftalgo/sensitivity.py +246 -0
- ftalgo-0.1.0/python/ftalgo/shor.py +181 -0
- ftalgo-0.1.0/python/ftalgo/synth.py +133 -0
- ftalgo-0.1.0/src/batch.rs +216 -0
- ftalgo-0.1.0/src/complex.rs +97 -0
- ftalgo-0.1.0/src/dense.rs +152 -0
- ftalgo-0.1.0/src/exec.rs +347 -0
- ftalgo-0.1.0/src/gates.rs +222 -0
- ftalgo-0.1.0/src/lib.rs +28 -0
- ftalgo-0.1.0/src/noise.rs +384 -0
- ftalgo-0.1.0/src/program.rs +456 -0
- ftalgo-0.1.0/src/python.rs +131 -0
- ftalgo-0.1.0/src/rng.rs +89 -0
- ftalgo-0.1.0/src/sparse.rs +319 -0
- ftalgo-0.1.0/src/state.rs +186 -0
- ftalgo-0.1.0/src/wasm.rs +137 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
rust:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- uses: actions/checkout@v4
|
|
12
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
13
|
+
with:
|
|
14
|
+
targets: wasm32-unknown-unknown
|
|
15
|
+
- run: cargo test --lib --features parallel
|
|
16
|
+
- run: cargo build --release --target wasm32-unknown-unknown --lib
|
|
17
|
+
- uses: actions/setup-node@v4
|
|
18
|
+
with:
|
|
19
|
+
node-version: 22
|
|
20
|
+
- uses: actions/setup-python@v5
|
|
21
|
+
with:
|
|
22
|
+
python-version: "3.13"
|
|
23
|
+
- name: Python module for the WebAssembly comparison
|
|
24
|
+
run: |
|
|
25
|
+
python -m venv .venv
|
|
26
|
+
.venv/bin/pip install -q maturin numpy
|
|
27
|
+
.venv/bin/maturin build --release --out dist -q
|
|
28
|
+
.venv/bin/python - <<'PY'
|
|
29
|
+
import glob, shutil, zipfile
|
|
30
|
+
whl = glob.glob("dist/ftalgo-*.whl")[0]
|
|
31
|
+
with zipfile.ZipFile(whl) as z:
|
|
32
|
+
name = [n for n in z.namelist() if n.startswith("ftalgo/_ftsim")][0]
|
|
33
|
+
with z.open(name) as src, open("python/" + name, "wb") as dst:
|
|
34
|
+
shutil.copyfileobj(src, dst)
|
|
35
|
+
PY
|
|
36
|
+
cp target/wasm32-unknown-unknown/release/ftsim.wasm site/wasm/ftsim.wasm
|
|
37
|
+
PYTHONPATH=python node tools/wasm-smoke.mjs
|
|
38
|
+
|
|
39
|
+
python:
|
|
40
|
+
strategy:
|
|
41
|
+
matrix:
|
|
42
|
+
os: [ubuntu-latest, macos-latest]
|
|
43
|
+
runs-on: ${{ matrix.os }}
|
|
44
|
+
steps:
|
|
45
|
+
- uses: actions/checkout@v4
|
|
46
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
47
|
+
- uses: actions/setup-python@v5
|
|
48
|
+
with:
|
|
49
|
+
python-version: "3.13"
|
|
50
|
+
- name: Build the engine and install the test dependencies
|
|
51
|
+
run: |
|
|
52
|
+
pip install -q maturin numpy scipy matplotlib pytest hypothesis mpmath pygridsynth \
|
|
53
|
+
stabilizer-qec stim pymatching qiskit qiskit-aer pyscf
|
|
54
|
+
maturin build --release --out dist -q
|
|
55
|
+
python - <<'PY'
|
|
56
|
+
import glob, shutil, zipfile
|
|
57
|
+
whl = glob.glob("dist/ftalgo-*.whl")[0]
|
|
58
|
+
with zipfile.ZipFile(whl) as z:
|
|
59
|
+
name = [n for n in z.namelist() if n.startswith("ftalgo/_ftsim")][0]
|
|
60
|
+
with z.open(name) as src, open("python/" + name, "wb") as dst:
|
|
61
|
+
shutil.copyfileobj(src, dst)
|
|
62
|
+
PY
|
|
63
|
+
- run: python -m pytest -q tests
|
|
64
|
+
- run: python tools/readme_tables.py --check
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# The algorithm grid (tools/grid.py) under a chosen calibration, run by hand
|
|
2
|
+
# (Actions → Algorithm grid → Run workflow). One job plans and builds the engine, up to
|
|
3
|
+
# 256 jobs each run a share of the chunks, and a last job merges them and commits the
|
|
4
|
+
# chunks and the merged results to the data-only branch grid-results:
|
|
5
|
+
#
|
|
6
|
+
# grid-results/parts/ one JSON per chunk
|
|
7
|
+
# grid-results/<out>/ one JSON per configuration, laid out like data/results/
|
|
8
|
+
#
|
|
9
|
+
# Run it again after a partial run (a job past the time limit, a cancelled run): the plan
|
|
10
|
+
# skips every chunk already on grid-results, so only the missing ones run.
|
|
11
|
+
name: Algorithm grid
|
|
12
|
+
|
|
13
|
+
on:
|
|
14
|
+
workflow_dispatch:
|
|
15
|
+
inputs:
|
|
16
|
+
model:
|
|
17
|
+
description: Fitted model
|
|
18
|
+
default: data/calibration/model_mr.json
|
|
19
|
+
out:
|
|
20
|
+
description: Directory for the merged results (on grid-results)
|
|
21
|
+
default: results_mr
|
|
22
|
+
jobs:
|
|
23
|
+
description: Number of jobs
|
|
24
|
+
default: "60"
|
|
25
|
+
|
|
26
|
+
permissions:
|
|
27
|
+
contents: write
|
|
28
|
+
|
|
29
|
+
jobs:
|
|
30
|
+
plan:
|
|
31
|
+
runs-on: ubuntu-latest
|
|
32
|
+
outputs:
|
|
33
|
+
jobs: ${{ steps.plan.outputs.jobs }}
|
|
34
|
+
steps:
|
|
35
|
+
- uses: actions/checkout@v4
|
|
36
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
37
|
+
- uses: actions/setup-python@v5
|
|
38
|
+
with:
|
|
39
|
+
python-version: "3.13"
|
|
40
|
+
- name: Build the engine
|
|
41
|
+
run: |
|
|
42
|
+
pip install -q maturin numpy scipy mpmath pygridsynth pyscf
|
|
43
|
+
maturin build --release --out dist -q
|
|
44
|
+
python - <<'PY'
|
|
45
|
+
import glob, shutil, zipfile
|
|
46
|
+
whl = glob.glob("dist/ftalgo-*.whl")[0]
|
|
47
|
+
with zipfile.ZipFile(whl) as z:
|
|
48
|
+
name = [n for n in z.namelist() if n.startswith("ftalgo/_ftsim")][0]
|
|
49
|
+
with z.open(name) as src, open("python/" + name, "wb") as dst:
|
|
50
|
+
shutil.copyfileobj(src, dst)
|
|
51
|
+
PY
|
|
52
|
+
- name: Chunks already done
|
|
53
|
+
run: |
|
|
54
|
+
mkdir -p done
|
|
55
|
+
if git fetch -q origin grid-results; then
|
|
56
|
+
git archive FETCH_HEAD parts | tar -x -C done || true
|
|
57
|
+
fi
|
|
58
|
+
ls done/parts 2>/dev/null | wc -l
|
|
59
|
+
- id: plan
|
|
60
|
+
name: Plan
|
|
61
|
+
run: |
|
|
62
|
+
python tools/grid.py plan --model "${{ inputs.model }}" --out "${{ inputs.out }}" \
|
|
63
|
+
--jobs "${{ inputs.jobs }}" --parts done/parts > plan.json
|
|
64
|
+
python -c "import json; print('jobs=' + json.dumps(list(range(len(json.load(open('plan.json'))['jobs'])))))" >> "$GITHUB_OUTPUT"
|
|
65
|
+
- uses: actions/upload-artifact@v4
|
|
66
|
+
with:
|
|
67
|
+
name: plan
|
|
68
|
+
path: |
|
|
69
|
+
plan.json
|
|
70
|
+
python/ftalgo/_ftsim*
|
|
71
|
+
|
|
72
|
+
run:
|
|
73
|
+
needs: plan
|
|
74
|
+
if: needs.plan.outputs.jobs != '[]'
|
|
75
|
+
runs-on: ubuntu-latest
|
|
76
|
+
timeout-minutes: 350
|
|
77
|
+
strategy:
|
|
78
|
+
fail-fast: false
|
|
79
|
+
# Leave two of the account's 20 concurrent jobs free, so CI and Pages
|
|
80
|
+
# deploys in other repositories are not queued behind the grid.
|
|
81
|
+
max-parallel: 18
|
|
82
|
+
matrix:
|
|
83
|
+
job: ${{ fromJson(needs.plan.outputs.jobs) }}
|
|
84
|
+
steps:
|
|
85
|
+
- uses: actions/checkout@v4
|
|
86
|
+
- uses: actions/setup-python@v5
|
|
87
|
+
with:
|
|
88
|
+
python-version: "3.13"
|
|
89
|
+
- run: pip install -q numpy scipy mpmath pygridsynth pyscf
|
|
90
|
+
- uses: actions/download-artifact@v4
|
|
91
|
+
with:
|
|
92
|
+
name: plan
|
|
93
|
+
- name: Run this job's chunks
|
|
94
|
+
# Stop short of the job limit so the chunks finished so far are still uploaded.
|
|
95
|
+
continue-on-error: true
|
|
96
|
+
run: timeout 330m python tools/grid.py run --plan plan.json --job ${{ matrix.job }} --parts parts
|
|
97
|
+
- uses: actions/upload-artifact@v4
|
|
98
|
+
if: always()
|
|
99
|
+
with:
|
|
100
|
+
name: parts-${{ matrix.job }}
|
|
101
|
+
path: parts/*.json
|
|
102
|
+
if-no-files-found: ignore
|
|
103
|
+
|
|
104
|
+
collect:
|
|
105
|
+
needs: [plan, run]
|
|
106
|
+
if: always() && needs.plan.result == 'success'
|
|
107
|
+
runs-on: ubuntu-latest
|
|
108
|
+
steps:
|
|
109
|
+
- uses: actions/checkout@v4
|
|
110
|
+
- uses: actions/setup-python@v5
|
|
111
|
+
with:
|
|
112
|
+
python-version: "3.13"
|
|
113
|
+
- run: pip install -q numpy scipy
|
|
114
|
+
- uses: actions/download-artifact@v4
|
|
115
|
+
with:
|
|
116
|
+
name: plan
|
|
117
|
+
- uses: actions/download-artifact@v4
|
|
118
|
+
with:
|
|
119
|
+
pattern: parts-*
|
|
120
|
+
path: new-parts
|
|
121
|
+
merge-multiple: true
|
|
122
|
+
- name: Merge and commit to grid-results
|
|
123
|
+
run: |
|
|
124
|
+
git config user.name "github-actions[bot]"
|
|
125
|
+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
126
|
+
if git fetch -q origin grid-results; then
|
|
127
|
+
git worktree add -q ../res FETCH_HEAD
|
|
128
|
+
git -C ../res checkout -q -B grid-results
|
|
129
|
+
else
|
|
130
|
+
git worktree add -q --detach ../res
|
|
131
|
+
git -C ../res checkout -q --orphan grid-results
|
|
132
|
+
git -C ../res rm -rfq .
|
|
133
|
+
fi
|
|
134
|
+
mkdir -p ../res/parts
|
|
135
|
+
cp new-parts/*.json ../res/parts/ 2>/dev/null || true
|
|
136
|
+
cp plan.json ../res/plan.json
|
|
137
|
+
python tools/grid.py merge --plan plan.json --parts ../res/parts --out "../res/${{ inputs.out }}" | tee merge.txt
|
|
138
|
+
cd ../res
|
|
139
|
+
git add -A
|
|
140
|
+
git commit -q -m "Algorithm grid: $(cat "$GITHUB_WORKSPACE/merge.txt")" -m "model ${{ inputs.model }}, run ${{ github.run_id }}" || echo "nothing new"
|
|
141
|
+
git push -q origin grid-results
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name: Deploy Pages
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: ["master"]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
pages: write
|
|
11
|
+
id-token: write
|
|
12
|
+
|
|
13
|
+
concurrency:
|
|
14
|
+
group: "pages"
|
|
15
|
+
cancel-in-progress: false
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
deploy:
|
|
19
|
+
environment:
|
|
20
|
+
name: github-pages
|
|
21
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
steps:
|
|
24
|
+
- name: Checkout
|
|
25
|
+
uses: actions/checkout@v4
|
|
26
|
+
- name: Setup Pages
|
|
27
|
+
uses: actions/configure-pages@v5
|
|
28
|
+
- name: Upload artifact
|
|
29
|
+
uses: actions/upload-pages-artifact@v3
|
|
30
|
+
with:
|
|
31
|
+
path: 'site'
|
|
32
|
+
- name: Deploy to GitHub Pages
|
|
33
|
+
id: deployment
|
|
34
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Wheels for PyPI, built on a version tag (v*) or by hand.
|
|
2
|
+
#
|
|
3
|
+
# Building and the smoke test run anywhere. Publishing runs only on a tag, by PyPI's trusted
|
|
4
|
+
# publishing: the PyPI project ftalgo trusts this repository's workflow "wheels.yml" in
|
|
5
|
+
# environment "pypi". After publishing, the job creates the GitHub Release for the tag, with the
|
|
6
|
+
# wheels attached; Zenodo archives each release and gives it a DOI.
|
|
7
|
+
name: Wheels
|
|
8
|
+
|
|
9
|
+
on:
|
|
10
|
+
push:
|
|
11
|
+
tags: ["v*"]
|
|
12
|
+
workflow_dispatch:
|
|
13
|
+
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
# One abi3 wheel per platform serves every CPython from 3.9. Each build first copies the fitted
|
|
19
|
+
# model and the rotation cache into the package (tools/bundle_data.sh): an installed ftalgo has
|
|
20
|
+
# no data/ directory.
|
|
21
|
+
linux:
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
strategy:
|
|
24
|
+
matrix:
|
|
25
|
+
target: [x86_64, aarch64]
|
|
26
|
+
libc: [auto, musllinux_1_2]
|
|
27
|
+
steps:
|
|
28
|
+
- uses: actions/checkout@v5
|
|
29
|
+
- run: sh tools/bundle_data.sh
|
|
30
|
+
- uses: PyO3/maturin-action@v1
|
|
31
|
+
with:
|
|
32
|
+
target: ${{ matrix.target }}
|
|
33
|
+
args: --out dist
|
|
34
|
+
manylinux: ${{ matrix.libc == 'auto' && matrix.target == 'aarch64' && '2_28' || matrix.libc }}
|
|
35
|
+
- uses: actions/upload-artifact@v4
|
|
36
|
+
with:
|
|
37
|
+
name: wheels-linux-${{ matrix.target }}-${{ matrix.libc }}
|
|
38
|
+
path: dist
|
|
39
|
+
|
|
40
|
+
macos:
|
|
41
|
+
runs-on: macos-latest
|
|
42
|
+
steps:
|
|
43
|
+
- uses: actions/checkout@v5
|
|
44
|
+
- run: sh tools/bundle_data.sh
|
|
45
|
+
- uses: PyO3/maturin-action@v1
|
|
46
|
+
with:
|
|
47
|
+
target: universal2-apple-darwin
|
|
48
|
+
args: --out dist
|
|
49
|
+
- uses: actions/upload-artifact@v4
|
|
50
|
+
with:
|
|
51
|
+
name: wheels-macos
|
|
52
|
+
path: dist
|
|
53
|
+
|
|
54
|
+
windows:
|
|
55
|
+
runs-on: windows-latest
|
|
56
|
+
steps:
|
|
57
|
+
- uses: actions/checkout@v5
|
|
58
|
+
- run: sh tools/bundle_data.sh
|
|
59
|
+
shell: bash
|
|
60
|
+
- uses: actions/setup-python@v6
|
|
61
|
+
with:
|
|
62
|
+
python-version: "3.12"
|
|
63
|
+
- uses: PyO3/maturin-action@v1
|
|
64
|
+
with:
|
|
65
|
+
target: x64
|
|
66
|
+
args: --out dist
|
|
67
|
+
- uses: actions/upload-artifact@v4
|
|
68
|
+
with:
|
|
69
|
+
name: wheels-windows-x64
|
|
70
|
+
path: dist
|
|
71
|
+
|
|
72
|
+
sdist:
|
|
73
|
+
runs-on: ubuntu-latest
|
|
74
|
+
steps:
|
|
75
|
+
- uses: actions/checkout@v5
|
|
76
|
+
- run: sh tools/bundle_data.sh
|
|
77
|
+
- uses: PyO3/maturin-action@v1
|
|
78
|
+
with:
|
|
79
|
+
command: sdist
|
|
80
|
+
args: --out dist
|
|
81
|
+
- uses: actions/upload-artifact@v4
|
|
82
|
+
with:
|
|
83
|
+
name: sdist
|
|
84
|
+
path: dist
|
|
85
|
+
|
|
86
|
+
# The installed wheel, away from the repository, on each operating system.
|
|
87
|
+
smoke:
|
|
88
|
+
needs: [linux, macos, windows]
|
|
89
|
+
strategy:
|
|
90
|
+
matrix:
|
|
91
|
+
include:
|
|
92
|
+
- runner: ubuntu-latest
|
|
93
|
+
artifact: wheels-linux-x86_64-auto
|
|
94
|
+
- runner: macos-latest
|
|
95
|
+
artifact: wheels-macos
|
|
96
|
+
- runner: windows-latest
|
|
97
|
+
artifact: wheels-windows-x64
|
|
98
|
+
runs-on: ${{ matrix.runner }}
|
|
99
|
+
steps:
|
|
100
|
+
- uses: actions/checkout@v5
|
|
101
|
+
- uses: actions/setup-python@v6
|
|
102
|
+
with:
|
|
103
|
+
python-version: "3.13"
|
|
104
|
+
- uses: actions/download-artifact@v4
|
|
105
|
+
with:
|
|
106
|
+
name: ${{ matrix.artifact }}
|
|
107
|
+
path: dist
|
|
108
|
+
- name: Install the wheel and run the smoke test outside the repository
|
|
109
|
+
shell: bash
|
|
110
|
+
run: |
|
|
111
|
+
python -m pip install dist/*.whl
|
|
112
|
+
mkdir -p "$RUNNER_TEMP/smoke" && cp tools/smoke_installed.py "$RUNNER_TEMP/smoke/"
|
|
113
|
+
cd "$RUNNER_TEMP/smoke" && python -I smoke_installed.py
|
|
114
|
+
|
|
115
|
+
publish:
|
|
116
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
117
|
+
needs: [linux, macos, windows, sdist, smoke]
|
|
118
|
+
runs-on: ubuntu-latest
|
|
119
|
+
environment: pypi
|
|
120
|
+
permissions:
|
|
121
|
+
id-token: write
|
|
122
|
+
contents: write
|
|
123
|
+
steps:
|
|
124
|
+
- uses: actions/download-artifact@v4
|
|
125
|
+
with:
|
|
126
|
+
pattern: "*"
|
|
127
|
+
merge-multiple: true
|
|
128
|
+
path: dist
|
|
129
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
130
|
+
- uses: softprops/action-gh-release@v2
|
|
131
|
+
with:
|
|
132
|
+
files: dist/*
|
|
133
|
+
generate_release_notes: true
|
ftalgo-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "ft-algorithms: factoring and chemistry on a simulated fault-tolerant quantum computer",
|
|
3
|
+
"upload_type": "software",
|
|
4
|
+
"description": "<p>Shor's algorithm (full modular exponentiation, textbook and windowed arithmetic with measurement-based uncomputation) and molecular phase estimation, compiled to Clifford+T+Toffoli and run end to end on a simulated rotated surface-code machine. Every logical error channel (idling, lattice-surgery merges, the surgery CNOT) was measured in circuit-level experiments with stabilizer-qec and checked by a composition test; ftsim, a Rust state-vector simulator stratified by fault count, runs the programs natively, from Python and in the browser. Results are success probabilities against code distance, error budgets, and extrapolations to RSA-2048 and FeMoco compared with published estimates at their authors' own failure budgets, with the memory model's dependence on circuit and noise model measured.</p>",
|
|
5
|
+
"creators": [
|
|
6
|
+
{
|
|
7
|
+
"name": "Sands, Jasper"
|
|
8
|
+
}
|
|
9
|
+
],
|
|
10
|
+
"access_right": "open",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"keywords": [
|
|
13
|
+
"fault-tolerant quantum computing",
|
|
14
|
+
"surface code",
|
|
15
|
+
"lattice surgery",
|
|
16
|
+
"resource estimation",
|
|
17
|
+
"Shor's algorithm",
|
|
18
|
+
"quantum phase estimation",
|
|
19
|
+
"magic states"
|
|
20
|
+
],
|
|
21
|
+
"related_identifiers": [
|
|
22
|
+
{
|
|
23
|
+
"identifier": "https://github.com/Jaspersands/ft-algorithms",
|
|
24
|
+
"relation": "isSupplementTo",
|
|
25
|
+
"scheme": "url"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"identifier": "https://ft.jaspersands.com/report/report.html",
|
|
29
|
+
"relation": "isDocumentedBy",
|
|
30
|
+
"scheme": "url"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"identifier": "10.5281/zenodo.23212075",
|
|
34
|
+
"relation": "requires",
|
|
35
|
+
"scheme": "doi"
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
message: "If you use ft-algorithms or its results, please cite it as below."
|
|
3
|
+
title: "ft-algorithms: factoring and chemistry on a simulated fault-tolerant quantum computer"
|
|
4
|
+
abstract: >-
|
|
5
|
+
Shor's algorithm (full modular exponentiation, textbook and windowed arithmetic) and molecular
|
|
6
|
+
phase estimation compiled to Clifford+T+Toffoli and run end to end on a simulated rotated
|
|
7
|
+
surface-code machine whose logical error channels (idling, lattice-surgery merges, the surgery
|
|
8
|
+
CNOT) were measured by circuit-level simulation with stabilizer-qec and checked by a composition
|
|
9
|
+
test; ftsim, a Rust state-vector simulator stratified by fault count, runs the programs natively,
|
|
10
|
+
from Python and in the browser. Results are success probabilities against code distance, error
|
|
11
|
+
budgets, and extrapolations to RSA-2048 and FeMoco compared with published estimates.
|
|
12
|
+
type: software
|
|
13
|
+
authors:
|
|
14
|
+
- given-names: Jasper
|
|
15
|
+
family-names: Sands
|
|
16
|
+
license: MIT
|
|
17
|
+
version: 0.1.0
|
|
18
|
+
repository-code: "https://github.com/Jaspersands/ft-algorithms"
|
|
19
|
+
url: "https://ft.jaspersands.com"
|
|
20
|
+
keywords:
|
|
21
|
+
- fault-tolerant quantum computing
|
|
22
|
+
- surface code
|
|
23
|
+
- lattice surgery
|
|
24
|
+
- resource estimation
|
|
25
|
+
- Shor's algorithm
|
|
26
|
+
- quantum phase estimation
|
|
27
|
+
references:
|
|
28
|
+
- type: software
|
|
29
|
+
title: "stabilizer-qec: a quantum error-correction simulator and decoder"
|
|
30
|
+
authors:
|
|
31
|
+
- given-names: Jasper
|
|
32
|
+
family-names: Sands
|
|
33
|
+
doi: 10.5281/zenodo.23212075
|
ftalgo-0.1.0/CNAME
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ft.jaspersands.com
|
ftalgo-0.1.0/Cargo.lock
ADDED
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
# This file is automatically @generated by Cargo.
|
|
2
|
+
# It is not intended for manual editing.
|
|
3
|
+
version = 4
|
|
4
|
+
|
|
5
|
+
[[package]]
|
|
6
|
+
name = "crossbeam-deque"
|
|
7
|
+
version = "0.8.8"
|
|
8
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9
|
+
checksum = "622f3fc73690be383c7214310406f28a90e6edeadc3cea882f9d71e495b9711a"
|
|
10
|
+
dependencies = [
|
|
11
|
+
"crossbeam-epoch",
|
|
12
|
+
"crossbeam-utils",
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
[[package]]
|
|
16
|
+
name = "crossbeam-epoch"
|
|
17
|
+
version = "0.9.21"
|
|
18
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
19
|
+
checksum = "dc74980687109a3b14c72fd458107bf0baa1da1a1a805e178d15501ba9b86d9d"
|
|
20
|
+
dependencies = [
|
|
21
|
+
"crossbeam-utils",
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
[[package]]
|
|
25
|
+
name = "crossbeam-utils"
|
|
26
|
+
version = "0.8.23"
|
|
27
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
28
|
+
checksum = "a31eee39dddec8330830986fcd7625edb5a24ec90ea038215273bbc3adb08ac6"
|
|
29
|
+
|
|
30
|
+
[[package]]
|
|
31
|
+
name = "either"
|
|
32
|
+
version = "1.18.0"
|
|
33
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
34
|
+
checksum = "252afb9ae5eaa683babdc6a068b3f5726eb19e05070c731f9b2a23a7c3e8ed34"
|
|
35
|
+
|
|
36
|
+
[[package]]
|
|
37
|
+
name = "ftsim"
|
|
38
|
+
version = "0.1.0"
|
|
39
|
+
dependencies = [
|
|
40
|
+
"pyo3",
|
|
41
|
+
"rayon",
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
[[package]]
|
|
45
|
+
name = "heck"
|
|
46
|
+
version = "0.5.0"
|
|
47
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
48
|
+
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
|
49
|
+
|
|
50
|
+
[[package]]
|
|
51
|
+
name = "libc"
|
|
52
|
+
version = "0.2.190"
|
|
53
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
54
|
+
checksum = "ce5d3ddc6d3fa000eb1536d85e147bfe31aacaba692ed6a876f95cb7c855be78"
|
|
55
|
+
|
|
56
|
+
[[package]]
|
|
57
|
+
name = "once_cell"
|
|
58
|
+
version = "1.21.4"
|
|
59
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
60
|
+
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
|
|
61
|
+
|
|
62
|
+
[[package]]
|
|
63
|
+
name = "portable-atomic"
|
|
64
|
+
version = "1.15.0"
|
|
65
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
66
|
+
checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85"
|
|
67
|
+
|
|
68
|
+
[[package]]
|
|
69
|
+
name = "proc-macro2"
|
|
70
|
+
version = "1.0.107"
|
|
71
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
72
|
+
checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
|
|
73
|
+
dependencies = [
|
|
74
|
+
"unicode-ident",
|
|
75
|
+
]
|
|
76
|
+
|
|
77
|
+
[[package]]
|
|
78
|
+
name = "pyo3"
|
|
79
|
+
version = "0.29.3"
|
|
80
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
81
|
+
checksum = "700d18fa267b73b9b521fd7e13580e2f446916f176cacee1ab63fcc8191f1655"
|
|
82
|
+
dependencies = [
|
|
83
|
+
"libc",
|
|
84
|
+
"once_cell",
|
|
85
|
+
"portable-atomic",
|
|
86
|
+
"pyo3-build-config",
|
|
87
|
+
"pyo3-ffi",
|
|
88
|
+
"pyo3-macros",
|
|
89
|
+
]
|
|
90
|
+
|
|
91
|
+
[[package]]
|
|
92
|
+
name = "pyo3-build-config"
|
|
93
|
+
version = "0.29.3"
|
|
94
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
95
|
+
checksum = "7b3fc0c4d08f6bb10e71fe39dfb9e2f59c6eb6854e22ec8092f50c69a4499adb"
|
|
96
|
+
dependencies = [
|
|
97
|
+
"target-lexicon",
|
|
98
|
+
]
|
|
99
|
+
|
|
100
|
+
[[package]]
|
|
101
|
+
name = "pyo3-ffi"
|
|
102
|
+
version = "0.29.3"
|
|
103
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
104
|
+
checksum = "dfc0b8e19df29aad7086cf977bb0c2a2f143e30567eb113e9cf72b62ca698330"
|
|
105
|
+
dependencies = [
|
|
106
|
+
"libc",
|
|
107
|
+
"pyo3-build-config",
|
|
108
|
+
]
|
|
109
|
+
|
|
110
|
+
[[package]]
|
|
111
|
+
name = "pyo3-macros"
|
|
112
|
+
version = "0.29.3"
|
|
113
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
114
|
+
checksum = "6100e8a4b5eba53afaa5ed078364851a0b2499c553a44c31026b929049b49dc6"
|
|
115
|
+
dependencies = [
|
|
116
|
+
"proc-macro2",
|
|
117
|
+
"pyo3-macros-backend",
|
|
118
|
+
"quote",
|
|
119
|
+
"syn",
|
|
120
|
+
]
|
|
121
|
+
|
|
122
|
+
[[package]]
|
|
123
|
+
name = "pyo3-macros-backend"
|
|
124
|
+
version = "0.29.3"
|
|
125
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
126
|
+
checksum = "6143877a16e82b5a727b7127ff4cd86858a24a28d745d72f43e6f227c7b1bdb3"
|
|
127
|
+
dependencies = [
|
|
128
|
+
"heck",
|
|
129
|
+
"proc-macro2",
|
|
130
|
+
"quote",
|
|
131
|
+
"syn",
|
|
132
|
+
]
|
|
133
|
+
|
|
134
|
+
[[package]]
|
|
135
|
+
name = "quote"
|
|
136
|
+
version = "1.0.47"
|
|
137
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
138
|
+
checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
|
|
139
|
+
dependencies = [
|
|
140
|
+
"proc-macro2",
|
|
141
|
+
]
|
|
142
|
+
|
|
143
|
+
[[package]]
|
|
144
|
+
name = "rayon"
|
|
145
|
+
version = "1.12.0"
|
|
146
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
147
|
+
checksum = "fb39b166781f92d482534ef4b4b1b2568f42613b53e5b6c160e24cfbfa30926d"
|
|
148
|
+
dependencies = [
|
|
149
|
+
"either",
|
|
150
|
+
"rayon-core",
|
|
151
|
+
]
|
|
152
|
+
|
|
153
|
+
[[package]]
|
|
154
|
+
name = "rayon-core"
|
|
155
|
+
version = "1.13.0"
|
|
156
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
157
|
+
checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91"
|
|
158
|
+
dependencies = [
|
|
159
|
+
"crossbeam-deque",
|
|
160
|
+
"crossbeam-utils",
|
|
161
|
+
]
|
|
162
|
+
|
|
163
|
+
[[package]]
|
|
164
|
+
name = "syn"
|
|
165
|
+
version = "2.0.119"
|
|
166
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
167
|
+
checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297"
|
|
168
|
+
dependencies = [
|
|
169
|
+
"proc-macro2",
|
|
170
|
+
"quote",
|
|
171
|
+
"unicode-ident",
|
|
172
|
+
]
|
|
173
|
+
|
|
174
|
+
[[package]]
|
|
175
|
+
name = "target-lexicon"
|
|
176
|
+
version = "0.13.5"
|
|
177
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
178
|
+
checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca"
|
|
179
|
+
|
|
180
|
+
[[package]]
|
|
181
|
+
name = "unicode-ident"
|
|
182
|
+
version = "1.0.26"
|
|
183
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
184
|
+
checksum = "d245f478577f809a851594d02313b640fb437e0bb33866753cff937863096954"
|