Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
337 commits
Select commit Hold shift + click to select a range
21e8b3b
changing the dev version number from 0.5.dev1 to 0.5.0.dev1 to be mor…
qciaran Dec 5, 2023
bf396bb
Version bump to fix pypi issue.
ciaranra Dec 6, 2023
703eccb
Bug phir if statement (#27)
qciaran Dec 7, 2023
3dab224
add external phir dependency + remove Python 3.8 + test both required…
qciaran Dec 13, 2023
e98abf3
Added support for qparallel. (#33)
qciaran Dec 13, 2023
a40d0a7
Bug out of order seq (#35)
qciaran Jan 4, 2024
36b423f
Fixing support of PHIR's multi-assignment (#36)
qciaran Jan 5, 2024
24d9f3b
Adding coder owners file
ciaranra Jan 16, 2024
566029d
Fixing code owners file typo
ciaranra Jan 17, 2024
bc7e234
build: add typed marker for pecos
qartik Jan 23, 2024
3a3581f
Initial support for barriers (skips barriers for now). (#38)
qciaran Feb 1, 2024
92e9503
bumping version to 0.5.0.dev7
ciaranra Feb 1, 2024
fb01d5c
Update requirements
ciaranra Feb 1, 2024
ad8f9da
Bumping phir req (#39)
qciaran Feb 1, 2024
2e43d96
Broadening wasmtime req. + simplifying [all] (#42)
qciaran Feb 2, 2024
66ccf04
Add wasmtime support for engines/cvm/wasm (#43)
qciaran Feb 2, 2024
84f15c6
bumping to version 0.5.0.dev9 (#44)
qciaran Feb 5, 2024
e7e4154
Update docs (#47)
qciaran Feb 9, 2024
cec47a4
Feature more simulators (#21)
PabloAndresCQ Mar 4, 2024
387207e
Cumulative development update (#54)
ciaranra Mar 15, 2024
5d10ff9
Bumping version number to 0.5.0.dev10
ciaranra Mar 15, 2024
9398b16
Feat hybrid noise (#60)
ciaranra Apr 29, 2024
0cebfca
version bump 0.5.0.dev11
ciaranra Apr 29, 2024
54b3eae
Adding specific error messaging and enforced maximum duration to WASM…
nealerickson-qtm May 15, 2024
5aaa88c
64 bit signed arithmetic support (#57)
qartik May 16, 2024
9450ba3
cuStateVec bugfixes and slight refactor (#64)
PabloAndresCQ May 24, 2024
6db72ec
Bumping version number to 0.6.0.dev3 (#65)
ciaranra May 24, 2024
c533b7c
Adding a numpy-based basic statevector simulator for more exhaustive …
PabloAndresCQ May 24, 2024
9fa2342
[feature] Adding support for QuEST and Qulacs statevector simulators …
PabloAndresCQ Aug 5, 2024
4643434
[feature] Adding support for MPS simulation (#63)
PabloAndresCQ Aug 13, 2024
8c16ea1
Bumping version number to 0.6.0.dev4
ciaranra Aug 21, 2024
e8a683d
[Bugfixes] Solving some issues for qemulator MPS release (#73)
PabloAndresCQ Sep 5, 2024
6a2175d
Bump to 0.6.0.dev5
ciaranra Sep 6, 2024
67ee616
Feat qeclib steane (#75)
qciaran Sep 12, 2024
64bb9f3
Typo fixed in the implementation of `p` and `tdg` in `steane_class.py…
PabloAndresCQ Sep 13, 2024
77d7d04
fix Steane.prep_tdg_plus_state (#78)
perlinm Sep 20, 2024
050693b
Fixing measurement noise causing only 0 measurement
ciaranra Oct 1, 2024
5344fd7
adding llvmlite requirement and gen qir file
peter-campora Oct 10, 2024
78b37fc
adding llvmlite requirement and gen qir file
peter-campora Oct 10, 2024
fc81678
starting with basic structure for QIR support
peter-campora Oct 17, 2024
ae37bf4
starting with basic structure for QIR support
peter-campora Oct 17, 2024
79a323c
adding generator base class
peter-campora Oct 17, 2024
f074836
adding generator base class
peter-campora Oct 17, 2024
c2bd9e6
Some progress, circular refs causing issues
nealerickson-qtm Oct 18, 2024
635d49c
Some progress, circular refs causing issues
nealerickson-qtm Oct 18, 2024
7bc75ae
more stuff
nealerickson-qtm Oct 18, 2024
2645023
more stuff
nealerickson-qtm Oct 18, 2024
7a01ae9
reworking generation workflow
nealerickson-qtm Oct 18, 2024
4e0a2e6
reworking generation workflow
nealerickson-qtm Oct 18, 2024
0ccb572
changes towards adding measurement support
peter-campora Oct 21, 2024
0ebf636
changes towards adding measurement support
peter-campora Oct 21, 2024
bbb5799
Merge branch 'slr_qir' of ssh://github.com/PECOS-packages/PECOS into …
peter-campora Oct 21, 2024
d4c4ed2
Merge branch 'slr_qir' of ssh://github.com/PECOS-packages/PECOS into …
peter-campora Oct 21, 2024
298c46f
cx gate
nealerickson-qtm Oct 21, 2024
58ad708
cx gate
nealerickson-qtm Oct 21, 2024
5a94a58
Merge branch 'slr_qir' of ssh://github.com/PECOS-packages/PECOS into …
peter-campora Oct 21, 2024
3aa3d7e
Merge branch 'slr_qir' of ssh://github.com/PECOS-packages/PECOS into …
peter-campora Oct 21, 2024
a7fab38
syntax fixes, test runs
nealerickson-qtm Oct 21, 2024
2a15af3
syntax fixes, test runs
nealerickson-qtm Oct 21, 2024
4b047f0
Merge branch 'slr_qir' of ssh://github.com/PECOS-packages/PECOS into …
peter-campora Oct 21, 2024
f3df077
Merge branch 'slr_qir' of ssh://github.com/PECOS-packages/PECOS into …
peter-campora Oct 21, 2024
a2a3cb1
Measure supported
peter-campora Oct 22, 2024
c37ddbb
Measure supported
peter-campora Oct 22, 2024
65c564b
fleshing out documentation bettter
peter-campora Oct 22, 2024
83ebdfc
fleshing out documentation bettter
peter-campora Oct 22, 2024
2043cd6
adding result tagging
peter-campora Oct 25, 2024
358082c
adding result tagging
peter-campora Oct 25, 2024
3f51464
cleanup dead code
peter-campora Oct 25, 2024
45f9567
cleanup dead code
peter-campora Oct 25, 2024
171e717
working
nealerickson-qtm Oct 25, 2024
92ba363
working
nealerickson-qtm Oct 25, 2024
67f727d
clean up results handling into another method, slightly
peter-campora Oct 25, 2024
be8ee9e
clean up results handling into another method, slightly
peter-campora Oct 25, 2024
d6d829b
refactored into easier method
nealerickson-qtm Oct 25, 2024
e1d4521
refactored into easier method
nealerickson-qtm Oct 25, 2024
81ddc85
Merge branch 'slr_qir' into nje_slr_qir
nealerickson-qtm Oct 25, 2024
da4eadf
Merge branch 'slr_qir' into nje_slr_qir
nealerickson-qtm Oct 25, 2024
e39b2c0
merged Neal's changes
peter-campora Oct 25, 2024
42de223
merged Neal's changes
peter-campora Oct 25, 2024
f7e8429
Result class working
nealerickson-qtm Oct 25, 2024
bb5b976
Result class working
nealerickson-qtm Oct 25, 2024
183f75d
correct code generation for bell example
peter-campora Oct 25, 2024
9562295
correct code generation for bell example
peter-campora Oct 25, 2024
7337caf
Merge branch 'slr_qir' into nje_slr_qir
nealerickson-qtm Oct 25, 2024
d6577d7
Merge branch 'slr_qir' into nje_slr_qir
nealerickson-qtm Oct 25, 2024
f009454
progress
nealerickson-qtm Nov 19, 2024
7a5bb99
progress
nealerickson-qtm Nov 19, 2024
3bfd267
fixing icmp usage; conditionals
nealerickson-qtm Nov 19, 2024
08b942a
fixing icmp usage; conditionals
nealerickson-qtm Nov 19, 2024
7e73644
updates
nealerickson-qtm Nov 19, 2024
9439aea
updates
nealerickson-qtm Nov 19, 2024
5907cc4
test changes
peter-campora Nov 19, 2024
a725bce
test changes
peter-campora Nov 19, 2024
7f3b573
Merge branch 'nje_slr_qir' of ssh://github.com/PECOS-packages/PECOS i…
peter-campora Nov 19, 2024
895724d
Merge branch 'nje_slr_qir' of ssh://github.com/PECOS-packages/PECOS i…
peter-campora Nov 19, 2024
8df7f25
fixed comparison rhs code
peter-campora Nov 19, 2024
48fe91b
fixed comparison rhs code
peter-campora Nov 19, 2024
e9865a3
Fixing If block back to standard
nealerickson-qtm Nov 19, 2024
7c44dd5
Fixing If block back to standard
nealerickson-qtm Nov 19, 2024
f6e8b6c
Adding gate decomposition, handling for adj in QIR
nealerickson-qtm Nov 20, 2024
23b631c
Adding gate decomposition, handling for adj in QIR
nealerickson-qtm Nov 20, 2024
9769a07
Reworking decomposition, added barrier
nealerickson-qtm Nov 21, 2024
0fa1bd9
First stage of converting old general color code construction to new …
ciaranra Dec 7, 2024
54c72a2
Add code block class
ciaranra Dec 7, 2024
da94b62
Finishing out gates
nealerickson-qtm Dec 9, 2024
f94dd47
Merge branch 'development' into feat/color488
ciaranra Dec 9, 2024
0099730
Move qeclib/color488 to correct new place
ciaranra Dec 9, 2024
f592e82
Merge branch 'development' into feat/color488
ciaranra Dec 10, 2024
f2ef4a3
Merge branch 'development' into feat/color488
ciaranra Dec 14, 2024
b8207ca
refactoring Steane and Qubit to classmethod
ciaranra Dec 17, 2024
305075c
Merge branch 'development' into feat/slr-class
ciaranra Dec 17, 2024
51012d2
merge conflict resolution
peter-campora Dec 17, 2024
34bb330
Merge branch 'development' into feat/color488
ciaranra Dec 23, 2024
9c9fd04
new surface stub
ciaranra Dec 23, 2024
9f8640c
Add initial surface code plotting for new qeclib
ciaranra Dec 25, 2024
aed1b4e
Merge branch 'development' into feat/slr-class
ciaranra Dec 25, 2024
d0c7345
Adding license notice
ciaranra Dec 25, 2024
42f2100
polishing fig gen
ciaranra Dec 25, 2024
c4f647c
polish mz() gate
ciaranra Dec 25, 2024
d352bd1
Merge branch 'feat/slr-class' into feat/surf4444rot
ciaranra Dec 25, 2024
4ade28a
Merge branch 'feat/slr-class' into feat/surf4444rot
ciaranra Dec 25, 2024
d843e84
polish mz()
ciaranra Dec 25, 2024
120b8df
Merge branch 'feat/slr-class' into feat/surf4444rot
ciaranra Dec 25, 2024
cfd1ff2
Switching to *qargs for PhysicalQubits
ciaranra Dec 25, 2024
f0ddfa0
Merge branch 'feat/slr-class' into feat/surf4444rot
ciaranra Dec 25, 2024
0f3f0ec
refactoring surface code
ciaranra Dec 27, 2024
3d78b0e
Merge branch 'feat/surf4444rot' into feat/more-qeclib
ciaranra Dec 27, 2024
db2a55e
Merge branch 'feat/more-qeclib' into feat/slr-class
ciaranra Dec 27, 2024
7bc487a
Merge branch 'feat/color488' into feat/more-qeclib
ciaranra Dec 27, 2024
ad50337
linting
ciaranra Dec 27, 2024
191ba2d
Refactoring surface code and visualization
ciaranra Dec 27, 2024
20912bd
Added direct surface patch visualization
ciaranra Dec 28, 2024
75220c8
refactoring to smaller files
ciaranra Dec 28, 2024
e164ccb
Simplifying code
ciaranra Dec 28, 2024
c4b026b
further simplification/refactoring
ciaranra Dec 28, 2024
0c53ab0
test added + small polishing
ciaranra Dec 28, 2024
967e7ab
Improved flexibility of visualization
ciaranra Dec 28, 2024
2ebcfe0
Small polishing of visualization
ciaranra Dec 30, 2024
121424d
Merge branch 'development' into feat/more-qeclib
ciaranra Jan 2, 2025
0608a07
Rough draft implementation of classical operator support is added. Wi…
peter-campora Jan 8, 2025
b09350f
First binary operator test passed.
peter-campora Jan 8, 2025
64a5206
Compiled steane successfully
peter-campora Jan 8, 2025
fb46c9c
Merge branch 'development' into feat/more-qeclib
ciaranra Jan 12, 2025
0c18833
Hopefully merged development correctly.
peter-campora Feb 3, 2025
a5f7f23
Merged successfully
peter-campora Feb 3, 2025
7feb82f
Fixed some linting
peter-campora Feb 3, 2025
3ff93a9
ruff unsafe fixes applied
peter-campora Feb 3, 2025
51958fb
Linter happy :)
peter-campora Feb 3, 2025
f821b3d
Removing failing asserts from QIR tests
peter-campora Feb 3, 2025
ccbb535
Precommit happy after tests use qir variable
peter-campora Feb 3, 2025
6a69cf1
Trying to remove circular QReg import in gen_qasm.py.
peter-campora Feb 3, 2025
a0efb67
Hopefully getting QIR testing supported in CI :D
peter-campora Feb 3, 2025
563c701
Ruff ruff
peter-campora Feb 3, 2025
f35a172
Let's try to install LLVM in workflows, surely nothing could go wrong.
peter-campora Feb 3, 2025
7ab4d8c
Things went wrong.
peter-campora Feb 3, 2025
086aa59
Weird yaml spacing issues in emacs
peter-campora Feb 3, 2025
c6a8d34
PyCharm any better???
ciaranra Feb 3, 2025
2b5eab8
Github happy now?
ciaranra Feb 3, 2025
fa039ba
Fixing circular import issues
peter-campora Feb 5, 2025
56f5040
Merge branch 'slr_qir_classical' of ssh://github.com/PECOS-packages/P…
peter-campora Feb 5, 2025
ded4e85
Black linting fix
peter-campora Feb 5, 2025
6290556
some qasm tests failing but overall fixed many tests
peter-campora Feb 5, 2025
9f29a1e
some qasm tests failing but overall fixed many tests
peter-campora Feb 5, 2025
c0ad7ad
Adding a method to generate bitcode
peter-campora Feb 13, 2025
1e0ce08
Adding SX, SXdg, and SY + fixing a qir test
ciaranra Feb 25, 2025
7b59de2
Introduces CReg size check for QIR + linting
ciaranra Mar 2, 2025
9711a89
Merge branch 'development' into slr_qir_classical
ciaranra Mar 2, 2025
4bf6806
fixing test regex issue
ciaranra Mar 2, 2025
babcdb4
Merge branch 'development' into slr_qir_classical
ciaranra Mar 3, 2025
7ae0fc4
hopefully fixes pecos.slr issue with optional QIR/LLVM
ciaranra Mar 3, 2025
547d216
Making sure the llvm module gets a fresh context each time
peter-campora Mar 7, 2025
25ae8a4
Merge remote-tracking branch 'origin/development' into slr_qir_classical
ciaranra Mar 8, 2025
0d34a47
explicit initalization of llvmlite.binding.initialize on QIR conversi…
peter-campora Mar 10, 2025
6c447b2
Using binding.shutdown() at the end of each compilation to prevent ne…
peter-campora Mar 10, 2025
1bc87e1
Getting permute working for both QASM and QIR (#130)
ciaranra May 3, 2025
a093d39
removed conditional statement in _create_qgate_call focused on unroll…
Jonhas-qtm May 13, 2025
423057d
Merge pull request #137 from PECOS-packages/bugfix/slr_qir_classical_…
peter-campora May 13, 2025
6cf6d8c
Fixing F'd F gates
nealerickson-qtm May 15, 2025
0b43fa9
Commenting decompositions
nealerickson-qtm May 15, 2025
11c93f9
F4dg experiment
nealerickson-qtm May 15, 2025
6f511d7
feel the merge
ciaranra May 17, 2025
8e112b7
fixed RZ call on qir gate mapping
Jonhas-qtm May 19, 2025
c156ad8
Reduce requirements for numpy...
ciaranra May 22, 2025
9a3403e
Removing pyquest as it has been causing some issues...
ciaranra May 22, 2025
5c7159a
Add StateVecRs as a fallback for "state-vector" in Python PECOS.
ciaranra May 22, 2025
e9da908
Python cleanup...
ciaranra May 23, 2025
5393b93
Merge branch 'numpy-req' into python-lint
ciaranra May 23, 2025
e5bc590
More cleaning
ciaranra May 23, 2025
cc8e4f8
More cleaning
ciaranra May 24, 2025
a5a8705
More cleaning
ciaranra May 24, 2025
3617371
More cleaning
ciaranra May 27, 2025
da4d8c3
improved simulation output with formatter
ciaranra Jun 3, 2025
34596cc
Refactor new result code into module
ciaranra Jun 3, 2025
001af5c
Using BitVec as the basic creg data type in pecos-qasm
ciaranra Jun 3, 2025
bbee58e
Simplifying byte_message/
ciaranra Jun 4, 2025
21130af
More cleaning
ciaranra Jun 4, 2025
ee66ea7
Fix QIR testing?
ciaranra Jun 5, 2025
d9b36ff
Simplify the parser for pecos-qasm
ciaranra Jun 5, 2025
232dd50
Adding const folding
ciaranra Jun 6, 2025
1718d50
adding run_qasm_sim to Python
ciaranra Jun 7, 2025
cf1c951
lint
ciaranra Jun 8, 2025
c0c5e99
Merge branch 'python-lint' into polish-qasm
ciaranra Jun 10, 2025
90f4d72
Make lint helping
ciaranra Jun 10, 2025
6c79f5a
Update some docs + cleanup of ByteMessage to use .add_outcomes and .o…
ciaranra Jun 11, 2025
45c6d79
Simplify ByteMessage
ciaranra Jun 11, 2025
8ffcf6c
Update builder pattern Python doc
ciaranra Jun 12, 2025
35b1ddb
Removing biased measurement noise since biased depolarizing noise giv…
ciaranra Jun 12, 2025
c2d3e47
Update p_idle_linear_rate to use validate_non_negative + switched p_i…
ciaranra Jun 12, 2025
e949d91
Add binary output formatting to qasm_sim
ciaranra Jun 12, 2025
fa3da10
lint
ciaranra Jun 12, 2025
bbf723c
Improve qasm_sim Python API
ciaranra Jun 12, 2025
43f256c
Add config to qasm_sim
ciaranra Jun 13, 2025
cc9986e
Fixing some qasm include issues
ciaranra Jun 13, 2025
4655dc7
Fixed issue with quadratic idling sometimes issuing gates with no qubits
PabloAndresCQ Jun 18, 2025
f545a1e
Merge branch 'refactor-n-memory' into slr_qir_classical
ciaranra Jun 23, 2025
962aaa9
Fix permute issue?
ciaranra Jun 23, 2025
0a650ca
Linting
ciaranra Jun 23, 2025
847a306
Improve general noise config
ciaranra Jun 27, 2025
571ef5e
Changed general noise model parameter from p2_idle_quadratic_rate to …
ciaranra Jun 27, 2025
60c39c6
Fixed recursive Permute issue
ciaranra Jun 30, 2025
2b4675f
Refactoring noise configuration for qasm_sim + making noise builders …
ciaranra Jul 1, 2025
24799fe
Added scaling to p_idle_linear_rate (fix #143)
PabloAndresCQ Jul 7, 2025
71604d5
Correcting mistake from previous commit: p_idle_linear_rate needs not…
PabloAndresCQ Jul 7, 2025
a37facd
Fix memory leak in custatevec (#146)
dlucchetti Jul 8, 2025
597324e
RNG Functionality Support (#145)
Jonhas-qtm Jul 8, 2025
04d3f54
Fix `with_p_average` scaling (#148)
PabloAndresCQ Jul 9, 2025
e1f3fd4
Fix naming issues
ciaranra Jul 9, 2025
e1d9398
Qasm wasmtime (#150)
ciaranra Jul 9, 2025
e9254f1
Minimal Rust wrapper for PCG
ciaranra Jul 12, 2025
cfac02b
Add TODO to the rng_model.py
ciaranra Jul 12, 2025
fdda8ea
Renaming clibs/ to clib/ since a library is already a collection of t…
ciaranra Jul 12, 2025
95a6ddb
Fixing more clibs to clib references
ciaranra Jul 12, 2025
ae26acf
Resolving maturin build failure due to not including C files for sdist
ciaranra Jul 12, 2025
2942c70
Remove sdist building for pecos-rslib due to external C source issues…
ciaranra Jul 12, 2025
8ab18ab
Merge branch 'feat/minimal-pcg-wrapper' into refactor-n-memory
ciaranra Jul 13, 2025
2441cdb
Merge remote-tracking branch 'origin/slr_qir_classical' into refactor…
ciaranra Jul 13, 2025
81c082b
Adding external LDPC decoders project support in PECOS
ciaranra Jul 13, 2025
4e1d39f
Making sure conditional error modeling works (#154)
ciaranra Jul 16, 2025
0c49566
Feat/minimal pcg wrapper (#152)
ciaranra Jul 16, 2025
deaa1a3
Merge branch 'dev' into refactor-n-memory
ciaranra Jul 16, 2025
42abfc4
Lint
ciaranra Jul 16, 2025
3b7902c
Fix pecos-rng workflow
ciaranra Jul 16, 2025
84b187b
Update color code
ciaranra Jul 18, 2025
e37a8a5
Polish
ciaranra Jul 18, 2025
cabc9a7
Fix CI
ciaranra Jul 19, 2025
014f206
Lint
ciaranra Jul 19, 2025
92dfd4f
Merge remote-tracking branch 'hubalt/refactor-n-memory' into feat/mor…
ciaranra Jul 19, 2025
4e3ee1f
Merge remote-tracking branch 'hubalt/refactor-n-memory' into feat/mor…
ciaranra Jul 19, 2025
0f358fa
Merge branch 'feat/more-qeclib' into refactor-n-memory
ciaranra Jul 19, 2025
bac696b
Lint
ciaranra Jul 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
90 changes: 29 additions & 61 deletions .github/workflows/python-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,59 +51,6 @@ jobs:
echo "run=false" >> $GITHUB_OUTPUT
fi

build_sdist_pecos_rslib:
needs: check_pr_push
if: |
always() &&
(needs.check_pr_push.result == 'success' && needs.check_pr_push.outputs.run == 'true' || needs.check_pr_push.result == 'skipped') &&
(github.event_name != 'pull_request' || github.event.pull_request.merged == true || github.event.action == 'opened' || github.event.action == 'synchronize')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.sha || github.sha }}

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Remove conflicting README.md
run: |
if [ -f crates/pecos-python/README.md ]; then
mv crates/pecos-python/README.md crates/pecos-python/README.md.bak
echo "Moved conflicting README.md to README.md.bak"
else
echo "No conflicting README.md found"
fi

- name: Build pecos-rslib SDist
uses: PyO3/maturin-action@v1
with:
command: sdist
args: --out dist
working-directory: python/pecos-rslib

- name: Restore README.md
if: always()
run: |
if [ -f crates/pecos-python/README.md.bak ]; then
mv crates/pecos-python/README.md.bak crates/pecos-python/README.md
echo "Restored README.md from backup"
else
echo "No README.md backup found"
fi

- name: Test pecos-rslib SDist
run: |
pip install --force-reinstall --verbose python/pecos-rslib/dist/*.tar.gz
python -c 'import pecos_rslib; print(pecos_rslib.__version__)'

- name: Upload pecos-rslib SDist
uses: actions/upload-artifact@v4
with:
name: sdist-pecos-rslib
path: python/pecos-rslib/dist/*.tar.gz

build_wheels_pecos_rslib:
needs: check_pr_push
Expand Down Expand Up @@ -149,6 +96,15 @@ jobs:
working-directory: python/pecos-rslib
target: ${{ matrix.architecture == 'aarch64' && (matrix.os == 'macos-latest' && 'aarch64-apple-darwin' || 'aarch64-unknown-linux-gnu') || (matrix.os == 'macos-latest' && 'x86_64-apple-darwin' || '') }}
manylinux: auto
before-script-linux: |
if command -v yum &> /dev/null; then
yum install -y openssl-devel
elif command -v apt-get &> /dev/null; then
apt-get update && apt-get install -y libssl-dev pkg-config
else
echo "No supported package manager found"
exit 1
fi

- name: Restore README.md
if: always()
Expand All @@ -173,7 +129,7 @@ jobs:
path: python/pecos-rslib/dist/*.whl

build_sdist_quantum_pecos:
needs: [check_pr_push, build_sdist_pecos_rslib, build_wheels_pecos_rslib]
needs: [check_pr_push, build_wheels_pecos_rslib]
if: |
always() &&
(needs.check_pr_push.result == 'success' && needs.check_pr_push.outputs.run == 'true' || needs.check_pr_push.result == 'skipped') &&
Expand All @@ -198,10 +154,16 @@ jobs:
- name: Install pecos-rslib
run: pip install ./pecos-rslib-wheel/*.whl

- name: Install build dependencies
- name: Install pecos RNG build dependencies
run: |
pip install build nanobind

- name: Build PECOS RNG
run: |
python -m pip install --upgrade pip
pip install build
cd clib/pecos-rng && mkdir build && cd build/ && cmake ..
make && cd .. && pip install .
env:
NANOBIND_DIR: python -m nanobind --include_dir

- name: Build quantum-pecos SDist
run: |
Expand All @@ -220,7 +182,7 @@ jobs:
path: python/quantum-pecos/dist/*.tar.gz

build_wheels_quantum_pecos:
needs: [check_pr_push, build_wheels_pecos_rslib, build_sdist_quantum_pecos]
needs: [check_pr_push, build_wheels_pecos_rslib]
if: |
always() &&
(needs.check_pr_push.result == 'success' && needs.check_pr_push.outputs.run == 'true' || needs.check_pr_push.result == 'skipped') &&
Expand Down Expand Up @@ -249,10 +211,16 @@ jobs:
- name: Install pecos-rslib
run: pip install ./pecos-rslib-wheel/*.whl

- name: Install build dependencies
- name: Install pecos rng build dependencies
run: |
pip install build nanobind

- name: Build PECOS RNG
run: |
python -m pip install --upgrade pip
pip install build
cd clib/pecos-rng && mkdir build && cd build/ && cmake ..
make && cd .. && pip install .
env:
NANOBIND_DIR: python -m nanobind --include_dir

- name: Build quantum-pecos wheel
run: |
Expand Down
113 changes: 70 additions & 43 deletions .github/workflows/python-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,9 @@ env:
on:
push:
branches: [ "master", "development", "dev" ]
# # Comment out paths to force run on all pushes
# paths:
# - 'python/**'
# - '.github/workflows/python-test.yml'
# - '.typos.toml'
# - 'ruff.toml'
# - '.pre-commit-config.yaml'
pull_request:
branches: [ "master", "development", "dev" ]
# # Comment out paths to force run on all PRs
# paths:
# - 'python/**'
# - '.github/workflows/python-test.yml'
# - '.typos.toml'
# - 'ruff.toml'
# - '.pre-commit-config.yaml'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -51,6 +38,12 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Set up Visual Studio environment on Windows
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64

- name: Install the latest version of uv
uses: astral-sh/setup-uv@v4
with:
Expand All @@ -62,36 +55,70 @@ jobs:
- name: Cache Rust
uses: Swatinem/rust-cache@v2
with:
workspaces: python/pecos-rslib

- name: Generate lockfile and install dependencies
run: |
uv lock --project .
uv sync --project .
workspaces: python/pecos-rslib

- name: Install pecos-rslib with maturin
- name: Build and test PECOS (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
cd python/pecos-rslib
uv run maturin develop --uv

- name: Install quantum-pecos
# Find MSVC link.exe and create cargo config
$vsWhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
$vsPath = & $vsWhere -latest -property installationPath
$linkPath = Get-ChildItem -Path "$vsPath\VC\Tools\MSVC" -Recurse -Filter "link.exe" |
Where-Object { $_.FullName -like "*\bin\Hostx64\x64\*" } |
Select-Object -First 1 -ExpandProperty FullName

if ($linkPath) {
Write-Host "Found MSVC link.exe at: $linkPath"

# Create .cargo directory and config
New-Item -ItemType Directory -Force -Path .cargo | Out-Null

# Create config with escaped path
$escapedPath = $linkPath.Replace('\', '/')
"[target.x86_64-pc-windows-msvc]" | Out-File -FilePath ".cargo\config.toml" -Encoding UTF8
"linker = `"$escapedPath`"" | Out-File -FilePath ".cargo\config.toml" -Encoding UTF8 -Append

Write-Host "Created .cargo\config.toml:"
Get-Content .cargo\config.toml
} else {
Write-Error "Could not find MSVC link.exe"
exit 1
}

# Build and test
make build
make pytest-all

- name: Build and test PECOS (non-Windows)
if: runner.os != 'Windows'
run: |
cd python/quantum-pecos
uv pip install -e .

- name: Run pre-commit checks
run: uv run pre-commit run --all-files --show-diff-on-failure

- name: Install test dependencies
run: |
cd python/quantum-pecos
uv pip install -e .[all,test] # Install with both all and test extras
uv pip install pytest pytest-cov # Explicitly install test requirements

- name: Run standard tests
run: |
uv run pytest ./python/tests --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html

- name: Run optional dependency tests
# On macOS, set up minimal environment for matplotlib compatibility
if [[ "${{ runner.os }}" == "macOS" ]]; then
# Set matplotlib backend to avoid GUI issues
export MPLBACKEND=Agg
export MATPLOTLIB_INTERACTIVE=false

# Try to fix matplotlib segfault by limiting threading
export OPENBLAS_NUM_THREADS=1
export MKL_NUM_THREADS=1
export NUMEXPR_NUM_THREADS=1
export OMP_NUM_THREADS=1

# Disable macOS System Integrity Protection library validation
# This can help with library loading issues
export DYLD_LIBRARY_PATH=""

# Force matplotlib to use bundled libraries instead of system ones
export MPLCONFIGDIR=$PWD/.matplotlib
mkdir -p $MPLCONFIGDIR
fi

# Build and test
make build
make pytest-all

- name: Run linting
run: |
uv run pytest ./python/tests --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html -m optional_dependency
# Run all linting checks
make lint # Rust checks + Python pre-commit
23 changes: 22 additions & 1 deletion .github/workflows/rust-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ jobs:
with:
version: "14.0"
directory: ${{ runner.temp }}/llvm
env: true
env: false # Don't set CC/CXX - we'll use MSVC for C++ compilation

- name: Setup LLVM Path (Windows)
if: matrix.os == 'windows-latest'
Expand All @@ -149,6 +149,21 @@ jobs:
# Display LLVM_PATH environment variable set by the action
Write-Host "LLVM_PATH environment variable: $env:LLVM_PATH"

# Ensure we're using MSVC for C++ compilation, not LLVM clang
Write-Host "Ensuring MSVC is used for C++ compilation..."
if (Test-Path env:CC) {
Write-Host "Removing CC environment variable (was: $env:CC)"
Remove-Item Env:CC -ErrorAction SilentlyContinue
}
if (Test-Path env:CXX) {
Write-Host "Removing CXX environment variable (was: $env:CXX)"
Remove-Item Env:CXX -ErrorAction SilentlyContinue
}

# Clear these from GITHUB_ENV too
echo "CC=" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "CXX=" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

# Add LLVM bin directory to PATH for this and subsequent steps
$llvmBinDir = Join-Path -Path $env:LLVM_PATH -ChildPath "bin"

Expand Down Expand Up @@ -214,6 +229,12 @@ jobs:
}
}

- name: Set up Visual Studio environment on Windows
if: matrix.os == 'windows-latest'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64

- name: Compile tests
run: cargo test --no-run

Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/test-docs-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,23 @@ jobs:
with:
workspaces: python/pecos-rslib

- name: Install LLVM
uses: KyleMayes/install-llvm-action@v2
with:
version: "14.0"
env: True

- name: Configure LLVM
run: |
echo "LLVM_CONFIG=$LLVM_PATH/bin/llvm-config" >> "$GITHUB_ENV"
echo "LLVM_SYS_140_PREFIX=$LLVM_PATH" >> "$GITHUB_ENV"
# Disable LTO to avoid gold linker plugin issues
echo "CFLAGS=-fno-lto" >> "$GITHUB_ENV"
echo "CXXFLAGS=-fno-lto" >> "$GITHUB_ENV"
echo "LDFLAGS=-fno-lto" >> "$GITHUB_ENV"
# Test LLVM installation
"$LLVM_PATH/bin/llvm-config" --version

- name: Generate lockfile and install dependencies
run: |
uv lock --project .
Expand All @@ -60,7 +77,10 @@ jobs:
run: |
uv run python scripts/docs/test_working_examples.py

# TODO: Re-enable documentation code examples testing once documentation is updated
# Currently skipped due to outdated code examples with missing imports and API changes
- name: Test all code examples
if: false # Temporarily disabled - see TODO above
run: |
uv run python scripts/docs/test_code_examples.py

Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
Expand Down Expand Up @@ -177,3 +176,7 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
.idea/

# Prevent subdirectory virtual environments
clib/*/.venv/
clib/*/uv.lock
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ repos:
args: []

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.11
rev: v0.12.4
hooks:
- id: ruff-check
args: [--fix, --exit-non-zero-on-fix]
Expand All @@ -36,7 +36,7 @@ repos:
- id: black

- repo: https://github.com/keewis/blackdoc
rev: v0.3.9
rev: v0.4.1
hooks:
- id: blackdoc
additional_dependencies:
Expand Down
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.13
3.12
Loading
Loading