Skip to content

Commit 2f62975

Browse files
committed
Merge origin/dev into noise-events
Integrates 3 PRs from dev: - "polishing wasm" (#252): wasm foreign object improvements - "More py to rs" (#235): squashed version (already merged via raw commits) - "More decoders2" (#253): adds relay-bp decoder support Conflict resolution strategy: - Kept PZ/MZ gate type naming (noise-events rename of Prep/Measure) - Kept PecosRng usage (project's own optimized RNG over StdRng) - Kept TimeUnits/TimeScale naming (noise-events rename of Nanoseconds) - Took dev's cuquantum improvements (allow annotations, log deps, Linux-only RPATH) - Took dev's CI version bumps (checkout@v6, cuda-toolkit@v0.2.30) - Took dev's relay-bp decoder bindings and builder pattern refactoring - Took dev's CLI improvements (self_update_cmd, install_cmd LLVM auto-configure) - Regenerated Cargo.lock
2 parents d51f4f2 + 656bfaf commit 2f62975

86 files changed

Lines changed: 4599 additions & 591 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/cuda-build-check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
cuda-build-check:
3333
runs-on: ubuntu-latest
3434
steps:
35-
- uses: actions/checkout@v4
35+
- uses: actions/checkout@v6
3636

3737
- name: Free disk space
3838
run: |
@@ -55,7 +55,7 @@ jobs:
5555
save-if: ${{ github.ref_name == 'main' || github.ref_name == 'master' || github.ref_name == 'development' || github.ref_name == 'dev' }}
5656

5757
- name: Install CUDA Toolkit
58-
uses: Jimver/cuda-toolkit@v0.2.29
58+
uses: Jimver/cuda-toolkit@v0.2.30
5959
id: cuda-toolkit
6060
with:
6161
cuda: '12.6.3'

.github/workflows/go-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ jobs:
4141
go-version: ["stable"] # Latest stable (experimental bindings)
4242

4343
steps:
44-
- uses: actions/checkout@v4
44+
- uses: actions/checkout@v6
4545

4646
- name: Set up Go ${{ matrix.go-version }}
47-
uses: actions/setup-go@v5
47+
uses: actions/setup-go@v6
4848
with:
4949
go-version: ${{ matrix.go-version }}
5050

.github/workflows/go-version-consistency.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
check-go-versions:
2323
runs-on: ubuntu-latest
2424
steps:
25-
- uses: actions/checkout@v4
25+
- uses: actions/checkout@v6
2626

2727
- name: Check Go package consistency
2828
run: |

.github/workflows/julia-release.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jobs:
9696
architecture: x86_64
9797

9898
steps:
99-
- uses: actions/checkout@v4
99+
- uses: actions/checkout@v6
100100
with:
101101
ref: ${{ inputs.sha || github.sha }}
102102

@@ -107,7 +107,7 @@ jobs:
107107
if: runner.os != 'Windows'
108108
run: |
109109
echo "Installing LLVM using pecos..."
110-
cargo run -p pecos --features cli --release -- llvm install
110+
cargo run -p pecos --features cli --release -- install llvm
111111
112112
echo "Setting LLVM environment variables..."
113113
export PECOS_LLVM=$(cargo run -p pecos --features cli --release -- llvm find 2>/dev/null)
@@ -124,7 +124,7 @@ jobs:
124124
shell: pwsh
125125
run: |
126126
Write-Host "Installing LLVM using pecos..."
127-
cargo run -p pecos --features cli --release -- llvm install
127+
cargo run -p pecos --features cli --release -- install llvm
128128
129129
Write-Host "Setting LLVM environment variables..."
130130
$env:PECOS_LLVM = (cargo run -p pecos --features cli --release -- llvm find 2>$null)
@@ -259,7 +259,7 @@ jobs:
259259
os: macos-latest
260260
architecture: aarch64
261261
steps:
262-
- uses: actions/checkout@v4
262+
- uses: actions/checkout@v6
263263
with:
264264
ref: ${{ inputs.sha || github.sha }}
265265

@@ -337,7 +337,7 @@ jobs:
337337
needs.test_binaries.result == 'success'
338338
runs-on: ubuntu-latest
339339
steps:
340-
- uses: actions/checkout@v4
340+
- uses: actions/checkout@v6
341341
with:
342342
ref: ${{ inputs.sha || github.sha }}
343343

@@ -465,7 +465,7 @@ jobs:
465465
needs.test_binaries.result == 'success'
466466
runs-on: ubuntu-latest
467467
steps:
468-
- uses: actions/checkout@v4
468+
- uses: actions/checkout@v6
469469
with:
470470
ref: ${{ inputs.sha || github.sha }}
471471

@@ -627,7 +627,7 @@ jobs:
627627
628628
- name: Create GitHub Release and Upload Binaries
629629
if: startsWith(github.ref, 'refs/tags/jl-')
630-
uses: softprops/action-gh-release@v1
630+
uses: softprops/action-gh-release@v2
631631
with:
632632
files: release-bundle/binaries/*.tar.gz
633633
body: |

.github/workflows/julia-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
julia-version: ["1"] # Latest stable (experimental bindings)
4242

4343
steps:
44-
- uses: actions/checkout@v4
44+
- uses: actions/checkout@v6
4545

4646
- name: Set up Julia ${{ matrix.julia-version }}
4747
uses: julia-actions/setup-julia@v2
@@ -58,7 +58,7 @@ jobs:
5858
# if: runner.os != 'Windows'
5959
# run: |
6060
# echo "Installing LLVM using pecos..."
61-
# cargo run -p pecos --features cli --release -- llvm install
61+
# cargo run -p pecos --features cli --release -- install llvm
6262
#
6363
# echo "Setting LLVM environment variables..."
6464
# export PECOS_LLVM=$(cargo run -p pecos --features cli --release -- llvm find 2>/dev/null)
@@ -75,7 +75,7 @@ jobs:
7575
# shell: pwsh
7676
# run: |
7777
# Write-Host "Installing LLVM using pecos..."
78-
# cargo run -p pecos --features cli --release -- llvm install
78+
# cargo run -p pecos --features cli --release -- install llvm
7979
#
8080
# Write-Host "Setting LLVM environment variables..."
8181
# $env:PECOS_LLVM = (cargo run -p pecos --features cli --release -- llvm find 2>$null)

.github/workflows/julia-update-hash.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
pull-requests: write
2525

2626
steps:
27-
- uses: actions/checkout@v4
27+
- uses: actions/checkout@v6
2828
with:
2929
fetch-depth: 0
3030
token: ${{ secrets.GITHUB_TOKEN }}
@@ -48,7 +48,7 @@ jobs:
4848
grep -n "GitSource" julia/PECOS.jl/deps/build_tarballs.jl
4949
5050
- name: Create Pull Request
51-
uses: peter-evans/create-pull-request@v5
51+
uses: peter-evans/create-pull-request@v8
5252
with:
5353
token: ${{ secrets.GITHUB_TOKEN }}
5454
commit-message: "Update Julia build hash for ${{ github.ref_name }}"

.github/workflows/julia-version-consistency.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
check-julia-versions:
2323
runs-on: ubuntu-latest
2424
steps:
25-
- uses: actions/checkout@v4
25+
- uses: actions/checkout@v6
2626

2727
- name: Check Julia version consistency
2828
run: |

.github/workflows/python-release.yml

Lines changed: 58 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,9 @@ jobs:
9797
# gcc_cc: ""
9898
# gcc_cxx: ""
9999
# macOS without CUDA (NVIDIA dropped macOS CUDA support in 2019)
100-
- os: macos-14
100+
# Use macos-15 (not macos-14) because Xcode 15.4's libc++ has a
101+
# pointer_traits bug with CXX crate's contiguous iterators in C++20.
102+
- os: macos-15
101103
architecture: aarch64
102104
cuda_feature: ""
103105
install_cuda: false
@@ -113,7 +115,7 @@ jobs:
113115
install_cuda: true
114116

115117
steps:
116-
- uses: actions/checkout@v4
118+
- uses: actions/checkout@v6
117119
with:
118120
ref: ${{ inputs.sha || github.sha }}
119121
submodules: recursive
@@ -130,14 +132,54 @@ jobs:
130132
# See: https://github.com/Jimver/cuda-toolkit/issues/382
131133
- name: Install CUDA Toolkit (Windows)
132134
if: runner.os == 'Windows' && matrix.install_cuda
133-
uses: Jimver/cuda-toolkit@v0.2.29
135+
uses: Jimver/cuda-toolkit@v0.2.30
134136
with:
135137
cuda: '12.5.1'
136138
method: 'local'
137139
sub-packages: '["nvcc", "cudart", "cublas", "cublas_dev", "thrust"]'
138140

141+
# On Windows, Git Bash's /usr/bin/link.exe shadows MSVC's link.exe.
142+
# Create .cargo/config.toml with the explicit MSVC linker path so cargo
143+
# uses the correct linker inside cibuildwheel (which runs on the host).
144+
- name: Configure MSVC linker for Cargo (Windows)
145+
if: runner.os == 'Windows'
146+
shell: pwsh
147+
run: |
148+
$vsWhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
149+
$vsPath = & $vsWhere -latest -property installationPath
150+
$linkPath = Get-ChildItem -Path "$vsPath\VC\Tools\MSVC" -Recurse -Filter "link.exe" |
151+
Where-Object { $_.FullName -like "*\bin\Hostx64\x64\*" } |
152+
Select-Object -First 1 -ExpandProperty FullName
153+
154+
if ($linkPath) {
155+
$escapedPath = $linkPath.Replace('\', '/')
156+
$configContent = "[target.x86_64-pc-windows-msvc]`nlinker = `"$escapedPath`""
157+
158+
# Create in repo root (for CIBW_BEFORE_ALL cargo commands)
159+
New-Item -ItemType Directory -Force -Path .cargo | Out-Null
160+
$configContent | Out-File -FilePath ".cargo\config.toml" -Encoding UTF8
161+
162+
# Create in pecos-rslib directory (for maturin builds)
163+
New-Item -ItemType Directory -Force -Path "python\pecos-rslib\.cargo" | Out-Null
164+
$configContent | Out-File -FilePath "python\pecos-rslib\.cargo\config.toml" -Encoding UTF8
165+
166+
# Create in user cargo home (fallback)
167+
$cargoHome = if ($env:CARGO_HOME) { $env:CARGO_HOME } else { "$env:USERPROFILE\.cargo" }
168+
New-Item -ItemType Directory -Force -Path $cargoHome | Out-Null
169+
if (Test-Path "$cargoHome\config.toml") {
170+
"`n$configContent" | Out-File -FilePath "$cargoHome\config.toml" -Encoding UTF8 -Append
171+
} else {
172+
$configContent | Out-File -FilePath "$cargoHome\config.toml" -Encoding UTF8
173+
}
174+
175+
Write-Host "Configured MSVC linker: $linkPath"
176+
} else {
177+
Write-Error "Could not find MSVC link.exe"
178+
exit 1
179+
}
180+
139181
- name: Build wheels
140-
uses: pypa/cibuildwheel@v3.2.1
182+
uses: pypa/cibuildwheel@v3.3.1
141183
with:
142184
package-dir: python/pecos-rslib
143185
output-dir: wheelhouse
@@ -175,7 +217,7 @@ jobs:
175217
else
176218
echo "Skipping CUDA installation (GPU support not enabled for this build)"
177219
fi
178-
cargo run --release -p pecos --features cli -- llvm install --force
220+
cargo run --release -p pecos --features cli -- install llvm --force
179221
CIBW_REPAIR_WHEEL_COMMAND_LINUX: >
180222
auditwheel repair -w {dest_dir} {wheel} &&
181223
pipx run abi3audit --strict --report {wheel}
@@ -188,7 +230,7 @@ jobs:
188230
curl -sSf https://sh.rustup.rs | sh -s -- -y
189231
source $HOME/.cargo/env
190232
rustup update
191-
cargo run --release -p pecos --features cli -- llvm install --force
233+
cargo run --release -p pecos --features cli -- install llvm --force
192234
# Create a codesign wrapper that strips DYLD_LIBRARY_PATH to prevent
193235
# crashes on macOS 15 when bundled libc++ conflicts with system libc++
194236
mkdir -p $HOME/.pecos/bin
@@ -205,8 +247,8 @@ jobs:
205247
CIBW_BEFORE_ALL_WINDOWS: >
206248
echo "=== Installing LLVM using pecos ===" &&
207249
rustup update &&
208-
echo "=== Running pecos llvm install ===" &&
209-
cargo run --release -p pecos --features cli -- llvm install --force &&
250+
echo "=== Running pecos install llvm ===" &&
251+
cargo run --release -p pecos --features cli -- install llvm --force &&
210252
echo "=== Checking LLVM installation ===" &&
211253
(test -d "C:\\Users\\runneradmin\\.pecos\\llvm" && echo "LLVM directory exists" && ls -la "C:\\Users\\runneradmin\\.pecos\\llvm" && (ls -la "C:\\Users\\runneradmin\\.pecos\\llvm\\bin" || echo "bin directory not found")) || (echo "ERROR: LLVM directory not found!" && exit 1) &&
212254
echo "=== Verifying LLVM_SYS_140_PREFIX ===" &&
@@ -248,16 +290,16 @@ jobs:
248290
- runner: macos-15-intel
249291
os: macos-15-intel
250292
architecture: x86_64
251-
- runner: macos-14
252-
os: macos-14
293+
- runner: macos-15
294+
os: macos-15
253295
architecture: aarch64
254296
steps:
255-
- uses: actions/checkout@v4
297+
- uses: actions/checkout@v6
256298
with:
257299
ref: ${{ inputs.sha || github.sha }}
258300

259301
- name: Set up Python ${{ matrix.python-version }}
260-
uses: actions/setup-python@v5
302+
uses: actions/setup-python@v6
261303
with:
262304
python-version: ${{ matrix.python-version }}
263305

@@ -314,12 +356,12 @@ jobs:
314356
needs.build_wheelspecos_rslib.result == 'success'
315357
runs-on: ubuntu-latest
316358
steps:
317-
- uses: actions/checkout@v4
359+
- uses: actions/checkout@v6
318360
with:
319361
ref: ${{ inputs.sha || github.sha }}
320362

321363
- name: Set up Python
322-
uses: actions/setup-python@v5
364+
uses: actions/setup-python@v6
323365
with:
324366
python-version: '3.10'
325367

@@ -359,12 +401,12 @@ jobs:
359401
runs-on: ubuntu-latest
360402

361403
steps:
362-
- uses: actions/checkout@v4
404+
- uses: actions/checkout@v6
363405
with:
364406
ref: ${{ inputs.sha || github.sha }}
365407

366408
- name: Set up Python
367-
uses: actions/setup-python@v5
409+
uses: actions/setup-python@v6
368410
with:
369411
python-version: '3.10'
370412

.github/workflows/python-test.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,10 @@ jobs:
8888
Write-Host "Disk space after cleanup:"
8989
Get-PSDrive C | Select-Object Used,Free
9090
91-
- uses: actions/checkout@v4
91+
- uses: actions/checkout@v6
9292

9393
- name: Set up Python ${{ matrix.python-version }}
94-
uses: actions/setup-python@v5
94+
uses: actions/setup-python@v6
9595
with:
9696
python-version: ${{ matrix.python-version }}
9797

@@ -102,15 +102,15 @@ jobs:
102102
arch: x64
103103

104104
- name: Install the latest version of uv
105-
uses: astral-sh/setup-uv@v4
105+
uses: astral-sh/setup-uv@v7
106106
with:
107107
enable-cache: true
108108

109109
- name: Set up Rust
110110
run: rustup show
111111

112112
- name: Install just
113-
uses: extractions/setup-just@v2
113+
uses: extractions/setup-just@v3
114114

115115
- name: Cache Rust
116116
uses: Swatinem/rust-cache@v2
@@ -121,7 +121,7 @@ jobs:
121121
if: runner.os != 'Windows'
122122
run: |
123123
echo "Installing LLVM using pecos..."
124-
cargo run -p pecos --features cli --release -- llvm install
124+
cargo run -p pecos --features cli --release -- install llvm
125125
126126
echo "Setting LLVM environment variables..."
127127
export PECOS_LLVM=$(cargo run -p pecos --features cli --release -- llvm find 2>/dev/null)
@@ -138,7 +138,7 @@ jobs:
138138
shell: pwsh
139139
run: |
140140
Write-Host "Installing LLVM using pecos..."
141-
cargo run -p pecos --features cli --release -- llvm install
141+
cargo run -p pecos --features cli --release -- install llvm
142142
143143
Write-Host "Setting LLVM environment variables..."
144144
$env:PECOS_LLVM = (cargo run -p pecos --features cli --release -- llvm find 2>$null)

.github/workflows/python-version-consistency.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout code
16-
uses: actions/checkout@v4
16+
uses: actions/checkout@v6
1717

1818
- name: Check version consistency
1919
run: |

0 commit comments

Comments
 (0)