bloqade 0.35.0.dev0__tar.gz → 0.37.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.
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/.github/pull_bloqade_submodules/action.yml +3 -3
- bloqade-0.37.0/.github/scripts/backport-targets.cjs +41 -0
- bloqade-0.37.0/.github/scripts/backport-targets.test.cjs +81 -0
- bloqade-0.37.0/.github/scripts/bump_dependencies.py +145 -0
- bloqade-0.37.0/.github/scripts/select_old_doc_versions.py +43 -0
- bloqade-0.37.0/.github/workflows/backport-tests.yml +25 -0
- bloqade-0.37.0/.github/workflows/backport.yml +82 -0
- bloqade-0.37.0/.github/workflows/ci.yml +61 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/.github/workflows/dev-doc-nightly.yml +5 -5
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/.github/workflows/devdoc.yml +7 -4
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/.github/workflows/doc-nightly.yml +2 -2
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/.github/workflows/doc.yml +2 -2
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/.github/workflows/isort.yml +1 -1
- bloqade-0.37.0/.github/workflows/lint.yml +28 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/.github/workflows/pub_doc.yml +23 -4
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/.github/workflows/release.yml +2 -2
- bloqade-0.37.0/.github/workflows/squash-gh-pages.yml +49 -0
- bloqade-0.37.0/.github/workflows/update-direct-dependencies.yml +51 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/.gitignore +1 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/.pre-commit-config.yaml +10 -3
- bloqade-0.37.0/CONTRIBUTING.md +115 -0
- bloqade-0.37.0/GEMINI_MIGRATION.md +138 -0
- bloqade-0.37.0/PKG-INFO +88 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/README.md +9 -3
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/_typos.toml +4 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/blog/posts/2025/the-noise-strikes-back.md +3 -3
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/digital/tutorials/auto_parallelism.py +1 -1
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/install.md +1 -1
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/manifesto.md +1 -1
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/quick_start/circuits/index.md +1 -1
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/mkdocs.yml +1 -1
- bloqade-0.37.0/pyproject.toml +183 -0
- bloqade-0.37.0/src/bloqade/gemini/AGENT.md +19 -0
- bloqade-0.37.0/src/bloqade/gemini/__init__.py +56 -0
- bloqade-0.37.0/src/bloqade/gemini/arrange.py +10 -0
- bloqade-0.37.0/src/bloqade/gemini/common/__init__.py +1 -0
- bloqade-0.37.0/src/bloqade/gemini/common/cirq_conversion.py +137 -0
- bloqade-0.37.0/src/bloqade/gemini/compile/__init__.py +15 -0
- bloqade-0.37.0/src/bloqade/gemini/compile/stim.py +54 -0
- bloqade-0.37.0/src/bloqade/gemini/compile/task.py +310 -0
- bloqade-0.37.0/src/bloqade/gemini/cudaq.py +44 -0
- bloqade-0.37.0/src/bloqade/gemini/decoding/__init__.py +27 -0
- bloqade-0.37.0/src/bloqade/gemini/decoding/confidence.py +24 -0
- bloqade-0.37.0/src/bloqade/gemini/decoding/dem.py +130 -0
- bloqade-0.37.0/src/bloqade/gemini/decoding/experiments.py +530 -0
- bloqade-0.37.0/src/bloqade/gemini/decoding/kernels.py +126 -0
- bloqade-0.37.0/src/bloqade/gemini/decoding/layout.py +47 -0
- bloqade-0.37.0/src/bloqade/gemini/decoding/msd.py +105 -0
- bloqade-0.37.0/src/bloqade/gemini/decoding/postselection.py +348 -0
- bloqade-0.37.0/src/bloqade/gemini/decoding/sampling.py +13 -0
- bloqade-0.37.0/src/bloqade/gemini/decoding/special_tasks.py +58 -0
- bloqade-0.37.0/src/bloqade/gemini/decoding/table_decoders.py +5 -0
- bloqade-0.37.0/src/bloqade/gemini/decoding/tomography.py +5 -0
- bloqade-0.37.0/src/bloqade/gemini/decoding/workflow.py +56 -0
- bloqade-0.37.0/src/bloqade/gemini/device/__init__.py +47 -0
- bloqade-0.37.0/src/bloqade/gemini/device/_task_runtime.py +491 -0
- bloqade-0.37.0/src/bloqade/gemini/device/logical/__init__.py +11 -0
- bloqade-0.37.0/src/bloqade/gemini/device/logical/device.py +88 -0
- bloqade-0.37.0/src/bloqade/gemini/device/logical/future.py +17 -0
- bloqade-0.37.0/src/bloqade/gemini/device/logical/result.py +229 -0
- bloqade-0.37.0/src/bloqade/gemini/device/logical/task.py +50 -0
- bloqade-0.37.0/src/bloqade/gemini/device/logical/utils.py +89 -0
- bloqade-0.37.0/src/bloqade/gemini/device/physical_simulator.py +261 -0
- bloqade-0.37.0/src/bloqade/gemini/device/simulator.py +144 -0
- bloqade-0.37.0/src/bloqade/gemini/device/simulator_backend.py +580 -0
- bloqade-0.37.0/src/bloqade/gemini/logical/__init__.py +96 -0
- bloqade-0.37.0/src/bloqade/gemini/logical/cirq_conversion.py +104 -0
- bloqade-0.37.0/src/bloqade/gemini/logical/extensions/__init__.py +14 -0
- bloqade-0.37.0/src/bloqade/gemini/logical/extensions/broadcast.py +17 -0
- bloqade-0.37.0/src/bloqade/gemini/logical/extensions/star.py +13 -0
- bloqade-0.37.0/src/bloqade/gemini/logical/group.py +151 -0
- bloqade-0.37.0/src/bloqade/gemini/logical/stdlib/__init__.py +8 -0
- bloqade-0.37.0/src/bloqade/gemini/logical/stdlib/broadcast.py +28 -0
- bloqade-0.37.0/src/bloqade/gemini/logical/stdlib/post_processing.py +42 -0
- bloqade-0.37.0/src/bloqade/gemini/logical/stdlib/qubit_allocation.py +48 -0
- bloqade-0.37.0/src/bloqade/gemini/logical/studio.py +250 -0
- bloqade-0.37.0/src/bloqade/gemini/logical/validation/__init__.py +6 -0
- bloqade-0.37.0/src/bloqade/gemini/logical/validation/arguments.py +71 -0
- bloqade-0.37.0/src/bloqade/gemini/logical/validation/extensions/__init__.py +9 -0
- bloqade-0.37.0/src/bloqade/gemini/logical/validation/extensions/analysis.py +131 -0
- bloqade-0.37.0/src/bloqade/gemini/logical/validation/extensions/impls.py +16 -0
- bloqade-0.37.0/src/bloqade/gemini/physical/__init__.py +16 -0
- bloqade-0.37.0/src/bloqade/gemini/physical/group.py +118 -0
- bloqade-0.37.0/src/bloqade/gemini/post_processing.py +157 -0
- bloqade-0.37.0/src/bloqade/gemini/steane_defaults.py +58 -0
- bloqade-0.37.0/test/gemini/__init__.py +0 -0
- bloqade-0.37.0/test/gemini/_squin_to_move_helper.py +58 -0
- bloqade-0.37.0/test/gemini/analysis/__init__.py +0 -0
- bloqade-0.37.0/test/gemini/analysis/test_logical_validation.py +357 -0
- bloqade-0.37.0/test/gemini/analysis/test_output.py +0 -0
- bloqade-0.37.0/test/gemini/compiler/__init__.py +0 -0
- bloqade-0.37.0/test/gemini/compiler/analysis/__init__.py +0 -0
- bloqade-0.37.0/test/gemini/compiler/analysis/atom/__init__.py +0 -0
- bloqade-0.37.0/test/gemini/compiler/analysis/atom/test_measure_id_invariant.py +142 -0
- bloqade-0.37.0/test/gemini/compiler/analysis/atom/test_measurement_positions.py +408 -0
- bloqade-0.37.0/test/gemini/compiler/analysis/atom/test_shot_remapping.py +365 -0
- bloqade-0.37.0/test/gemini/compiler/arch/__init__.py +0 -0
- bloqade-0.37.0/test/gemini/compiler/arch/gemini/__init__.py +0 -0
- bloqade-0.37.0/test/gemini/compiler/arch/gemini/test_state_injection.py +408 -0
- bloqade-0.37.0/test/gemini/compiler/bytecode/__init__.py +0 -0
- bloqade-0.37.0/test/gemini/compiler/bytecode/test_serialization.py +143 -0
- bloqade-0.37.0/test/gemini/compiler/dialects/__init__.py +0 -0
- bloqade-0.37.0/test/gemini/compiler/dialects/test_arch_cz_partner.py +254 -0
- bloqade-0.37.0/test/gemini/compiler/dialects/test_arch_location_attr.py +152 -0
- bloqade-0.37.0/test/gemini/compiler/integration/__init__.py +0 -0
- bloqade-0.37.0/test/gemini/compiler/integration/test_explicit_allocation.py +212 -0
- bloqade-0.37.0/test/gemini/compiler/pipeline/__init__.py +0 -0
- bloqade-0.37.0/test/gemini/compiler/pipeline/test_logical_pipeline.py +243 -0
- bloqade-0.37.0/test/gemini/compiler/pipeline/test_physical_pipeline.py +208 -0
- bloqade-0.37.0/test/gemini/compiler/rewrite/__init__.py +0 -0
- bloqade-0.37.0/test/gemini/compiler/rewrite/test_eliminate_rz.py +738 -0
- bloqade-0.37.0/test/gemini/compiler/test_cudaq_integration.py +193 -0
- bloqade-0.37.0/test/gemini/compiler/test_device.py +701 -0
- bloqade-0.37.0/test/gemini/compiler/test_integration.py +138 -0
- bloqade-0.37.0/test/gemini/compiler/test_noise_init_generator.py +233 -0
- bloqade-0.37.0/test/gemini/compiler/validation/__init__.py +0 -0
- bloqade-0.37.0/test/gemini/compiler/validation/test_flat_block.py +112 -0
- bloqade-0.37.0/test/gemini/conftest.py +3 -0
- bloqade-0.37.0/test/gemini/decoding/__init__.py +0 -0
- bloqade-0.37.0/test/gemini/decoding/test_decoding_imports.py +67 -0
- bloqade-0.37.0/test/gemini/decoding/test_experiment.py +568 -0
- bloqade-0.37.0/test/gemini/decoding/test_msd_experiment_regressions.py +355 -0
- bloqade-0.37.0/test/gemini/decoding/test_msd_postselection_integration.py +107 -0
- bloqade-0.37.0/test/gemini/decoding/test_msd_postselection_numerical_regression.py +112 -0
- bloqade-0.37.0/test/gemini/decoding/test_msd_utils.py +62 -0
- bloqade-0.37.0/test/gemini/decoding/test_msd_utils_restored_helpers.py +209 -0
- bloqade-0.37.0/test/gemini/device/__init__.py +0 -0
- bloqade-0.37.0/test/gemini/device/conftest.py +40 -0
- bloqade-0.37.0/test/gemini/device/test_device.py +137 -0
- bloqade-0.37.0/test/gemini/device/test_end_to_end.py +296 -0
- bloqade-0.37.0/test/gemini/device/test_future.py +778 -0
- bloqade-0.37.0/test/gemini/device/test_result.py +1900 -0
- bloqade-0.37.0/test/gemini/device/test_task.py +425 -0
- bloqade-0.37.0/test/gemini/test_arrange_public_api.py +41 -0
- bloqade-0.37.0/test/gemini/test_eliminate_rz_pipeline.py +290 -0
- bloqade-0.37.0/test/gemini/test_logical_cirq_conversion.py +377 -0
- bloqade-0.37.0/test/gemini/test_logical_clifford_lowering.py +370 -0
- bloqade-0.37.0/test/gemini/test_logical_gate_exports.py +40 -0
- bloqade-0.37.0/test/gemini/test_measurement_permutation_regression.py +179 -0
- bloqade-0.37.0/test/gemini/test_movement_kernel.py +362 -0
- bloqade-0.37.0/test/gemini/test_optional_tsim_import.py +149 -0
- bloqade-0.37.0/test/gemini/test_package_boundary.py +105 -0
- bloqade-0.37.0/test/gemini/test_permute.py +392 -0
- bloqade-0.37.0/test/gemini/test_physical_cirq_conversion.py +101 -0
- bloqade-0.37.0/test/gemini/test_physical_qubit_width.py +44 -0
- bloqade-0.37.0/test/gemini/test_physical_simulator.py +635 -0
- bloqade-0.37.0/test/gemini/test_post_processing.py +167 -0
- bloqade-0.37.0/test/gemini/test_qalloc_at.py +54 -0
- bloqade-0.37.0/test/gemini/test_rewrite.py +193 -0
- bloqade-0.37.0/test/gemini/test_simulator_backend.py +766 -0
- bloqade-0.37.0/test/gemini/test_star_rz.py +233 -0
- bloqade-0.37.0/test/gemini/test_steane_transversal_x_flip_regression.py +187 -0
- bloqade-0.37.0/test/gemini/test_studio_url.py +252 -0
- bloqade-0.37.0/test/gemini/test_swap_gate_regression.py +76 -0
- bloqade-0.37.0/test/gemini/test_typeinfer.py +29 -0
- bloqade-0.37.0/test/gemini/validation/__init__.py +0 -0
- bloqade-0.37.0/test/gemini/validation/test_const_address_validation.py +88 -0
- bloqade-0.37.0/test/gemini/validation/test_extensions_validation.py +239 -0
- bloqade-0.37.0/test/gemini/validation/test_kernel_arguments.py +159 -0
- bloqade-0.37.0/test/gemini/validation/test_measurement_degrades_gracefully.py +32 -0
- bloqade-0.37.0/test/gemini/validation/test_new_at_validation.py +21 -0
- bloqade-0.37.0/test/gemini/validation/test_recursion_validation.py +552 -0
- bloqade-0.37.0/test/gemini/validation/test_static_call_validation.py +370 -0
- bloqade-0.37.0/test/test_bump_dependencies.py +70 -0
- bloqade-0.37.0/test/test_dependencies.py +11 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/uv.lock +1584 -1691
- bloqade-0.35.0.dev0/.github/workflows/ci.yml +0 -36
- bloqade-0.35.0.dev0/.github/workflows/lint.yml +0 -21
- bloqade-0.35.0.dev0/CONTRIBUTING.md +0 -64
- bloqade-0.35.0.dev0/PKG-INFO +0 -58
- bloqade-0.35.0.dev0/pyproject.toml +0 -116
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/.github/dependabot.yml +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/LICENSE +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/analog/assets/analog-logo-dark.svg +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/analog/assets/analog-logo.svg +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/analog/assets/favicon.ico +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/analog/assets/index/geometry-visualization.png +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/analog/assets/index/hardware-program-visualization.png +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/analog/assets/index/program-visualization.png +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/analog/assets/index/report-visualization.png +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/analog/assets/logo-dark.svg +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/analog/assets/logo.svg +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/analog/assets/quick_start/geometry-visualization.png +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/analog/assets/quick_start/ipython-hints.gif +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/analog/assets/quick_start/jupyter-hints.gif +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/analog/assets/quick_start/pulse-sequence-visualization.png +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/analog/assets/quick_start/pycharm-hints.gif +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/analog/assets/quick_start/report-visualization.png +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/analog/assets/quick_start/vscode-hints.gif +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/analog/assets/readme-gifs/graph-select.gif +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/analog/assets/readme-gifs/hover-bitstrings.gif +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/analog/assets/readme-gifs/locations-hover.gif +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/analog/assets/readme-gifs/smart-docs.gif +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/analog/assets/readme-gifs/visualize-bitstrings.gif +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/analog/contributing/asking-a-question.md +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/analog/contributing/code-of-conduct.md +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/analog/contributing/community-slack.md +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/analog/contributing/design-philosophy-and-architecture.md +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/analog/contributing/documentation-issues.md +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/analog/contributing/feature-requests.md +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/analog/contributing/index.md +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/analog/contributing/providing-feedback.md +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/analog/contributing/reporting-a-bug.md +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/analog/home/background.md +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/analog/home/emulation.md +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/analog/home/geometry.md +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/analog/home/gotchas.md +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/analog/home/migration.md +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/analog/home/quick_start.md +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/analog/home/submission.md +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/analog/home/visualization.md +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/analog/home/waveforms.md +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/analog/index.md +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/analog/reference/hardware-capabilities.md +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/analog/reference/overview.md +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/analog/reference/standard.md +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/assets/favicon.ico +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/assets/index/geometry-visualization.png +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/assets/index/hardware-program-visualization.png +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/assets/index/program-visualization.png +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/assets/index/report-visualization.png +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/assets/logo-dark.svg +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/assets/logo.svg +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/assets/readme-gifs/graph-select.gif +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/assets/readme-gifs/hover-bitstrings.gif +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/assets/readme-gifs/locations-hover.gif +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/assets/readme-gifs/smart-docs.gif +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/assets/readme-gifs/visualize-bitstrings.gif +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/background.md +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/blog/.authors.yml +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/blog/index.md +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/blog/posts/2023/bloqade-release.md +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/blog/posts/2025/a-new-journey.md +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/blog/posts/2025/example_annotation.svg +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/blog/posts/2025/flowchart.png +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/contrib.md +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/digital/cirq_interop/cirq_to_squin.md +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/digital/cirq_interop/index.md +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/digital/cirq_interop/squin_to_cirq.md +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/digital/compilation.md +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/digital/dialects_and_kernels/index.md +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/digital/dialects_and_kernels/qasm2.md +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/digital/dialects_and_kernels/qft-pprint.png +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/digital/dialects_and_kernels/qft-qasm2.png +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/digital/dialects_and_kernels/squin-ir-1.png +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/digital/dialects_and_kernels/squin-ir-2.png +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/digital/dialects_and_kernels/squin.md +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/digital/dialects_and_kernels/stim.md +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/digital/examples/gemini_logical/image.svg +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/digital/examples/gemini_logical/simulator_device_demo.py +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/digital/examples/ghz_linear_circuit.svg +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/digital/examples/ghz_log_circuit.svg +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/digital/examples/index.md +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/digital/examples/interop/noisy_ghz.py +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/digital/examples/interop/noisy_ghz_fidelity.svg +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/digital/examples/interop/noisy_ghz_modified.svg +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/digital/examples/qasm2/ghz.py +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/digital/examples/qasm2/pauli_exponentiation.py +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/digital/examples/qasm2/pauli_exponentiation.svg +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/digital/examples/qasm2/qaoa.py +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/digital/examples/qasm2/qft.py +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/digital/examples/qasm2/repeat_until_success.py +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/digital/examples/qft.svg +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/digital/examples/squin/deutsch_squin.py +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/digital/examples/squin/ghz.py +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/digital/examples/tsim/magic_state_distillation.py +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/digital/index.md +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/digital/simulator_device/simulator_device.md +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/digital/simulator_device/tasks.md +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/digital/tutorials/circuits_with_bloqade.py +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/digital/tutorials/figures/ghz_linear_circuit.svg +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/digital/tutorials/figures/ghz_log_circuit.svg +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/digital/tutorials/figures/hypercube_original.png +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/digital/tutorials/figures/hypercube_parallel.png +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/index.md +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/javascripts/katex.js +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/quick_start/analog/geometry-visualization.png +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/quick_start/analog/index.md +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/quick_start/analog/ipython-hints.gif +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/quick_start/analog/jupyter-hints.gif +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/quick_start/analog/pulse-sequence-visualization.png +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/quick_start/analog/pycharm-hints.gif +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/quick_start/analog/report-visualization.png +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/quick_start/analog/vscode-hints.gif +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/reference/index.md +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/scripts/gen_ref_nav.py +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/docs/stylesheets/extra.css +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/justfile +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/src/bloqade/README.md +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/test/__init__.py +0 -0
- {bloqade-0.35.0.dev0 → bloqade-0.37.0}/test/test_hello.py +0 -0
|
@@ -12,7 +12,7 @@ runs:
|
|
|
12
12
|
|
|
13
13
|
- name: clone the latest bloqade-circuit release
|
|
14
14
|
id: clone_bloqade_circuit
|
|
15
|
-
uses: actions/checkout@
|
|
15
|
+
uses: actions/checkout@v7
|
|
16
16
|
with:
|
|
17
17
|
repository: QuEraComputing/bloqade-circuit
|
|
18
18
|
path: 'submodules/bloqade-circuit'
|
|
@@ -27,7 +27,7 @@ runs:
|
|
|
27
27
|
|
|
28
28
|
- name: clone the latest bloqade-analog release
|
|
29
29
|
id: clone_bloqade_analog
|
|
30
|
-
uses: actions/checkout@
|
|
30
|
+
uses: actions/checkout@v7
|
|
31
31
|
with:
|
|
32
32
|
repository: QuEraComputing/bloqade-analog
|
|
33
33
|
path: 'submodules/bloqade-analog'
|
|
@@ -42,7 +42,7 @@ runs:
|
|
|
42
42
|
|
|
43
43
|
- name: clone the latest bloqade-lanes release
|
|
44
44
|
id: clone_bloqade_lanes
|
|
45
|
-
uses: actions/checkout@
|
|
45
|
+
uses: actions/checkout@v7
|
|
46
46
|
with:
|
|
47
47
|
repository: QuEraComputing/bloqade-lanes
|
|
48
48
|
path: 'submodules/bloqade-lanes'
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// Loaded only from main, before the backport action changes the checkout.
|
|
2
|
+
function targetBranches(labels) {
|
|
3
|
+
return [...new Set(labels.flatMap(({ name }) => {
|
|
4
|
+
const match = /^backport v(\d+)\.(\d+)$/.exec(name);
|
|
5
|
+
return match ? [`release-${match[1]}-${match[2]}`] : [];
|
|
6
|
+
}))];
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
async function prepare({ github, context, core, pullNumber }) {
|
|
10
|
+
if (!/^[1-9]\d*$/.test(String(pullNumber))) {
|
|
11
|
+
throw new Error('Provide a positive integer source PR number.');
|
|
12
|
+
}
|
|
13
|
+
const { data: pr } = await github.rest.pulls.get({
|
|
14
|
+
...context.repo,
|
|
15
|
+
pull_number: Number(pullNumber),
|
|
16
|
+
});
|
|
17
|
+
if (!pr.merged || pr.base.ref !== 'main' ||
|
|
18
|
+
pr.base.repo.full_name !== `${context.repo.owner}/${context.repo.repo}`) {
|
|
19
|
+
throw new Error('Only PRs merged into this repository\'s main can be backported.');
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Fetch current labels rather than relying on an old event payload on retries.
|
|
23
|
+
const targets = targetBranches(pr.labels);
|
|
24
|
+
for (const branch of targets) {
|
|
25
|
+
try {
|
|
26
|
+
await github.rest.repos.getBranch({ ...context.repo, branch });
|
|
27
|
+
} catch (error) {
|
|
28
|
+
if (error.status === 404) {
|
|
29
|
+
throw new Error(`Target ${branch} does not exist. Create the release branch or remove its backport label.`);
|
|
30
|
+
}
|
|
31
|
+
throw error;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
core.setOutput('pull_number', String(pr.number));
|
|
35
|
+
core.setOutput('targets', targets.join(' '));
|
|
36
|
+
core.info(targets.length
|
|
37
|
+
? `Backport #${pr.number} to ${targets.join(', ')}`
|
|
38
|
+
: `No backport v<major>.<minor> labels on #${pr.number}; nothing to do.`);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
module.exports = { targetBranches, prepare };
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
const assert = require('node:assert/strict');
|
|
2
|
+
const { test } = require('node:test');
|
|
3
|
+
const { targetBranches, prepare } = require('./backport-targets.cjs');
|
|
4
|
+
|
|
5
|
+
const labels = (...names) => names.map(name => ({ name }));
|
|
6
|
+
|
|
7
|
+
test('maps Lanes-style labels to release branches, with duplicates removed', () => {
|
|
8
|
+
assert.deepEqual(targetBranches(labels('backport v0.35', 'bug', 'backport v0.36', 'backport v0.35')),
|
|
9
|
+
['release-0-35', 'release-0-36']);
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
test('ignores malformed labels and arbitrary refs or shell expressions', () => {
|
|
13
|
+
assert.deepEqual(targetBranches(labels('backport main', 'backport v0.36.1',
|
|
14
|
+
'backport v0x36', 'backport v0.36; echo bad', 'backport v0.36\n',
|
|
15
|
+
'backport v0.36/other', 'backport v$(id).1')), []);
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
function fixture(overrides = {}) {
|
|
19
|
+
const pr = { number: 42, merged: true,
|
|
20
|
+
base: { ref: 'main', repo: { full_name: 'QuEraComputing/bloqade' } },
|
|
21
|
+
labels: labels('backport v0.36'), ...overrides };
|
|
22
|
+
const outputs = {};
|
|
23
|
+
const branches = [];
|
|
24
|
+
const github = { rest: {
|
|
25
|
+
pulls: { get: async ({ pull_number }) => {
|
|
26
|
+
assert.equal(pull_number, 42);
|
|
27
|
+
return { data: pr };
|
|
28
|
+
} },
|
|
29
|
+
repos: { getBranch: async ({ branch }) => { branches.push(branch); } },
|
|
30
|
+
} };
|
|
31
|
+
return { github, context: { repo: { owner: 'QuEraComputing', repo: 'bloqade' } },
|
|
32
|
+
core: { setOutput: (key, value) => { outputs[key] = value; }, info: () => {} },
|
|
33
|
+
pullNumber: '42', outputs, branches };
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
test('checks existing targets and emits action inputs from current PR labels', async () => {
|
|
37
|
+
const f = fixture({ labels: labels('backport v0.35', 'backport v0.36') });
|
|
38
|
+
await prepare(f);
|
|
39
|
+
assert.deepEqual(f.branches, ['release-0-35', 'release-0-36']);
|
|
40
|
+
assert.deepEqual(f.outputs, { pull_number: '42', targets: 'release-0-35 release-0-36' });
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
test('unlabeled merged PR is a no-op', async () => {
|
|
44
|
+
const f = fixture({ labels: labels('bug') });
|
|
45
|
+
await prepare(f);
|
|
46
|
+
assert.equal(f.outputs.targets, '');
|
|
47
|
+
assert.deepEqual(f.branches, []);
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
test('rejects invalid manual PR numbers before any API request', async () => {
|
|
51
|
+
for (const pullNumber of ['', '0', '-1', '1.2', '42; echo bad', '42\n']) {
|
|
52
|
+
const f = fixture();
|
|
53
|
+
await assert.rejects(prepare({ ...f, pullNumber }), /positive integer/);
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
test('rejects unmerged PRs, release-branch PRs, and a different repository', async () => {
|
|
58
|
+
for (const overrides of [
|
|
59
|
+
{ merged: false },
|
|
60
|
+
{ base: { ref: 'release-0-36', repo: { full_name: 'QuEraComputing/bloqade' } } },
|
|
61
|
+
{ base: { ref: 'main', repo: { full_name: 'someone/fork' } } },
|
|
62
|
+
]) {
|
|
63
|
+
const f = fixture(overrides);
|
|
64
|
+
await assert.rejects(prepare(f), /Only PRs merged/);
|
|
65
|
+
assert.deepEqual(f.branches, []);
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
test('missing target branches fail before any backport is started', async () => {
|
|
70
|
+
const f = fixture();
|
|
71
|
+
f.github.rest.repos.getBranch = async () => { throw { status: 404 }; };
|
|
72
|
+
await assert.rejects(prepare(f), /Target release-0-36 does not exist/);
|
|
73
|
+
assert.deepEqual(f.outputs, {});
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
test('permission and network errors are not mistaken for missing branches', async () => {
|
|
77
|
+
const f = fixture();
|
|
78
|
+
const failure = new Error('API unavailable');
|
|
79
|
+
f.github.rest.repos.getBranch = async () => { throw failure; };
|
|
80
|
+
await assert.rejects(prepare(f), error => error === failure);
|
|
81
|
+
});
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
"""Bump the minimum compatible versions of direct PyPI dependencies.
|
|
2
|
+
|
|
3
|
+
Only three-component stable releases are considered. Major releases and direct
|
|
4
|
+
Git dependencies are intentionally left for manual review.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
import argparse
|
|
10
|
+
import json
|
|
11
|
+
import os
|
|
12
|
+
import re
|
|
13
|
+
from pathlib import Path
|
|
14
|
+
from urllib.request import Request, urlopen
|
|
15
|
+
|
|
16
|
+
import tomllib
|
|
17
|
+
|
|
18
|
+
PIN = re.compile(
|
|
19
|
+
r"^(?P<name>[A-Za-z0-9_.-]+)(?:\[[^]]+\])?~=(?P<version>\d+\.\d+\.\d+)$"
|
|
20
|
+
)
|
|
21
|
+
VERSION = re.compile(r"^(\d+)\.(\d+)\.(\d+)$")
|
|
22
|
+
PROJECT_VERSION = re.compile(
|
|
23
|
+
r'(?m)^(version\s*=\s*")(?P<version>\d+\.\d+\.\d+[^"\n]*)(")$'
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def version_tuple(value: str) -> tuple[int, int, int] | None:
|
|
28
|
+
match = VERSION.fullmatch(value)
|
|
29
|
+
return tuple(map(int, match.groups())) if match else None
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def latest_compatible_release(
|
|
33
|
+
releases: dict[str, list[dict]], current: tuple[int, int, int]
|
|
34
|
+
) -> tuple[int, int, int] | None:
|
|
35
|
+
"""Return the newest non-yanked stable release in the current major series."""
|
|
36
|
+
candidates = (
|
|
37
|
+
parsed
|
|
38
|
+
for name, files in releases.items()
|
|
39
|
+
if (parsed := version_tuple(name)) is not None
|
|
40
|
+
and parsed[0] == current[0]
|
|
41
|
+
and parsed > current
|
|
42
|
+
and any(not file.get("yanked", False) for file in files)
|
|
43
|
+
)
|
|
44
|
+
return max(candidates, default=None)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def fetch_releases(name: str) -> dict[str, list[dict]]:
|
|
48
|
+
normalized = re.sub(r"[-_.]+", "-", name).lower()
|
|
49
|
+
request = Request(
|
|
50
|
+
f"https://pypi.org/pypi/{normalized}/json",
|
|
51
|
+
headers={"User-Agent": "bloqade-dependency-updater/1.0"},
|
|
52
|
+
)
|
|
53
|
+
with urlopen(request, timeout=30) as response:
|
|
54
|
+
return json.load(response)["releases"]
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def update_text(
|
|
58
|
+
text: str, release_fetcher=fetch_releases
|
|
59
|
+
) -> tuple[str, list[tuple[str, str, str]], bool]:
|
|
60
|
+
project = tomllib.loads(text)["project"]
|
|
61
|
+
changes: list[tuple[str, str, str]] = []
|
|
62
|
+
minor_bump = False
|
|
63
|
+
|
|
64
|
+
for requirement in project["dependencies"]:
|
|
65
|
+
if " @ git+" in requirement:
|
|
66
|
+
print(f"Skipping Git-source dependency: {requirement}")
|
|
67
|
+
continue
|
|
68
|
+
match = PIN.fullmatch(requirement)
|
|
69
|
+
if not match:
|
|
70
|
+
raise ValueError(f"Unsupported direct dependency constraint: {requirement}")
|
|
71
|
+
name, current_str = match.group("name", "version")
|
|
72
|
+
current = version_tuple(current_str)
|
|
73
|
+
assert current is not None
|
|
74
|
+
latest = latest_compatible_release(release_fetcher(name), current)
|
|
75
|
+
if latest is None:
|
|
76
|
+
continue
|
|
77
|
+
|
|
78
|
+
new_str = ".".join(map(str, latest))
|
|
79
|
+
replacement = requirement[: match.start("version")] + new_str
|
|
80
|
+
old_toml, new_toml = json.dumps(requirement), json.dumps(replacement)
|
|
81
|
+
if text.count(old_toml) != 1:
|
|
82
|
+
raise ValueError(
|
|
83
|
+
f"Could not uniquely find {requirement!r} in pyproject.toml"
|
|
84
|
+
)
|
|
85
|
+
text = text.replace(old_toml, new_toml, 1)
|
|
86
|
+
changes.append((name, current_str, new_str))
|
|
87
|
+
minor_bump |= latest[1] > current[1]
|
|
88
|
+
|
|
89
|
+
if minor_bump:
|
|
90
|
+
match = PROJECT_VERSION.search(text)
|
|
91
|
+
if match is None:
|
|
92
|
+
raise ValueError("Could not find the Bloqade project version")
|
|
93
|
+
current = match.group("version")
|
|
94
|
+
release, suffix = re.match(r"(\d+\.\d+\.\d+)(.*)", current).groups()
|
|
95
|
+
major, minor, _ = version_tuple(release)
|
|
96
|
+
bumped = f"{major}.{minor + 1}.0{suffix}"
|
|
97
|
+
text = text[: match.start("version")] + bumped + text[match.end("version") :]
|
|
98
|
+
|
|
99
|
+
tomllib.loads(text) # Validate before writing anything.
|
|
100
|
+
return text, changes, minor_bump
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
def main() -> None:
|
|
104
|
+
parser = argparse.ArgumentParser(description=__doc__)
|
|
105
|
+
parser.add_argument("--pyproject", type=Path, default=Path("pyproject.toml"))
|
|
106
|
+
parser.add_argument("--pr-body", type=Path)
|
|
107
|
+
args = parser.parse_args()
|
|
108
|
+
|
|
109
|
+
original = args.pyproject.read_text()
|
|
110
|
+
updated, changes, minor_bump = update_text(original)
|
|
111
|
+
if updated != original:
|
|
112
|
+
args.pyproject.write_text(updated)
|
|
113
|
+
|
|
114
|
+
for name, old, new in changes:
|
|
115
|
+
print(f"{name}: {old} -> {new}")
|
|
116
|
+
if minor_bump:
|
|
117
|
+
print("At least one minor dependency release; bumped Bloqade minor version")
|
|
118
|
+
if not changes:
|
|
119
|
+
print("No new compatible PyPI patch or minor releases")
|
|
120
|
+
|
|
121
|
+
if args.pr_body:
|
|
122
|
+
lines = [
|
|
123
|
+
"## Automated direct-dependency updates",
|
|
124
|
+
"",
|
|
125
|
+
*[f"- `{name}`: `{old}` → `{new}`" for name, old, new in changes],
|
|
126
|
+
"",
|
|
127
|
+
(
|
|
128
|
+
"Bloqade's minor version was bumped because at least one direct "
|
|
129
|
+
"dependency crossed a minor-version boundary."
|
|
130
|
+
if minor_bump
|
|
131
|
+
else "Bloqade's version is unchanged: these are patch-only updates."
|
|
132
|
+
),
|
|
133
|
+
"",
|
|
134
|
+
"The `uv.lock` file and CI checks are included for compatibility review.",
|
|
135
|
+
"Git-source dependencies are not release-monitored by this workflow.",
|
|
136
|
+
]
|
|
137
|
+
args.pr_body.write_text("\n".join(lines) + "\n")
|
|
138
|
+
|
|
139
|
+
if output := os.environ.get("GITHUB_OUTPUT"):
|
|
140
|
+
with Path(output).open("a") as stream:
|
|
141
|
+
stream.write(f"changed={'true' if changes else 'false'}\n")
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
if __name__ == "__main__":
|
|
145
|
+
main()
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Select stale mike doc versions to prune from the live site.
|
|
3
|
+
|
|
4
|
+
Reads `mike list -j` JSON on stdin and prints, one per line, the release
|
|
5
|
+
versions that should be deleted so that only the newest ``KEEP_RELEASES``
|
|
6
|
+
releases remain live (``dev`` and any non-release entries are always kept).
|
|
7
|
+
|
|
8
|
+
Older versions stay rebuildable from their git release tags and are captured
|
|
9
|
+
in the ``docs-archive-*`` GitHub release asset, so pruning them from the
|
|
10
|
+
deployed site loses nothing permanent.
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
import json
|
|
14
|
+
import os
|
|
15
|
+
import re
|
|
16
|
+
import sys
|
|
17
|
+
|
|
18
|
+
RELEASE_RE = re.compile(r"^v?\d+\.\d+")
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def is_release(version: str) -> bool:
|
|
22
|
+
return RELEASE_RE.match(version) is not None
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def sem_key(version: str):
|
|
26
|
+
return [int(n) for n in re.findall(r"\d+", version)]
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def main() -> int:
|
|
30
|
+
keep = int(os.environ.get("KEEP_RELEASES", "3"))
|
|
31
|
+
entries = json.load(sys.stdin)
|
|
32
|
+
releases = sorted(
|
|
33
|
+
(e["version"] for e in entries if is_release(e["version"])),
|
|
34
|
+
key=sem_key,
|
|
35
|
+
reverse=True,
|
|
36
|
+
)
|
|
37
|
+
for version in releases[keep:]:
|
|
38
|
+
print(version)
|
|
39
|
+
return 0
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
if __name__ == "__main__":
|
|
43
|
+
raise SystemExit(main())
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
name: Backport workflow tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
paths:
|
|
6
|
+
- .github/scripts/backport-*.cjs
|
|
7
|
+
- .github/workflows/backport*.yml
|
|
8
|
+
push:
|
|
9
|
+
branches: [main]
|
|
10
|
+
paths:
|
|
11
|
+
- .github/scripts/backport-*.cjs
|
|
12
|
+
- .github/workflows/backport*.yml
|
|
13
|
+
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
test:
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v7
|
|
22
|
+
- uses: actions/setup-node@v7
|
|
23
|
+
with:
|
|
24
|
+
node-version: '24'
|
|
25
|
+
- run: node --test .github/scripts/backport-targets.test.cjs
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
name: Backport merged PR
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request_target:
|
|
5
|
+
branches: [main]
|
|
6
|
+
types: [closed, labeled]
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
inputs:
|
|
9
|
+
pull_number:
|
|
10
|
+
description: Merged main PR to backport using its current backport labels
|
|
11
|
+
required: true
|
|
12
|
+
type: string
|
|
13
|
+
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
|
|
17
|
+
concurrency:
|
|
18
|
+
group: backport-${{ github.event.pull_request.number || inputs.pull_number }}
|
|
19
|
+
cancel-in-progress: false
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
backport:
|
|
23
|
+
if: >-
|
|
24
|
+
(github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main') ||
|
|
25
|
+
(github.event_name == 'pull_request_target' &&
|
|
26
|
+
github.event.pull_request.merged == true &&
|
|
27
|
+
(github.event.action == 'closed' || startsWith(github.event.label.name, 'backport v')))
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
permissions:
|
|
30
|
+
contents: write
|
|
31
|
+
pull-requests: write
|
|
32
|
+
steps:
|
|
33
|
+
# This privileged workflow never checks out or executes an unmerged PR.
|
|
34
|
+
# Do not execute repository scripts after the action cherry-picks changes.
|
|
35
|
+
- uses: actions/checkout@v7
|
|
36
|
+
with:
|
|
37
|
+
ref: main
|
|
38
|
+
token: ${{ secrets.BACKPORT_TOKEN || github.token }}
|
|
39
|
+
|
|
40
|
+
- name: Resolve and validate release targets
|
|
41
|
+
id: targets
|
|
42
|
+
uses: actions/github-script@v9
|
|
43
|
+
env:
|
|
44
|
+
SOURCE_PR: ${{ github.event.pull_request.number || inputs.pull_number }}
|
|
45
|
+
with:
|
|
46
|
+
script: |
|
|
47
|
+
const { prepare } = require('./.github/scripts/backport-targets.cjs');
|
|
48
|
+
await prepare({ github, context, core, pullNumber: process.env.SOURCE_PR });
|
|
49
|
+
|
|
50
|
+
- name: Explain token limitations
|
|
51
|
+
if: steps.targets.outputs.targets != ''
|
|
52
|
+
uses: actions/github-script@v9
|
|
53
|
+
env:
|
|
54
|
+
HAS_BACKPORT_TOKEN: ${{ secrets.BACKPORT_TOKEN != '' }}
|
|
55
|
+
with:
|
|
56
|
+
script: |
|
|
57
|
+
if (process.env.HAS_BACKPORT_TOKEN !== 'true') {
|
|
58
|
+
core.warning('Using GITHUB_TOKEN: a maintainer must approve the backport PR workflows before CI runs. See CONTRIBUTING.md for details and optional BACKPORT_TOKEN setup.');
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
- name: Create backport PRs
|
|
62
|
+
id: backport
|
|
63
|
+
if: steps.targets.outputs.targets != ''
|
|
64
|
+
uses: korthout/backport-action@8560fb503c275d433c56f05a2f64850093baa9f7 # v4
|
|
65
|
+
with:
|
|
66
|
+
github_token: ${{ secrets.BACKPORT_TOKEN || github.token }}
|
|
67
|
+
source_pr_number: ${{ steps.targets.outputs.pull_number }}
|
|
68
|
+
# Labels are translated and validated above, not interpreted as refs.
|
|
69
|
+
label_pattern: ''
|
|
70
|
+
target_branches: ${{ steps.targets.outputs.targets }}
|
|
71
|
+
branch_name: codex/backport-${pull_number}-to-${target_branch}
|
|
72
|
+
pull_title: '${pull_title} (backport of #${pull_number})'
|
|
73
|
+
copy_labels_pattern: '^(?!.*[Bb][Aa][Cc][Kk][Pp][Oo][Rr][Tt]).*$'
|
|
74
|
+
cherry_picking: auto
|
|
75
|
+
comment_style: summary
|
|
76
|
+
auto_merge_enabled: false
|
|
77
|
+
|
|
78
|
+
- name: Fail if any target could not be backported
|
|
79
|
+
if: steps.backport.outputs.was_successful == 'false'
|
|
80
|
+
uses: actions/github-script@v9
|
|
81
|
+
with:
|
|
82
|
+
script: core.setFailed('Some backports failed. See the summary comment on the source PR for recovery instructions.');
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
schedule:
|
|
9
|
+
- cron: '00 01 * * *'
|
|
10
|
+
concurrency:
|
|
11
|
+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
12
|
+
cancel-in-progress: true
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
build:
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
strategy:
|
|
18
|
+
matrix:
|
|
19
|
+
python-version: ["3.11", "3.12", "3.13", "3.14"]
|
|
20
|
+
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v7
|
|
23
|
+
- name: Install uv
|
|
24
|
+
uses: astral-sh/setup-uv@v7
|
|
25
|
+
with:
|
|
26
|
+
# Install a specific version of uv.
|
|
27
|
+
version: "0.13.5"
|
|
28
|
+
enable-cache: true
|
|
29
|
+
cache-dependency-glob: "uv.lock"
|
|
30
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
31
|
+
run: uv python install ${{ matrix.python-version }}
|
|
32
|
+
# `pyqrack-accel` is excluded: it installs pyqrack 2.x over the
|
|
33
|
+
# pyqrack-cpu 1.x that bloqade-circuit's simulator targets, which breaks
|
|
34
|
+
# every PyQrack-backed test (`unexpected keyword argument 'qubitCount'`).
|
|
35
|
+
- name: Install the project
|
|
36
|
+
run: uv sync --all-extras --no-extra pyqrack-accel --dev
|
|
37
|
+
- name: Run tests
|
|
38
|
+
run: uv run --locked --all-extras --no-extra pyqrack-accel pytest
|
|
39
|
+
|
|
40
|
+
# Long, environment-specific numerical regression; deselected from the main
|
|
41
|
+
# test run by pytest `addopts`. Needs `clifft`, which requires Python >= 3.12.
|
|
42
|
+
msd-numerical-regression:
|
|
43
|
+
name: MSD numerical regression (optional)
|
|
44
|
+
runs-on: ubuntu-latest
|
|
45
|
+
continue-on-error: true
|
|
46
|
+
steps:
|
|
47
|
+
- uses: actions/checkout@v7
|
|
48
|
+
- name: Install uv
|
|
49
|
+
uses: astral-sh/setup-uv@v7
|
|
50
|
+
with:
|
|
51
|
+
version: "0.13.5"
|
|
52
|
+
enable-cache: true
|
|
53
|
+
cache-dependency-glob: "uv.lock"
|
|
54
|
+
- name: Set up Python 3.12
|
|
55
|
+
run: |
|
|
56
|
+
uv python install 3.12
|
|
57
|
+
uv python pin 3.12
|
|
58
|
+
- name: Install the numerical-regression environment
|
|
59
|
+
run: uv sync --locked --dev --extra sim --extra decoding
|
|
60
|
+
- name: Run long MSD numerical regression
|
|
61
|
+
run: uv run --locked --extra sim --extra decoding pytest -m msd_numerical_regression -v
|
|
@@ -13,7 +13,7 @@ jobs:
|
|
|
13
13
|
name: Build documentation
|
|
14
14
|
runs-on: ubuntu-latest
|
|
15
15
|
steps:
|
|
16
|
-
- uses: actions/checkout@
|
|
16
|
+
- uses: actions/checkout@v7
|
|
17
17
|
- name: Install uv
|
|
18
18
|
uses: astral-sh/setup-uv@v7
|
|
19
19
|
with:
|
|
@@ -27,21 +27,21 @@ jobs:
|
|
|
27
27
|
# get latest dependencies from git directly
|
|
28
28
|
- name: clone the latest bloqade-circuit
|
|
29
29
|
id: clone_bloqade_circuit
|
|
30
|
-
uses: actions/checkout@
|
|
30
|
+
uses: actions/checkout@v7
|
|
31
31
|
with:
|
|
32
32
|
repository: QuEraComputing/bloqade-circuit
|
|
33
33
|
path: 'submodules/bloqade-circuit'
|
|
34
34
|
|
|
35
35
|
- name: clone the latest bloqade-lanes
|
|
36
36
|
id: clone_bloqade_lanes
|
|
37
|
-
uses: actions/checkout@
|
|
37
|
+
uses: actions/checkout@v7
|
|
38
38
|
with:
|
|
39
39
|
repository: QuEraComputing/bloqade-lanes
|
|
40
40
|
path: 'submodules/bloqade-lanes'
|
|
41
41
|
|
|
42
42
|
- name: clone the latest bloqade-analog
|
|
43
43
|
id: clone_bloqade_analog
|
|
44
|
-
uses: actions/checkout@
|
|
44
|
+
uses: actions/checkout@v7
|
|
45
45
|
with:
|
|
46
46
|
repository: QuEraComputing/bloqade-analog
|
|
47
47
|
path: 'submodules/bloqade-analog'
|
|
@@ -50,7 +50,7 @@ jobs:
|
|
|
50
50
|
run: uv add submodules/bloqade-circuit submodules/bloqade-lanes submodules/bloqade-analog
|
|
51
51
|
|
|
52
52
|
- name: Set up build cache
|
|
53
|
-
uses: actions/cache@
|
|
53
|
+
uses: actions/cache@v6
|
|
54
54
|
id: cache
|
|
55
55
|
with:
|
|
56
56
|
key: mkdocs-material-nightly-dev-${{ github.headref }}
|
|
@@ -4,16 +4,19 @@ on:
|
|
|
4
4
|
branches:
|
|
5
5
|
- main
|
|
6
6
|
|
|
7
|
+
# Serialize with every other workflow that writes to gh-pages (release deploy,
|
|
8
|
+
# history squash) so concurrent pushes can't clobber the branch. Queued dev
|
|
9
|
+
# deploys run in order rather than cancelling an in-flight gh-pages push.
|
|
7
10
|
concurrency:
|
|
8
|
-
group:
|
|
9
|
-
cancel-in-progress:
|
|
11
|
+
group: gh-pages-write
|
|
12
|
+
cancel-in-progress: false
|
|
10
13
|
|
|
11
14
|
jobs:
|
|
12
15
|
documentation:
|
|
13
16
|
name: Deploy dev documentation
|
|
14
17
|
runs-on: ubuntu-latest
|
|
15
18
|
steps:
|
|
16
|
-
- uses: actions/checkout@
|
|
19
|
+
- uses: actions/checkout@v7
|
|
17
20
|
with:
|
|
18
21
|
fetch-depth: 0
|
|
19
22
|
- name: Install uv
|
|
@@ -30,7 +33,7 @@ jobs:
|
|
|
30
33
|
uses: ./.github/pull_bloqade_submodules
|
|
31
34
|
|
|
32
35
|
- name: Set up build cache
|
|
33
|
-
uses: actions/cache@
|
|
36
|
+
uses: actions/cache@v6
|
|
34
37
|
id: cache
|
|
35
38
|
with:
|
|
36
39
|
key: mkdocs-material-${{ github.ref }}
|
|
@@ -13,7 +13,7 @@ jobs:
|
|
|
13
13
|
name: Build documentation
|
|
14
14
|
runs-on: ubuntu-latest
|
|
15
15
|
steps:
|
|
16
|
-
- uses: actions/checkout@
|
|
16
|
+
- uses: actions/checkout@v7
|
|
17
17
|
- name: Install uv
|
|
18
18
|
uses: astral-sh/setup-uv@v7
|
|
19
19
|
with:
|
|
@@ -28,7 +28,7 @@ jobs:
|
|
|
28
28
|
uses: ./.github/pull_bloqade_submodules
|
|
29
29
|
|
|
30
30
|
- name: Set up build cache
|
|
31
|
-
uses: actions/cache@
|
|
31
|
+
uses: actions/cache@v6
|
|
32
32
|
id: cache
|
|
33
33
|
with:
|
|
34
34
|
key: mkdocs-material-nightly-${{ github.headref }}
|
|
@@ -15,7 +15,7 @@ jobs:
|
|
|
15
15
|
name: Deploy preview documentation
|
|
16
16
|
runs-on: ubuntu-latest
|
|
17
17
|
steps:
|
|
18
|
-
- uses: actions/checkout@
|
|
18
|
+
- uses: actions/checkout@v7
|
|
19
19
|
|
|
20
20
|
- name: Install uv
|
|
21
21
|
uses: astral-sh/setup-uv@v7
|
|
@@ -32,7 +32,7 @@ jobs:
|
|
|
32
32
|
uses: ./.github/pull_bloqade_submodules
|
|
33
33
|
|
|
34
34
|
- name: Set up build cache
|
|
35
|
-
uses: actions/cache@
|
|
35
|
+
uses: actions/cache@v6
|
|
36
36
|
id: cache
|
|
37
37
|
with:
|
|
38
38
|
key: mkdocs-material-${{ github.ref }}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: Lint
|
|
2
|
+
on:
|
|
3
|
+
pull_request:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
concurrency:
|
|
8
|
+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
9
|
+
cancel-in-progress: true
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
ruff:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v7
|
|
16
|
+
# Intentionally unpinned: CI always runs the latest ruff so a new release
|
|
17
|
+
# that adds rules surfaces as a CI failure — our signal to bump the pinned
|
|
18
|
+
# ruff in .pre-commit-config.yaml (and fix/ignore the new findings).
|
|
19
|
+
- uses: chartboost/ruff-action@v1
|
|
20
|
+
with:
|
|
21
|
+
src: "./src"
|
|
22
|
+
black:
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v7
|
|
26
|
+
- uses: psf/black@stable
|
|
27
|
+
with:
|
|
28
|
+
src: "./src"
|