bloqade-circuit 0.7.7__tar.gz → 0.7.9__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.
Potentially problematic release.
This version of bloqade-circuit might be problematic. Click here for more details.
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/.github/workflows/ci.yml +1 -1
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/PKG-INFO +4 -5
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/pyproject.toml +4 -5
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/cirq_utils/__init__.py +1 -1
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/cirq_utils/noise/model.py +4 -3
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/cirq_utils/parallelize.py +9 -6
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/pyqrack/base.py +6 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/pyqrack/reg.py +6 -1
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/pyqrack/squin/noise/native.py +1 -1
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/pyqrack/squin/qubit.py +20 -3
- bloqade_circuit-0.7.9/src/bloqade/qasm2/passes/fold.py +41 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/rewrite/passes/__init__.py +1 -0
- bloqade_circuit-0.7.9/src/bloqade/rewrite/passes/aggressive_unroll.py +93 -0
- bloqade_circuit-0.7.9/src/bloqade/rewrite/passes/canonicalize_ilist.py +32 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/squin/cirq/lowering.py +5 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/squin/qubit.py +25 -2
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/analysis/measure_id/test_measure_id.py +14 -7
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/cirq_utils/test_parallelize.py +2 -2
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/qasm2/emit/test_qasm2_emit.py +27 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/squin/cirq/test_cirq_to_squin.py +6 -0
- bloqade_circuit-0.7.9/test/squin/test_qubit.py +48 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/uv.lock +26 -18
- bloqade_circuit-0.7.7/src/bloqade/qasm2/passes/fold.py +0 -100
- bloqade_circuit-0.7.7/src/bloqade/rewrite/passes/canonicalize_ilist.py +0 -28
- bloqade_circuit-0.7.7/src/bloqade/rewrite/rules/flatten_ilist.py +0 -51
- bloqade_circuit-0.7.7/src/bloqade/rewrite/rules/inline_getitem_ilist.py +0 -31
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/.github/dependabot.yml +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/.github/workflows/isort.yml +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/.github/workflows/lint.yml +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/.github/workflows/release.yml +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/.gitignore +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/.pre-commit-config.yaml +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/LICENSE +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/README.md +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/_typos.toml +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/justfile +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/analysis/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/analysis/address/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/analysis/address/analysis.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/analysis/address/impls.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/analysis/address/lattice.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/analysis/fidelity/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/analysis/fidelity/analysis.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/analysis/measure_id/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/analysis/measure_id/analysis.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/analysis/measure_id/impls.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/analysis/measure_id/lattice.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/cirq_utils/lineprog.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/cirq_utils/noise/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/cirq_utils/noise/_two_zone_utils.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/cirq_utils/noise/conflict_graph.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/cirq_utils/noise/transform.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/device.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/native/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/native/_prelude.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/native/dialects/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/native/dialects/gates/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/native/dialects/gates/_dialect.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/native/dialects/gates/_interface.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/native/dialects/gates/stmts.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/native/stdlib/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/native/stdlib/broadcast.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/native/stdlib/simple.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/pyqrack/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/pyqrack/device.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/pyqrack/native.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/pyqrack/noise/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/pyqrack/noise/native.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/pyqrack/qasm2/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/pyqrack/qasm2/core.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/pyqrack/qasm2/glob.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/pyqrack/qasm2/parallel.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/pyqrack/qasm2/uop.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/pyqrack/squin/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/pyqrack/squin/noise/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/pyqrack/squin/op.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/pyqrack/squin/runtime.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/pyqrack/squin/wire.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/pyqrack/target.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/pyqrack/task.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/_qasm_loading.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/_wrappers.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/dialects/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/dialects/core/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/dialects/core/_dialect.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/dialects/core/_emit.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/dialects/core/_typeinfer.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/dialects/core/address.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/dialects/core/stmts.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/dialects/expr/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/dialects/expr/_dialect.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/dialects/expr/_emit.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/dialects/expr/_from_python.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/dialects/expr/_interp.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/dialects/expr/stmts.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/dialects/glob.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/dialects/indexing.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/dialects/inline.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/dialects/noise/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/dialects/noise/_dialect.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/dialects/noise/fidelity.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/dialects/noise/model.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/dialects/noise/stmts.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/dialects/parallel.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/dialects/uop/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/dialects/uop/_dialect.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/dialects/uop/_emit.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/dialects/uop/schedule.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/dialects/uop/stmts.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/emit/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/emit/base.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/emit/gate.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/emit/impls/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/emit/impls/noise.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/emit/main.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/emit/target.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/glob.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/groups.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/noise.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/parallel.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/parse/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/parse/ast.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/parse/build.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/parse/lowering.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/parse/parser.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/parse/print.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/parse/qasm2.lark +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/parse/visitor.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/parse/visitor.pyi +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/passes/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/passes/glob.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/passes/lift_qubits.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/passes/noise.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/passes/parallel.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/passes/py2qasm.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/passes/qasm2py.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/passes/unroll_if.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/rewrite/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/rewrite/desugar.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/rewrite/glob.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/rewrite/insert_qubits.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/rewrite/native_gates.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/rewrite/noise/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/rewrite/noise/heuristic_noise.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/rewrite/noise/remove_noise.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/rewrite/parallel_to_glob.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/rewrite/parallel_to_uop.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/rewrite/register.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/rewrite/uop_to_parallel.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qasm2/types.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qbraid/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qbraid/lowering.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qbraid/schema.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qbraid/simulation_result.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/qbraid/target.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/rewrite/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/rewrite/rules/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/rewrite/rules/split_ifs.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/squin/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/squin/_typeinfer.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/squin/analysis/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/squin/analysis/address_impl.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/squin/analysis/nsites/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/squin/analysis/nsites/analysis.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/squin/analysis/nsites/impls.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/squin/analysis/nsites/lattice.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/squin/analysis/schedule.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/squin/cirq/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/squin/cirq/emit/emit_circuit.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/squin/cirq/emit/noise.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/squin/cirq/emit/op.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/squin/cirq/emit/qubit.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/squin/cirq/emit/runtime.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/squin/groups.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/squin/lowering.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/squin/noise/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/squin/noise/_dialect.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/squin/noise/_wrapper.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/squin/noise/rewrite.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/squin/noise/stmts.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/squin/op/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/squin/op/_dialect.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/squin/op/_wrapper.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/squin/op/number.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/squin/op/rewrite.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/squin/op/stdlib.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/squin/op/stmts.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/squin/op/traits.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/squin/op/types.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/squin/parallel.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/squin/rewrite/U3_to_clifford.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/squin/rewrite/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/squin/rewrite/canonicalize.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/squin/rewrite/desugar.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/squin/rewrite/remove_dangling_qubits.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/squin/rewrite/wrap_analysis.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/squin/stdlib/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/squin/stdlib/channel.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/squin/stdlib/gate.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/squin/types.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/squin/wire.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/_wrappers.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/dialects/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/dialects/auxiliary/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/dialects/auxiliary/_dialect.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/dialects/auxiliary/emit.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/dialects/auxiliary/interp.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/dialects/auxiliary/lowering.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/dialects/auxiliary/stmts/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/dialects/auxiliary/stmts/annotate.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/dialects/auxiliary/stmts/const.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/dialects/auxiliary/types.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/dialects/collapse/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/dialects/collapse/_dialect.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/dialects/collapse/emit_str.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/dialects/collapse/stmts/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/dialects/collapse/stmts/measure.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/dialects/collapse/stmts/pp_measure.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/dialects/collapse/stmts/reset.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/dialects/gate/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/dialects/gate/_dialect.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/dialects/gate/emit.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/dialects/gate/stmts/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/dialects/gate/stmts/base.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/dialects/gate/stmts/clifford_1q.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/dialects/gate/stmts/clifford_2q.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/dialects/gate/stmts/control_2q.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/dialects/gate/stmts/pp.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/dialects/noise/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/dialects/noise/_dialect.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/dialects/noise/emit.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/dialects/noise/stmts.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/emit/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/emit/stim_str.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/groups.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/parse/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/parse/lowering.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/passes/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/passes/simplify_ifs.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/passes/squin_to_stim.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/rewrite/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/rewrite/ifs_to_stim.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/rewrite/py_constant_to_stim.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/rewrite/qubit_to_stim.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/rewrite/squin_measure.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/rewrite/squin_noise.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/rewrite/util.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/rewrite/wire_identity_elimination.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/rewrite/wire_to_stim.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/upstream/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/stim/upstream/from_squin.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/task.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/test_utils.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/types.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/visual/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/visual/animation/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/visual/animation/animate.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/visual/animation/base.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/visual/animation/gate_event.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/visual/animation/runtime/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/visual/animation/runtime/aod.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/visual/animation/runtime/atoms.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/visual/animation/runtime/ppoly.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/visual/animation/runtime/qpustate.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/src/bloqade/visual/animation/runtime/utils.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/analysis/address/test_qubit_analysis.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/analysis/address/test_wire_analysis.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/analysis/address/util.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/analysis/fidelity/test_fidelity.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/cirq_utils/noise/test_noise_models.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/cirq_utils/noise/test_noisy_ghz.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/cirq_utils/noise/test_one_zone_correlated_noise.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/cirq_utils/test_lpsolvers.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/cirq_utils/test_transpile.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/native/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/native/test_stdlib.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/pyqrack/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/pyqrack/runtime/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/pyqrack/runtime/noise/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/pyqrack/runtime/noise/qasm2/test_loss.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/pyqrack/runtime/noise/qasm2/test_pauli.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/pyqrack/runtime/test_dyn_memory.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/pyqrack/runtime/test_qrack.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/pyqrack/squin/test_kernel.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/pyqrack/squin/test_noise.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/pyqrack/test_target.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/qasm2/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/qasm2/analysis/test_dag.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/qasm2/emit/test_extended.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/qasm2/emit/test_extended_noise.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/qasm2/emit/test_qasm2.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/qasm2/parse/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/qasm2/parse/invalid_programs/invalid_if.qasm +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/qasm2/parse/programs/README.md +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/qasm2/parse/programs/global.qasm +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/qasm2/parse/programs/iqft1.qasm +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/qasm2/parse/programs/main.qasm +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/qasm2/parse/programs/noise.qasm +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/qasm2/parse/programs/para.qasm +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/qasm2/parse/programs/process_tomo.qasm +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/qasm2/parse/programs/qelib1.inc +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/qasm2/parse/programs/qft.qasm +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/qasm2/parse/programs/qft2.qasm +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/qasm2/parse/programs/rb.qasm +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/qasm2/parse/programs/rep_code.qasm +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/qasm2/parse/programs/ripple_carry_adder.qasm +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/qasm2/parse/programs/tele.qasm +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/qasm2/parse/programs/valid_if.qasm +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/qasm2/parse/test_ast.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/qasm2/parse/test_roundtrip.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/qasm2/passes/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/qasm2/passes/test_global_to_parallel.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/qasm2/passes/test_global_to_uop.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/qasm2/passes/test_heuristic_noise.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/qasm2/passes/test_parallel_to_global.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/qasm2/passes/test_parallel_to_uop.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/qasm2/passes/test_qasm2py.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/qasm2/passes/test_unroll_if.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/qasm2/passes/test_uop_to_parallel.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/qasm2/test_count.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/qasm2/test_inline.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/qasm2/test_lowering.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/qasm2/test_native.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/qasm2/test_two2one.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/qbraid/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/qbraid/test_clean_circuit.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/qbraid/test_lowering.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/qbraid/test_target.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/sample/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/sample/test_noise_model.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/squin/analysis/test_nsites_analysis.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/squin/cirq/test_squin_noise_to_cirq.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/squin/cirq/test_squin_to_cirq.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/squin/op/test_reset.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/squin/rewrite/test_U3_to_clifford.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/squin/rewrite/test_canonicalize.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/squin/rewrite/test_desugar.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/squin/rewrite/test_mult_rewrite.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/squin/test_constprop.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/squin/test_stdlib_shorthands.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/squin/test_sugar.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/squin/test_typeinfer.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/squin/wire/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/squin/wire/test_check.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/dialects/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/dialects/stim/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/dialects/stim/emit/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/dialects/stim/emit/base.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/dialects/stim/emit/test_stim_1q.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/dialects/stim/emit/test_stim_ctrl.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/dialects/stim/emit/test_stim_detector.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/dialects/stim/emit/test_stim_meas.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/dialects/stim/emit/test_stim_noise.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/dialects/stim/emit/test_stim_obs_inc.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/dialects/stim/emit/test_stim_ppmeas.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/dialects/stim/emit/test_stim_qubit_coords.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/dialects/stim/emit/test_stim_spp.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/dialects/stim/test_stim_circuits.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/dialects/stim/test_stim_const.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/parse/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/parse/base.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/parse/test_parse.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/parse/test_parse_clifford.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/parse/test_parse_control.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/parse/test_parse_custom.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/parse/test_parse_noise.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/parse/test_parse_spp.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/passes/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/passes/stim_reference_programs/noise/apply_depolarize1.stim +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/passes/stim_reference_programs/noise/apply_loss.stim +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/passes/stim_reference_programs/noise/apply_pauli_channel_1.stim +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/passes/stim_reference_programs/noise/broadcast_depolarize1.stim +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/passes/stim_reference_programs/noise/broadcast_depolarize2.stim +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/passes/stim_reference_programs/noise/broadcast_iid_bit_flip_channel.stim +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/passes/stim_reference_programs/noise/broadcast_iid_phase_flip_channel.stim +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/passes/stim_reference_programs/noise/broadcast_iid_y_flip_channel.stim +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/passes/stim_reference_programs/noise/broadcast_pauli_channel_1.stim +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/passes/stim_reference_programs/noise/broadcast_pauli_channel_1_many_qubits.stim +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/passes/stim_reference_programs/noise/broadcast_pauli_channel_1_reuse.stim +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/passes/stim_reference_programs/noise/broadcast_pauli_channel_2.stim +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/passes/stim_reference_programs/noise/broadcast_pauli_channel_2_reuse_on_4_qubits.stim +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/passes/stim_reference_programs/noise/wire_apply_pauli_channel_1.stim +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/passes/stim_reference_programs/pure_squin_rewrite.txt +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/passes/stim_reference_programs/qubit/addition_assignment_measure.stim +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/passes/stim_reference_programs/qubit/alias_with_measure_list.stim +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/passes/stim_reference_programs/qubit/complex_storage_index_order.stim +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/passes/stim_reference_programs/qubit/for_loop_nontrivial_index.stim +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/passes/stim_reference_programs/qubit/measure_desugar.stim +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/passes/stim_reference_programs/qubit/nested_for_loop.stim +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/passes/stim_reference_programs/qubit/nested_list.stim +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/passes/stim_reference_programs/qubit/non_pure_loop_iterator.stim +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/passes/stim_reference_programs/qubit/pick_if_else.stim +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/passes/stim_reference_programs/qubit/qubit.stim +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/passes/stim_reference_programs/qubit/qubit_broadcast.stim +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/passes/stim_reference_programs/qubit/qubit_loss.stim +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/passes/stim_reference_programs/qubit/qubit_reset.stim +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/passes/stim_reference_programs/qubit/record_index_order.stim +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/passes/stim_reference_programs/qubit/simple_if_rewrite.stim +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/passes/stim_reference_programs/qubit/u3_to_clifford.stim +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/passes/stim_reference_programs/wire/wire.stim +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/passes/stim_reference_programs/wire/wire_apply.stim +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/passes/stim_reference_programs/wire/wire_apply_control.stim +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/passes/stim_reference_programs/wire/wire_broadcast.stim +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/passes/stim_reference_programs/wire/wire_broadcast_control.stim +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/passes/stim_reference_programs/wire/wire_measure.stim +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/passes/stim_reference_programs/wire/wire_multiple_apply.stim +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/passes/stim_reference_programs/wire/wire_qubit_loss.stim +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/passes/stim_reference_programs/wire/wire_reset.stim +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/passes/test_squin_meas_to_stim.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/passes/test_squin_noise_to_stim.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/passes/test_squin_qubit_to_stim.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/passes/test_squin_wire_to_stim.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/test_measure_id_analysis.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/wrapper/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/stim/wrapper/test_wrapper.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/test_serialization.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/test_zone_model.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/visual/__init__.py +0 -0
- {bloqade_circuit-0.7.7 → bloqade_circuit-0.7.9}/test/visual/test_utils.py +0 -0
|
@@ -30,7 +30,7 @@ jobs:
|
|
|
30
30
|
- name: Set up Python ${{ matrix.python-version }}
|
|
31
31
|
run: uv python install ${{ matrix.python-version }}
|
|
32
32
|
- name: Install the project
|
|
33
|
-
run: uv sync --dev --all-extras --no-extra pyqrack-cuda
|
|
33
|
+
run: uv sync --dev --all-extras --no-extra pyqrack-cuda --no-extra pyqrack-opencl
|
|
34
34
|
- name: Run tests
|
|
35
35
|
# For example, using `pytest`
|
|
36
36
|
run: uv run just coverage
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: bloqade-circuit
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.9
|
|
4
4
|
Summary: The software development toolkit for neutral atom arrays.
|
|
5
5
|
Author-email: Roger-luo <rluo@quera.com>, kaihsin <khwu@quera.com>, weinbe58 <pweinberg@quera.com>, johnzl-777 <jlong@quera.com>
|
|
6
6
|
License-File: LICENSE
|
|
@@ -9,8 +9,7 @@ Requires-Dist: kirin-toolchain~=0.17.23
|
|
|
9
9
|
Requires-Dist: numpy>=1.22.0
|
|
10
10
|
Requires-Dist: pandas>=2.2.3
|
|
11
11
|
Requires-Dist: pydantic<2.11.0,>=1.3.0
|
|
12
|
-
Requires-Dist: pyqrack-cpu>=1.69.
|
|
13
|
-
Requires-Dist: pyqrack>=1.69.0; sys_platform == 'darwin-arm64'
|
|
12
|
+
Requires-Dist: pyqrack-cpu>=1.69.1
|
|
14
13
|
Requires-Dist: rich>=13.9.4
|
|
15
14
|
Requires-Dist: scipy>=1.13.1
|
|
16
15
|
Provides-Extra: cirq
|
|
@@ -18,9 +17,9 @@ Requires-Dist: cirq-core>=1.4.1; extra == 'cirq'
|
|
|
18
17
|
Requires-Dist: cirq-core[contrib]>=1.4.1; extra == 'cirq'
|
|
19
18
|
Requires-Dist: qpsolvers[clarabel]>=4.7.0; extra == 'cirq'
|
|
20
19
|
Provides-Extra: pyqrack-cuda
|
|
21
|
-
Requires-Dist: pyqrack-cuda>=1.69.
|
|
20
|
+
Requires-Dist: pyqrack-cuda>=1.69.1; extra == 'pyqrack-cuda'
|
|
22
21
|
Provides-Extra: pyqrack-opencl
|
|
23
|
-
Requires-Dist: pyqrack>=1.69.
|
|
22
|
+
Requires-Dist: pyqrack>=1.69.1; extra == 'pyqrack-opencl'
|
|
24
23
|
Provides-Extra: qasm2
|
|
25
24
|
Requires-Dist: lark>=1.2.2; extra == 'qasm2'
|
|
26
25
|
Provides-Extra: qbraid
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "bloqade-circuit"
|
|
3
|
-
version = "0.7.
|
|
3
|
+
version = "0.7.9"
|
|
4
4
|
description = "The software development toolkit for neutral atom arrays."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
authors = [
|
|
@@ -17,8 +17,7 @@ dependencies = [
|
|
|
17
17
|
"rich>=13.9.4",
|
|
18
18
|
"pydantic>=1.3.0,<2.11.0",
|
|
19
19
|
"pandas>=2.2.3",
|
|
20
|
-
"pyqrack>=1.69.
|
|
21
|
-
"pyqrack-cpu>=1.69.0; sys_platform != 'darwin-arm64'",
|
|
20
|
+
"pyqrack-cpu>=1.69.1",
|
|
22
21
|
]
|
|
23
22
|
|
|
24
23
|
[project.optional-dependencies]
|
|
@@ -41,10 +40,10 @@ cirq = [
|
|
|
41
40
|
"qpsolvers[clarabel]>=4.7.0",
|
|
42
41
|
]
|
|
43
42
|
pyqrack-opencl = [
|
|
44
|
-
"pyqrack>=1.69.
|
|
43
|
+
"pyqrack>=1.69.1",
|
|
45
44
|
]
|
|
46
45
|
pyqrack-cuda = [
|
|
47
|
-
"pyqrack-cuda>=1.69.
|
|
46
|
+
"pyqrack-cuda>=1.69.1",
|
|
48
47
|
]
|
|
49
48
|
stim = [
|
|
50
49
|
"stim>=1.15.0",
|
|
@@ -2,7 +2,7 @@ from . import noise as noise
|
|
|
2
2
|
from .parallelize import (
|
|
3
3
|
transpile as transpile,
|
|
4
4
|
parallelize as parallelize,
|
|
5
|
-
|
|
5
|
+
remove_tags as remove_tags,
|
|
6
6
|
auto_similarity as auto_similarity,
|
|
7
7
|
block_similarity as block_similarity,
|
|
8
8
|
moment_similarity as moment_similarity,
|
|
@@ -357,9 +357,10 @@ class GeminiOneZoneNoiseModelConflictGraphMoves(GeminiOneZoneNoiseModel):
|
|
|
357
357
|
def noisy_moment(self, moment, system_qubits):
|
|
358
358
|
# Moment with original ops
|
|
359
359
|
original_moment = moment
|
|
360
|
-
assert np.all(
|
|
361
|
-
|
|
362
|
-
|
|
360
|
+
assert np.all([isinstance(q, cirq.GridQubit) for q in system_qubits]), (
|
|
361
|
+
"Found a qubit that is not a GridQubit. In order for the conflict graph to know the qubit geometry, "
|
|
362
|
+
"all qubits in the circuit must be defined as cirq.GridQubit objects."
|
|
363
|
+
)
|
|
363
364
|
# Check if the moment is empty
|
|
364
365
|
if len(moment.operations) == 0:
|
|
365
366
|
move_moments = []
|
|
@@ -136,7 +136,7 @@ def auto_similarity(
|
|
|
136
136
|
return cirq.Circuit(flattened_circuit), weights
|
|
137
137
|
|
|
138
138
|
|
|
139
|
-
def
|
|
139
|
+
def remove_tags(circuit: cirq.Circuit) -> cirq.Circuit:
|
|
140
140
|
"""
|
|
141
141
|
Removes all tags from the circuit
|
|
142
142
|
|
|
@@ -146,10 +146,11 @@ def no_similarity(circuit: cirq.Circuit) -> cirq.Circuit:
|
|
|
146
146
|
Returns:
|
|
147
147
|
[0] - cirq.Circuit - the circuit with all tags removed.
|
|
148
148
|
"""
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
149
|
+
|
|
150
|
+
def remove_tag(op: cirq.Operation, _):
|
|
151
|
+
return op.untagged
|
|
152
|
+
|
|
153
|
+
return cirq.map_operations(circuit, remove_tag)
|
|
153
154
|
|
|
154
155
|
|
|
155
156
|
def to_dag_circuit(circuit: cirq.Circuit, can_reorder=None) -> nx.DiGraph:
|
|
@@ -399,4 +400,6 @@ def parallelize(
|
|
|
399
400
|
)
|
|
400
401
|
# Convert the epochs to a cirq circuit.
|
|
401
402
|
moments = map(cirq.Moment, epochs)
|
|
402
|
-
|
|
403
|
+
circuit = cirq.Circuit(moments)
|
|
404
|
+
|
|
405
|
+
return remove_tags(circuit)
|
|
@@ -146,7 +146,13 @@ class PyQrackInterpreter(Interpreter, typing.Generic[MemoryType]):
|
|
|
146
146
|
loss_m_result: Measurement = field(default=Measurement.One, kw_only=True)
|
|
147
147
|
"""The value of a measurement result when a qubit is lost."""
|
|
148
148
|
|
|
149
|
+
global_measurement_id: int = field(init=False, default=0)
|
|
150
|
+
|
|
149
151
|
def initialize(self) -> Self:
|
|
150
152
|
super().initialize()
|
|
151
153
|
self.memory.reset() # reset allocated qubits
|
|
152
154
|
return self
|
|
155
|
+
|
|
156
|
+
def set_global_measurement_id(self, m: Measurement):
|
|
157
|
+
m.measurement_id = self.global_measurement_id
|
|
158
|
+
self.global_measurement_id += 1
|
|
@@ -3,14 +3,19 @@ from typing import TYPE_CHECKING
|
|
|
3
3
|
from dataclasses import dataclass
|
|
4
4
|
|
|
5
5
|
from bloqade.qasm2.types import Qubit
|
|
6
|
+
from bloqade.squin.types import MeasurementResult
|
|
6
7
|
|
|
7
8
|
if TYPE_CHECKING:
|
|
8
9
|
from pyqrack import QrackSimulator
|
|
9
10
|
|
|
10
11
|
|
|
11
|
-
class Measurement(enum.IntEnum):
|
|
12
|
+
class Measurement(MeasurementResult, enum.IntEnum):
|
|
12
13
|
"""Enumeration of measurement results."""
|
|
13
14
|
|
|
15
|
+
def __init__(self, measurement_id: int = 0) -> None:
|
|
16
|
+
super().__init__()
|
|
17
|
+
self.measurement_id = measurement_id
|
|
18
|
+
|
|
14
19
|
Zero = 0
|
|
15
20
|
One = 1
|
|
16
21
|
Lost = enum.auto()
|
|
@@ -4,7 +4,7 @@ from kirin import interp
|
|
|
4
4
|
from kirin.dialects import ilist
|
|
5
5
|
|
|
6
6
|
from bloqade.squin import qubit
|
|
7
|
-
from bloqade.pyqrack.reg import QubitState, PyQrackQubit
|
|
7
|
+
from bloqade.pyqrack.reg import QubitState, Measurement, PyQrackQubit
|
|
8
8
|
from bloqade.pyqrack.base import PyQrackInterpreter
|
|
9
9
|
|
|
10
10
|
from .runtime import OperatorRuntimeABC
|
|
@@ -41,9 +41,12 @@ class PyQrackMethods(interp.MethodTable):
|
|
|
41
41
|
|
|
42
42
|
def _measure_qubit(self, qbit: PyQrackQubit, interp: PyQrackInterpreter):
|
|
43
43
|
if qbit.is_active():
|
|
44
|
-
|
|
44
|
+
m = Measurement(bool(qbit.sim_reg.m(qbit.addr)))
|
|
45
45
|
else:
|
|
46
|
-
|
|
46
|
+
m = Measurement(interp.loss_m_result)
|
|
47
|
+
|
|
48
|
+
interp.set_global_measurement_id(m)
|
|
49
|
+
return m
|
|
47
50
|
|
|
48
51
|
@interp.impl(qubit.MeasureQubitList)
|
|
49
52
|
def measure_qubit_list(
|
|
@@ -63,3 +66,17 @@ class PyQrackMethods(interp.MethodTable):
|
|
|
63
66
|
qbit: PyQrackQubit = frame.get(stmt.qubit)
|
|
64
67
|
result = self._measure_qubit(qbit, interp)
|
|
65
68
|
return (result,)
|
|
69
|
+
|
|
70
|
+
@interp.impl(qubit.QubitId)
|
|
71
|
+
def qubit_id(
|
|
72
|
+
self, interp: PyQrackInterpreter, frame: interp.Frame, stmt: qubit.QubitId
|
|
73
|
+
):
|
|
74
|
+
qbit: PyQrackQubit = frame.get(stmt.qubit)
|
|
75
|
+
return (qbit.addr,)
|
|
76
|
+
|
|
77
|
+
@interp.impl(qubit.MeasurementId)
|
|
78
|
+
def measurement_id(
|
|
79
|
+
self, interp: PyQrackInterpreter, frame: interp.Frame, stmt: qubit.MeasurementId
|
|
80
|
+
):
|
|
81
|
+
measurement: Measurement = frame.get(stmt.measurement)
|
|
82
|
+
return (measurement.measurement_id,)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
from dataclasses import field, dataclass
|
|
2
|
+
|
|
3
|
+
from kirin import ir
|
|
4
|
+
from kirin.passes import Pass
|
|
5
|
+
from kirin.ir.method import Method
|
|
6
|
+
from kirin.rewrite.abc import RewriteResult
|
|
7
|
+
|
|
8
|
+
from bloqade.qasm2.dialects import expr
|
|
9
|
+
from bloqade.rewrite.passes import AggressiveUnroll
|
|
10
|
+
|
|
11
|
+
from .unroll_if import UnrollIfs
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@dataclass
|
|
15
|
+
class QASM2Fold(Pass):
|
|
16
|
+
"""Fold pass for qasm2.extended"""
|
|
17
|
+
|
|
18
|
+
inline_gate_subroutine: bool = True
|
|
19
|
+
unroll_ifs: bool = True
|
|
20
|
+
aggressive_unroll: AggressiveUnroll = field(init=False)
|
|
21
|
+
|
|
22
|
+
def __post_init__(self):
|
|
23
|
+
def inline_simple(node: ir.Statement):
|
|
24
|
+
if isinstance(node, expr.GateFunction):
|
|
25
|
+
return self.inline_gate_subroutine
|
|
26
|
+
|
|
27
|
+
return True
|
|
28
|
+
|
|
29
|
+
self.aggressive_unroll = AggressiveUnroll(
|
|
30
|
+
self.dialects, inline_simple, no_raise=self.no_raise
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
def unsafe_run(self, mt: Method) -> RewriteResult:
|
|
34
|
+
result = RewriteResult()
|
|
35
|
+
|
|
36
|
+
if self.unroll_ifs:
|
|
37
|
+
result = UnrollIfs(mt.dialects).unsafe_run(mt).join(result)
|
|
38
|
+
|
|
39
|
+
result = self.aggressive_unroll.unsafe_run(mt).join(result)
|
|
40
|
+
|
|
41
|
+
return result
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
from typing import Callable
|
|
2
|
+
from dataclasses import field, dataclass
|
|
3
|
+
|
|
4
|
+
from kirin import ir
|
|
5
|
+
from kirin.passes import Pass, HintConst, TypeInfer
|
|
6
|
+
from kirin.rewrite import (
|
|
7
|
+
Walk,
|
|
8
|
+
Chain,
|
|
9
|
+
Inline,
|
|
10
|
+
Fixpoint,
|
|
11
|
+
Call2Invoke,
|
|
12
|
+
ConstantFold,
|
|
13
|
+
CFGCompactify,
|
|
14
|
+
InlineGetItem,
|
|
15
|
+
InlineGetField,
|
|
16
|
+
DeadCodeElimination,
|
|
17
|
+
)
|
|
18
|
+
from kirin.dialects import scf, ilist
|
|
19
|
+
from kirin.ir.method import Method
|
|
20
|
+
from kirin.rewrite.abc import RewriteResult
|
|
21
|
+
from kirin.rewrite.cse import CommonSubexpressionElimination
|
|
22
|
+
from kirin.passes.aggressive import UnrollScf
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
@dataclass
|
|
26
|
+
class Fold(Pass):
|
|
27
|
+
hint_const: HintConst = field(init=False)
|
|
28
|
+
|
|
29
|
+
def __post_init__(self):
|
|
30
|
+
self.hint_const = HintConst(self.dialects, no_raise=self.no_raise)
|
|
31
|
+
|
|
32
|
+
def unsafe_run(self, mt: Method) -> RewriteResult:
|
|
33
|
+
result = RewriteResult()
|
|
34
|
+
result = self.hint_const.unsafe_run(mt).join(result)
|
|
35
|
+
rule = Chain(
|
|
36
|
+
ConstantFold(),
|
|
37
|
+
Call2Invoke(),
|
|
38
|
+
InlineGetField(),
|
|
39
|
+
InlineGetItem(),
|
|
40
|
+
ilist.rewrite.InlineGetItem(),
|
|
41
|
+
ilist.rewrite.HintLen(),
|
|
42
|
+
)
|
|
43
|
+
result = Fixpoint(Walk(rule)).rewrite(mt.code).join(result)
|
|
44
|
+
|
|
45
|
+
return result
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
@dataclass
|
|
49
|
+
class AggressiveUnroll(Pass):
|
|
50
|
+
"""A pass to unroll structured control flow"""
|
|
51
|
+
|
|
52
|
+
additional_inline_heuristic: Callable[[ir.Statement], bool] = lambda node: True
|
|
53
|
+
|
|
54
|
+
fold: Fold = field(init=False)
|
|
55
|
+
typeinfer: TypeInfer = field(init=False)
|
|
56
|
+
scf_unroll: UnrollScf = field(init=False)
|
|
57
|
+
|
|
58
|
+
def __post_init__(self):
|
|
59
|
+
self.fold = Fold(self.dialects, no_raise=self.no_raise)
|
|
60
|
+
self.typeinfer = TypeInfer(self.dialects, no_raise=self.no_raise)
|
|
61
|
+
self.scf_unroll = UnrollScf(self.dialects, no_raise=self.no_raise)
|
|
62
|
+
|
|
63
|
+
def unsafe_run(self, mt: Method) -> RewriteResult:
|
|
64
|
+
result = RewriteResult()
|
|
65
|
+
result = self.scf_unroll.unsafe_run(mt).join(result)
|
|
66
|
+
result = (
|
|
67
|
+
Walk(Chain(ilist.rewrite.ConstList2IList(), ilist.rewrite.Unroll()))
|
|
68
|
+
.rewrite(mt.code)
|
|
69
|
+
.join(result)
|
|
70
|
+
)
|
|
71
|
+
result = self.typeinfer.unsafe_run(mt).join(result)
|
|
72
|
+
result = self.fold.unsafe_run(mt).join(result)
|
|
73
|
+
result = Walk(Inline(self.inline_heuristic)).rewrite(mt.code).join(result)
|
|
74
|
+
result = Walk(Fixpoint(CFGCompactify())).rewrite(mt.code).join(result)
|
|
75
|
+
|
|
76
|
+
rule = Chain(
|
|
77
|
+
CommonSubexpressionElimination(),
|
|
78
|
+
DeadCodeElimination(),
|
|
79
|
+
)
|
|
80
|
+
result = Fixpoint(Walk(rule)).rewrite(mt.code).join(result)
|
|
81
|
+
|
|
82
|
+
return result
|
|
83
|
+
|
|
84
|
+
def inline_heuristic(self, node: ir.Statement) -> bool:
|
|
85
|
+
"""The heuristic to decide whether to inline a function call or not.
|
|
86
|
+
inside loops and if-else, only inline simple functions, i.e.
|
|
87
|
+
functions with a single block
|
|
88
|
+
"""
|
|
89
|
+
return not isinstance(
|
|
90
|
+
node.parent_stmt, (scf.For, scf.IfElse)
|
|
91
|
+
) and self.additional_inline_heuristic(
|
|
92
|
+
node
|
|
93
|
+
) # always inline calls outside of loops and if-else
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
from dataclasses import field, dataclass
|
|
2
|
+
|
|
3
|
+
from kirin import ir, passes
|
|
4
|
+
from kirin.rewrite import (
|
|
5
|
+
Walk,
|
|
6
|
+
Chain,
|
|
7
|
+
Fixpoint,
|
|
8
|
+
)
|
|
9
|
+
from kirin.dialects.ilist import rewrite
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@dataclass
|
|
13
|
+
class CanonicalizeIList(passes.Pass):
|
|
14
|
+
|
|
15
|
+
fold_pass: passes.Fold = field(init=False)
|
|
16
|
+
|
|
17
|
+
def __post_init__(self):
|
|
18
|
+
self.fold_pass = passes.Fold(self.dialects, no_raise=self.no_raise)
|
|
19
|
+
|
|
20
|
+
def unsafe_run(self, mt: ir.Method):
|
|
21
|
+
result = Fixpoint(
|
|
22
|
+
Walk(
|
|
23
|
+
Chain(
|
|
24
|
+
rewrite.InlineGetItem(),
|
|
25
|
+
rewrite.FlattenAdd(),
|
|
26
|
+
rewrite.HintLen(),
|
|
27
|
+
)
|
|
28
|
+
)
|
|
29
|
+
).rewrite(mt.code)
|
|
30
|
+
|
|
31
|
+
result = self.fold_pass(mt).join(result)
|
|
32
|
+
return result
|
|
@@ -144,6 +144,11 @@ class Squin(lowering.LoweringABC[CirqNode]):
|
|
|
144
144
|
qbits = self.lower_qubit_getindices(state, node.qubits)
|
|
145
145
|
return state.current_frame.push(qubit.Apply(operator=op_, qubits=qbits))
|
|
146
146
|
|
|
147
|
+
def visit_TaggedOperation(
|
|
148
|
+
self, state: lowering.State[CirqNode], node: cirq.TaggedOperation
|
|
149
|
+
):
|
|
150
|
+
state.lower(node.untagged)
|
|
151
|
+
|
|
147
152
|
def lower_measurement(
|
|
148
153
|
self, state: lowering.State[CirqNode], node: cirq.GateOperation
|
|
149
154
|
):
|
|
@@ -79,6 +79,20 @@ class MeasureQubitList(ir.Statement):
|
|
|
79
79
|
result: ir.ResultValue = info.result(ilist.IListType[MeasurementResultType])
|
|
80
80
|
|
|
81
81
|
|
|
82
|
+
@statement(dialect=dialect)
|
|
83
|
+
class QubitId(ir.Statement):
|
|
84
|
+
traits = frozenset({lowering.FromPythonCall(), ir.Pure()})
|
|
85
|
+
qubit: ir.SSAValue = info.argument(QubitType)
|
|
86
|
+
result: ir.ResultValue = info.result(types.Int)
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
@statement(dialect=dialect)
|
|
90
|
+
class MeasurementId(ir.Statement):
|
|
91
|
+
traits = frozenset({lowering.FromPythonCall(), ir.Pure()})
|
|
92
|
+
measurement: ir.SSAValue = info.argument(MeasurementResultType)
|
|
93
|
+
result: ir.ResultValue = info.result(types.Int)
|
|
94
|
+
|
|
95
|
+
|
|
82
96
|
# NOTE: no dependent types in Python, so we have to mark it Any...
|
|
83
97
|
@wraps(New)
|
|
84
98
|
def new(n_qubits: int) -> ilist.IList[Qubit, Any]:
|
|
@@ -127,9 +141,10 @@ def measure(input: Any) -> Any:
|
|
|
127
141
|
input: A qubit or a list of qubits to measure.
|
|
128
142
|
|
|
129
143
|
Returns:
|
|
130
|
-
|
|
131
|
-
a single
|
|
144
|
+
MeasurementResult | list[MeasurementResult]: The result of the measurement. If a single qubit is measured,
|
|
145
|
+
a single result is returned. If a list of qubits is measured, a list of results
|
|
132
146
|
is returned.
|
|
147
|
+
A MeasurementResult can represent both 0 and 1, but also atoms that are lost.
|
|
133
148
|
"""
|
|
134
149
|
...
|
|
135
150
|
|
|
@@ -169,3 +184,11 @@ def broadcast(operator: Op, *qubits: ilist.IList[Qubit, OpSize] | list[Qubit]) -
|
|
|
169
184
|
None
|
|
170
185
|
"""
|
|
171
186
|
...
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
@wraps(QubitId)
|
|
190
|
+
def get_qubit_id(qubit: Qubit) -> int: ...
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
@wraps(MeasurementId)
|
|
194
|
+
def get_measurement_id(measurement: MeasurementResult) -> int: ...
|
|
@@ -4,7 +4,6 @@ from kirin.dialects import scf
|
|
|
4
4
|
from bloqade.squin import op, qubit, kernel
|
|
5
5
|
from bloqade.analysis.measure_id import MeasurementIDAnalysis
|
|
6
6
|
from bloqade.analysis.measure_id.lattice import (
|
|
7
|
-
NotMeasureId,
|
|
8
7
|
MeasureIdBool,
|
|
9
8
|
MeasureIdTuple,
|
|
10
9
|
InvalidMeasureId,
|
|
@@ -111,10 +110,15 @@ def test_scf_cond_true():
|
|
|
111
110
|
HintConst(dialects=test.dialects).unsafe_run(test)
|
|
112
111
|
frame, _ = MeasurementIDAnalysis(test.dialects).run_analysis(test)
|
|
113
112
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
113
|
+
# MeasureIdTuple(data=MeasureIdBool(idx=1),) should occur twice:
|
|
114
|
+
# First from the measurement in the true branch, then
|
|
115
|
+
# the result of the scf.IfElse itself
|
|
116
|
+
analysis_results = [
|
|
117
|
+
val
|
|
118
|
+
for val in frame.entries.values()
|
|
119
|
+
if val == MeasureIdTuple(data=(MeasureIdBool(idx=1),))
|
|
117
120
|
]
|
|
121
|
+
assert len(analysis_results) == 2
|
|
118
122
|
|
|
119
123
|
|
|
120
124
|
def test_scf_cond_false():
|
|
@@ -136,10 +140,13 @@ def test_scf_cond_false():
|
|
|
136
140
|
HintConst(dialects=test.dialects).unsafe_run(test)
|
|
137
141
|
frame, _ = MeasurementIDAnalysis(test.dialects).run_analysis(test)
|
|
138
142
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
143
|
+
# MeasureIdBool(idx=1) should occur twice:
|
|
144
|
+
# First from the measurement in the false branch, then
|
|
145
|
+
# the result of the scf.IfElse itself
|
|
146
|
+
analysis_results = [
|
|
147
|
+
val for val in frame.entries.values() if val == MeasureIdBool(idx=1)
|
|
142
148
|
]
|
|
149
|
+
assert len(analysis_results) == 2
|
|
143
150
|
|
|
144
151
|
|
|
145
152
|
def test_slice():
|
|
@@ -6,7 +6,7 @@ import pytest
|
|
|
6
6
|
|
|
7
7
|
from bloqade.cirq_utils import (
|
|
8
8
|
parallelize,
|
|
9
|
-
|
|
9
|
+
remove_tags,
|
|
10
10
|
block_similarity,
|
|
11
11
|
moment_similarity,
|
|
12
12
|
)
|
|
@@ -28,7 +28,7 @@ def test1():
|
|
|
28
28
|
circuit_m, _ = moment_similarity(circuit, weight=1.0)
|
|
29
29
|
# print(circuit_m)
|
|
30
30
|
circuit_b, _ = block_similarity(circuit, weight=1.0, block_id=1)
|
|
31
|
-
circuit_m2 =
|
|
31
|
+
circuit_m2 = remove_tags(circuit_m)
|
|
32
32
|
print(circuit_m2)
|
|
33
33
|
circuit2 = parallelize(circuit)
|
|
34
34
|
# print(circuit2)
|
|
@@ -288,3 +288,30 @@ def test_if():
|
|
|
288
288
|
|
|
289
289
|
target = qasm2.emit.QASM2()
|
|
290
290
|
target.emit(nested_kernel)
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
def test_loop_unroll():
|
|
294
|
+
n_qubits = 4
|
|
295
|
+
|
|
296
|
+
@qasm2.extended
|
|
297
|
+
def ghz_linear():
|
|
298
|
+
q = qasm2.qreg(n_qubits)
|
|
299
|
+
qasm2.h(q[0])
|
|
300
|
+
for i in range(1, n_qubits):
|
|
301
|
+
qasm2.cx(q[i - 1], q[i])
|
|
302
|
+
|
|
303
|
+
target = qasm2.emit.QASM2(
|
|
304
|
+
allow_parallel=True,
|
|
305
|
+
)
|
|
306
|
+
qasm2_str = target.emit_str(ghz_linear)
|
|
307
|
+
|
|
308
|
+
assert qasm2_str == (
|
|
309
|
+
"""KIRIN {func,lowering.call,lowering.func,py.ilist,qasm2.core,qasm2.expr,qasm2.indexing,qasm2.noise,qasm2.parallel,qasm2.uop,scf};
|
|
310
|
+
include "qelib1.inc";
|
|
311
|
+
qreg q[4];
|
|
312
|
+
h q[0];
|
|
313
|
+
CX q[0], q[1];
|
|
314
|
+
CX q[1], q[2];
|
|
315
|
+
CX q[2], q[3];
|
|
316
|
+
"""
|
|
317
|
+
)
|
|
@@ -34,6 +34,11 @@ def basic_circuit():
|
|
|
34
34
|
)
|
|
35
35
|
|
|
36
36
|
|
|
37
|
+
def tagged_circuit():
|
|
38
|
+
q = cirq.LineQubit.range(2)
|
|
39
|
+
return cirq.Circuit(cirq.H(q[0]).with_tags("FOO"), cirq.CX(*q).with_tags("BAR"))
|
|
40
|
+
|
|
41
|
+
|
|
37
42
|
def controlled_gates():
|
|
38
43
|
q0 = cirq.NamedQubit("q0")
|
|
39
44
|
q1 = cirq.NamedQubit("q1")
|
|
@@ -166,6 +171,7 @@ def nested_circuit():
|
|
|
166
171
|
"circuit_f",
|
|
167
172
|
[
|
|
168
173
|
basic_circuit,
|
|
174
|
+
tagged_circuit,
|
|
169
175
|
controlled_gates,
|
|
170
176
|
parity_gate_circuit,
|
|
171
177
|
phased_gates,
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
from kirin import types
|
|
2
|
+
|
|
3
|
+
from bloqade import squin
|
|
4
|
+
from bloqade.pyqrack import StackMemorySimulator
|
|
5
|
+
from bloqade.pyqrack.reg import Measurement
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def test_get_ids():
|
|
9
|
+
@squin.kernel
|
|
10
|
+
def main():
|
|
11
|
+
q = squin.qubit.new(3)
|
|
12
|
+
|
|
13
|
+
m = squin.qubit.measure(q)
|
|
14
|
+
|
|
15
|
+
qid = squin.qubit.get_qubit_id(q[0])
|
|
16
|
+
mid = squin.qubit.get_measurement_id(m[1])
|
|
17
|
+
return mid + qid
|
|
18
|
+
|
|
19
|
+
main.print()
|
|
20
|
+
assert main.return_type.is_subseteq(types.Int)
|
|
21
|
+
|
|
22
|
+
@squin.kernel
|
|
23
|
+
def main2():
|
|
24
|
+
q = squin.qubit.new(2)
|
|
25
|
+
|
|
26
|
+
qid = squin.qubit.get_qubit_id(q[0])
|
|
27
|
+
m1 = squin.qubit.measure(q[qid])
|
|
28
|
+
|
|
29
|
+
squin.gate.x(q[qid])
|
|
30
|
+
m2 = squin.qubit.measure(q[qid])
|
|
31
|
+
|
|
32
|
+
m1_id = squin.qubit.get_measurement_id(m1)
|
|
33
|
+
m2_id = squin.qubit.get_measurement_id(m2)
|
|
34
|
+
|
|
35
|
+
if m1_id != 0:
|
|
36
|
+
# do something that errors
|
|
37
|
+
squin.gate.x(q[4])
|
|
38
|
+
|
|
39
|
+
if m2_id != 1:
|
|
40
|
+
squin.gate.x(q[4])
|
|
41
|
+
|
|
42
|
+
return squin.qubit.measure(q)
|
|
43
|
+
|
|
44
|
+
sim = StackMemorySimulator(min_qubits=2)
|
|
45
|
+
result = sim.run(main2)
|
|
46
|
+
for i, res in enumerate(result):
|
|
47
|
+
assert isinstance(res, Measurement)
|
|
48
|
+
assert res.measurement_id == i + 2
|