From 80c638a19f69676b2a6dc0f2814e98fa73c83582 Mon Sep 17 00:00:00 2001 From: Stefan Krastanov Date: Tue, 21 Jul 2026 01:24:19 -0400 Subject: [PATCH 1/4] Isolate JET tests and skip Dependabot publishing checks --- .github/workflows/changelog-enforcer.yml | 1 + .github/workflows/ci-julia-nightly.yml | 3 ++- .github/workflows/ci.yml | 1 + .github/workflows/downgrade.yml | 15 ++++++++++++++- Project.toml | 6 +++--- test/Project.toml | 3 ++- test/projects/jet/Project.toml | 12 ++++++++++++ test/runtests.jl | 13 ++++++++++++- test/test_jet.jl | 3 ++- 9 files changed, 49 insertions(+), 8 deletions(-) create mode 100644 test/projects/jet/Project.toml diff --git a/.github/workflows/changelog-enforcer.yml b/.github/workflows/changelog-enforcer.yml index bfc33ef..2dbb0fd 100644 --- a/.github/workflows/changelog-enforcer.yml +++ b/.github/workflows/changelog-enforcer.yml @@ -10,6 +10,7 @@ on: jobs: # Enforces the update of a changelog file on every pull request changelog: + if: github.actor != 'dependabot[bot]' runs-on: ubuntu-latest steps: - uses: dangoslen/changelog-enforcer@v3 diff --git a/.github/workflows/ci-julia-nightly.yml b/.github/workflows/ci-julia-nightly.yml index 35ec0c0..35a2b1c 100644 --- a/.github/workflows/ci-julia-nightly.yml +++ b/.github/workflows/ci-julia-nightly.yml @@ -40,9 +40,10 @@ jobs: - uses: julia-actions/cache@v3 - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 + with: + test_args: ${{ matrix.jet == 'true' && 'jet' || '' }} env: JULIA_NUM_THREADS: ${{ matrix.threads }} - JET_TEST: ${{ matrix.jet }} - uses: julia-actions/julia-processcoverage@v1 - uses: codecov/codecov-action@v7 with: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5b1fe46..d504388 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,6 +58,7 @@ jobs: token: ${{ secrets.CODECOV_TOKEN }} docs: name: Documentation + if: github.actor != 'dependabot[bot]' runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 diff --git a/.github/workflows/downgrade.yml b/.github/workflows/downgrade.yml index bd56edd..5099dc5 100644 --- a/.github/workflows/downgrade.yml +++ b/.github/workflows/downgrade.yml @@ -21,9 +21,22 @@ jobs: - uses: julia-actions/setup-julia@v3 with: version: ${{ matrix.version }} + - name: Disable workspace directives for downgrade run + run: | + julia --color=yes -e ' + using TOML + project = TOML.parsefile("Project.toml") + if haskey(project, "workspace") + delete!(project, "workspace") + open("Project.toml", "w") do io + TOML.print(io, project) + end + end + ' - uses: julia-actions/julia-downgrade-compat@v2 with: - skip: Pkg,TOML,InteractiveUtils,Random,LinearAlgebra + skip: Pkg,TOML,InteractiveUtils,Random,LinearAlgebra,SparseArrays + mode: 'forcedeps' julia_version: ${{ matrix.version }} - uses: julia-actions/cache@v3 - uses: julia-actions/julia-buildpkg@v1 diff --git a/Project.toml b/Project.toml index 9e8f697..53a12c3 100644 --- a/Project.toml +++ b/Project.toml @@ -4,7 +4,7 @@ authors = ["Feroz Ahmed Mian ", "Stefan Krastanov begin exclude = Symbol[] - if get(ENV, "JET_TEST", "") == "true" + if JET_flag return :jet in ti.tags else push!(exclude, :jet) diff --git a/test/test_jet.jl b/test/test_jet.jl index ce9e11b..3ca0819 100644 --- a/test/test_jet.jl +++ b/test/test_jet.jl @@ -4,7 +4,8 @@ using QuantumExpanders using Oscar, Multigraphs -rep = report_package("QuantumExpanders"; +rep = report_package(QuantumExpanders; + target_modules=(QuantumExpanders,), ignored_modules=( AnyFrameModule(Nemo), AnyFrameModule(Oscar), From f2e6eb0bc8616a6a2e6bf496a634cb4257fe29d7 Mon Sep 17 00:00:00 2001 From: Stefan Krastanov Date: Tue, 21 Jul 2026 10:58:58 -0400 Subject: [PATCH 2/4] Normalize JET and downgrade CI routing --- .github/workflows/ci-julia-nightly.yml | 8 ++++---- .github/workflows/downgrade.yml | 3 +++ test/runtests.jl | 10 +++++----- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci-julia-nightly.yml b/.github/workflows/ci-julia-nightly.yml index 35a2b1c..fca6a6e 100644 --- a/.github/workflows/ci-julia-nightly.yml +++ b/.github/workflows/ci-julia-nightly.yml @@ -16,7 +16,7 @@ env: PYTHON: ~ jobs: test: - name: Julia ${{ matrix.version }} - t=${{ matrix.threads }} - jet=${{ matrix.jet }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} + name: Julia ${{ matrix.version }} - t=${{ matrix.threads }} - tests=${{ matrix.test_args }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -26,12 +26,12 @@ jobs: arch: x64 version: alpha threads: 2 - jet: 'false' + test_args: general - os: ubuntu-latest arch: x64 version: '1' threads: 2 - jet: 'true' + test_args: jet steps: - uses: actions/checkout@v7 - uses: julia-actions/install-juliaup@v3 @@ -41,7 +41,7 @@ jobs: - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 with: - test_args: ${{ matrix.jet == 'true' && 'jet' || '' }} + test_args: ${{ matrix.test_args }} env: JULIA_NUM_THREADS: ${{ matrix.threads }} - uses: julia-actions/julia-processcoverage@v1 diff --git a/.github/workflows/downgrade.yml b/.github/workflows/downgrade.yml index 5099dc5..ab5e902 100644 --- a/.github/workflows/downgrade.yml +++ b/.github/workflows/downgrade.yml @@ -41,3 +41,6 @@ jobs: - uses: julia-actions/cache@v3 - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 + with: + allow_reresolve: false + force_latest_compatible_version: false diff --git a/test/runtests.jl b/test/runtests.jl index d3bd9f0..7dd9723 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,12 +1,12 @@ -JET_flag = ARGS == ["jet"] +const JET_PROJECT = normpath(joinpath(@__DIR__, "projects", "jet")) +const test_args = isempty(ARGS) ? ["general"] : ARGS +const JET_flag = length(test_args) == 1 && startswith(only(test_args), "jet") if JET_flag - @info "Running JET tests in their dedicated test environment." + @info "Activating the dedicated JET test environment." project=JET_PROJECT using Pkg - Pkg.activate(joinpath(@__DIR__, "projects", "jet")) + Pkg.activate(JET_PROJECT) Pkg.instantiate() -else - @info "Skipping JET tests -- pass `test_args=[\"jet\"]` to Pkg.test to enable them." end using TestItemRunner From 01a0f4abe7819b7d50fc1e112cab9b23d52d3877 Mon Sep 17 00:00:00 2001 From: Stefan Krastanov Date: Tue, 21 Jul 2026 11:30:13 -0400 Subject: [PATCH 3/4] Fix Julia 1.12 dependency floors --- .github/workflows/ci.yml | 4 ---- Project.toml | 8 ++++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d504388..1bf374c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,10 +36,6 @@ jobs: os: macos-latest version: '1' threads: '1' - - arch: x64 - os: windows-latest - version: '1' - threads: '1' steps: - uses: actions/checkout@v7 - uses: julia-actions/setup-julia@v3 diff --git a/Project.toml b/Project.toml index 53a12c3..975bff2 100644 --- a/Project.toml +++ b/Project.toml @@ -22,12 +22,12 @@ SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" [compat] DocStringExtensions = "0.9.5" -Graphs = "1.9" +Graphs = "1.12" LinearAlgebra = "1.10" Multigraphs = "0.3.0" -Nemo = "0.47.1, 0.48, 0.49, 0.50, 0.51, 0.52, 0.53, 0.54, 0.55, 0.56" -Oscar = "1.2" -PrecompileTools = "1.2" +Nemo = "0.52.1, 0.53, 0.54, 0.55, 0.56" +Oscar = "1.5" +PrecompileTools = "1.3" ProgressMeter = "1.11.0" QECCore = "0.1.3" QuantumClifford = "0.11.3" From beb61e44272c301b7e3ebcf8552d0e07361616ba Mon Sep 17 00:00:00 2001 From: Stefan Krastanov Date: Tue, 21 Jul 2026 17:51:10 -0400 Subject: [PATCH 4/4] Stabilize HiGHS and Tanner code generation --- .github/workflows/ci.yml | 2 ++ src/quantum_tanner_code_multigraphs.jl | 12 ++++++++---- test/Project.toml | 10 ++++++++-- test/test_ramanujan_graphs_via_frobenius_groups.jl | 8 +++++--- 4 files changed, 23 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1bf374c..3768fbd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,6 +46,8 @@ jobs: - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 env: + # Avoid parallel-GC crashes in the GAP/Oscar-backed Tanner tests. + JULIA_NUM_GC_THREADS: '1' JULIA_NUM_THREADS: ${{ matrix.threads }} - uses: julia-actions/julia-processcoverage@v1 - uses: codecov/codecov-action@v7 diff --git a/src/quantum_tanner_code_multigraphs.jl b/src/quantum_tanner_code_multigraphs.jl index efc6c77..3cf602a 100644 --- a/src/quantum_tanner_code_multigraphs.jl +++ b/src/quantum_tanner_code_multigraphs.jl @@ -17,7 +17,7 @@ Returns `(š’žĖ£, š’žį¶»)` where `š’žĖ£` is the X-stabilizer matrix and `š’ž - `rate::Real`: Rate parameter for local codes (C_A has rate ρ, C_B has rate 1-ρ) - `group`: The group G for the left-right Cayley complex - `A`: Symmetric generating set A for the left Cayley graph -- `B`: Symmetric generating set B for the right Cayley graph +- `B`: Symmetric generating set B for the right Cayley graph - `bipartite::Bool`: Whether to use bipartite vertex partitioning (Vā‚€, V₁) """ struct GeneralizedQuantumTannerCode <: AbstractCSSCode @@ -148,14 +148,18 @@ Generate a good Quantum Tanner code meeting minimum weight requirements. ### Arguments - `ρ`: Rate parameter for local codes -- `group`, `A`, `B`: Expander graph components +- `group`, `A`, `B`: Expander graph components - `minweight_x`: Minimum weight for X-stabilizers - `minweight_z`: Minimum weight for Z-stabilizers - `max_iterations`: Maximum attempts to find a good code +- `rng`: Random number generator used to construct candidate codes """ -function gen_good_code(ρ::Real, group::Group, A::Vector{<:GroupElem}, B::Vector{<:GroupElem}; minweight_x=1, minweight_z=1, bipartite=true, use_same_local_code=false, max_iterations=100) +function gen_good_code(ρ::Real, group::Group, A::Vector{<:GroupElem}, B::Vector{<:GroupElem}; + minweight_x=1, minweight_z=1, bipartite=true, + use_same_local_code=false, max_iterations=100, + rng::AbstractRNG=GLOBAL_RNG) for i in 1:max_iterations - š’žĖ£, š’žį¶» = random_quantum_Tanner_code(ρ, group, A, B; bipartite, use_same_local_code) + š’žĖ£, š’žį¶» = random_quantum_Tanner_code(ρ, group, A, B; bipartite, use_same_local_code, rng) x_weight = minimum(unique(sum(š’žĖ£, dims=1))) z_weight = minimum(unique(sum(š’žį¶», dims=1))) if x_weight >= minweight_x && z_weight >= minweight_z diff --git a/test/Project.toml b/test/Project.toml index e8aa187..e23641f 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -4,8 +4,8 @@ Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6" GraphsColoring = "ed38bb8a-6120-4024-8d1e-8789784f251b" HiGHS = "87dc4568-4c63-4d18-b0c0-bb2238e4078b" IGraphs = "647e90d3-2106-487c-adb4-c91fc07b96ea" -LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" JuMP = "4076af6c-e467-56ae-b986-b466b2749572" +LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" LogExpFunctions = "2ab3a3ac-af41-5b50-aa03-7779005ae688" Multigraphs = "7ebac608-6c66-46e6-9856-b5f43e107bac" NautyGraphs = "7509a0a4-015a-4167-b44b-0799a1a2605e" @@ -19,8 +19,14 @@ QECCore = "b50d4dc9-2544-401f-bae9-a24ba40d0c7a" QuantumClifford = "0525e862-1e90-11e9-3e4d-1b39d7109de1" QuantumExpanders = "144928dd-1f60-4b66-8c4c-f5ae7409097b" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" -SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" SimpleGraphAlgorithms = "41400c72-0c58-5c16-8579-4ecbce768449" SimpleGraphConverter = "205b04f2-f585-4877-a239-566270b3f673" +SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" +StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" TestItemRunner = "f8b46487-2199-4994-9208-9a1283c18c0a" + +[compat] +# Pin native HiGHS before ERGO-Code/HiGHS#3141; remove after a fixed release. +HiGHS = "=1.19.3" +StableRNGs = "1" diff --git a/test/test_ramanujan_graphs_via_frobenius_groups.jl b/test/test_ramanujan_graphs_via_frobenius_groups.jl index e93e5fb..5eb75af 100644 --- a/test/test_ramanujan_graphs_via_frobenius_groups.jl +++ b/test/test_ramanujan_graphs_via_frobenius_groups.jl @@ -11,6 +11,7 @@ using QuantumClifford.ECC using QuantumClifford.ECC: code_n, code_k using Nemo: zero_matrix, base_ring, transpose, rank + using StableRNGs: StableRNG function _is_ramanujanįµ§(g::SimpleGraph, k::Int) A = adjacency_matrix(g) @@ -50,7 +51,7 @@ @test is_ram end end - + # Frobenius groups with r ≄ 4 of https://arxiv.org/pdf/1503.04075, see Theorem 3.3, page 6. @testset "Frobenius Groups r ≄ 4" begin large_primes = [11, 13, 17, 19] @@ -70,15 +71,16 @@ end @testset "Quantum Tanner codes from Frobenius Groups" begin + rng = StableRNG(1234) primes = [3, 5] for p in primes for rate in [0.5, 0.6, 0.7] G = dihedral_group(2*p) S = normal_cayley_subset(G) - hx, hz = random_quantum_Tanner_code(rate, G, S, S, bipartite=false) + hx, hz = random_quantum_Tanner_code(rate, G, S, S; bipartite=false, rng) c = Stabilizer(CSS(hx, hz)) @test stab_looks_good(c, remove_redundant_rows=true) - hx, hz = gen_good_code(rate, G, S, S, use_same_local_code=true, bipartite=false) + hx, hz = gen_good_code(rate, G, S, S; use_same_local_code=true, bipartite=false, rng) c = Stabilizer(CSS(hx, hz)) @test stab_looks_good(c, remove_redundant_rows=true) end