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
8 changes: 4 additions & 4 deletions .github/workflows/julia-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ jobs:
- os: ubuntu-latest
architecture: aarch64
runner: ubuntu-latest
- os: macos-13
- os: macos-15-intel
architecture: x86_64
runner: macos-13 # Intel Mac for x86_64
runner: macos-15-intel # Intel Mac for x86_64
- os: macos-latest
architecture: aarch64
runner: macos-latest # ARM64 Mac
Expand Down Expand Up @@ -246,8 +246,8 @@ jobs:
- runner: windows-latest
os: windows-latest
architecture: x86_64
- runner: macos-13
os: macos-13
- runner: macos-15-intel
os: macos-15-intel
architecture: x86_64
- runner: macos-latest
os: macos-latest
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/python-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
runner: ubuntu-latest
- os: macos-14
architecture: aarch64
- os: macos-13
- os: macos-15-intel
architecture: x86_64
- os: windows-2022
architecture: x86_64
Expand Down Expand Up @@ -114,8 +114,13 @@ jobs:
curl -sSf https://sh.rustup.rs | sh -s -- -y
rustup update
cargo run --release -p pecos-llvm-utils --bin pecos-llvm -- install --force
# Create a codesign wrapper that strips DYLD_LIBRARY_PATH to prevent
# crashes on macOS 15 when bundled libc++ conflicts with system libc++
mkdir -p $HOME/.pecos/bin
printf '#!/bin/bash\nunset DYLD_LIBRARY_PATH\nexec /usr/bin/codesign "$@"\n' > $HOME/.pecos/bin/codesign
chmod +x $HOME/.pecos/bin/codesign
CIBW_REPAIR_WHEEL_COMMAND_MACOS: >
DYLD_LIBRARY_PATH=$HOME/.pecos/llvm/lib delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel} &&
PATH=$HOME/.pecos/bin:$PATH DYLD_LIBRARY_PATH=$HOME/.pecos/llvm/lib delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel} &&
pipx run abi3audit --strict --report {wheel}
# Windows configuration
CIBW_ENVIRONMENT_WINDOWS: >
Expand Down Expand Up @@ -158,8 +163,8 @@ jobs:
- runner: windows-latest
os: windows-2022
architecture: x86_64
- runner: macos-13
os: macos-13
- runner: macos-15-intel
os: macos-15-intel
architecture: x86_64
- runner: macos-14
os: macos-14
Expand Down
24 changes: 12 additions & 12 deletions Cargo.lock

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

19 changes: 10 additions & 9 deletions crates/pecos-quest/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -454,26 +454,27 @@ fn test_measurement_determinism_with_seed() {
}

#[test]
fn test_measurement_randomness_without_seed() {
// Test that measurements are random (different) when not using seeds
// Note: This test has a tiny probability of false failure if random outcomes happen to match
let num_trials = 10;
fn test_measurement_randomness_with_different_seeds() {
// Test that measurements show randomness when using different seeds
// This is deterministic because we control the seeds
let num_trials = 30;

let mut all_results = Vec::new();

for _ in 0..num_trials {
let mut sim = QuestStateVec::new(1);
for i in 0_u64..num_trials {
// Use different seeds for each trial to ensure different random streams
let mut sim: QuestStateVec = QuestStateVec::with_seed(1, 12345 + i);
sim.h(0); // Create superposition
let outcome = sim.mz(0);
all_results.push(outcome.outcome);
}

// With 10 measurements of a superposition, the probability of all being the same is 2*(1/2)^10 ≈ 0.2%
// So we expect at least some variation
// With 30 different seeds measuring a superposition, we expect variation
// This test is deterministic given the seeds
let all_same = all_results.iter().all(|&x| x == all_results[0]);
assert!(
!all_same,
"Unseeded measurements should show randomness (this test has ~0.2% chance of false failure)"
"Measurements with different seeds should show variation in outcomes"
);
}

Expand Down
8 changes: 5 additions & 3 deletions julia/pecos-julia-ffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ name = "pecos_julia"
crate-type = ["cdylib"]

[dependencies]
# PECOS - the meta crate that includes everything via its prelude
# Enable llvm feature explicitly for full Julia functionality
pecos = { workspace = true, features = ["llvm"] }
# Use pecos without default features for faster compilation
# This avoids heavy dependencies like all-simulators, wasm, qasm, phir
# The Julia wrapper currently only needs QubitId from pecos-core (via pecos::prelude)
# Note: Can't use workspace = true here because Cargo doesn't allow overriding default-features
pecos = { version = "0.1.1", path = "../../crates/pecos", default-features = false }

[lints]
workspace = true
Loading
Loading