bloqade-circuit 0.5.2__tar.gz → 0.6.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.
Potentially problematic release.
This version of bloqade-circuit might be problematic. Click here for more details.
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/PKG-INFO +1 -1
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/_typos.toml +1 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/pyproject.toml +1 -1
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/squin/noise/__init__.py +1 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/squin/noise/_wrapper.py +4 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/squin/noise/stmts.py +10 -1
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/squin/op/stmts.py +4 -4
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/squin/rewrite/U3_to_clifford.py +8 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/squin/rewrite/desugar.py +27 -15
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/passes/squin_to_stim.py +1 -11
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/rewrite/squin_noise.py +68 -13
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/rewrite/util.py +20 -1
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/squin/rewrite/test_U3_to_clifford.py +76 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/squin/test_sugar.py +16 -1
- bloqade_circuit-0.6.0/test/stim/passes/stim_reference_programs/noise/apply_depolarize1.stim +1 -0
- bloqade_circuit-0.6.0/test/stim/passes/stim_reference_programs/noise/apply_pauli_channel_1.stim +1 -0
- bloqade_circuit-0.6.0/test/stim/passes/stim_reference_programs/noise/broadcast_depolarize1.stim +1 -0
- bloqade_circuit-0.6.0/test/stim/passes/stim_reference_programs/noise/broadcast_depolarize2.stim +1 -0
- bloqade_circuit-0.6.0/test/stim/passes/stim_reference_programs/noise/broadcast_iid_bit_flip_channel.stim +1 -0
- bloqade_circuit-0.6.0/test/stim/passes/stim_reference_programs/noise/broadcast_iid_phase_flip_channel.stim +1 -0
- bloqade_circuit-0.6.0/test/stim/passes/stim_reference_programs/noise/broadcast_iid_y_flip_channel.stim +1 -0
- bloqade_circuit-0.6.0/test/stim/passes/stim_reference_programs/noise/broadcast_pauli_channel_1.stim +1 -0
- bloqade_circuit-0.6.0/test/stim/passes/stim_reference_programs/noise/broadcast_pauli_channel_1_many_qubits.stim +1 -0
- bloqade_circuit-0.6.0/test/stim/passes/stim_reference_programs/noise/broadcast_pauli_channel_1_reuse.stim +3 -0
- bloqade_circuit-0.6.0/test/stim/passes/stim_reference_programs/noise/broadcast_pauli_channel_2.stim +1 -0
- bloqade_circuit-0.6.0/test/stim/passes/stim_reference_programs/noise/broadcast_pauli_channel_2_reuse_on_4_qubits.stim +2 -0
- bloqade_circuit-0.6.0/test/stim/passes/stim_reference_programs/qubit/for_loop.stim +4 -0
- bloqade_circuit-0.6.0/test/stim/passes/test_squin_noise_to_stim.py +242 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/passes/test_squin_qubit_to_stim.py +23 -16
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/uv.lock +1 -1
- bloqade_circuit-0.5.2/test/analysis/address/test_analysis.py +0 -267
- bloqade_circuit-0.5.2/test/stim/passes/test_squin_noise_to_stim.py +0 -151
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/.github/dependabot.yml +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/.github/workflows/ci.yml +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/.github/workflows/isort.yml +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/.github/workflows/lint.yml +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/.github/workflows/release.yml +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/.gitignore +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/.pre-commit-config.yaml +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/LICENSE +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/README.md +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/justfile +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/analysis/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/analysis/address/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/analysis/address/analysis.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/analysis/address/impls.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/analysis/address/lattice.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/analysis/fidelity/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/analysis/fidelity/analysis.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/analysis/measure_id/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/analysis/measure_id/analysis.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/analysis/measure_id/impls.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/analysis/measure_id/lattice.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/cirq_utils/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/cirq_utils/lineprog.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/cirq_utils/parallelize.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/device.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/pyqrack/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/pyqrack/base.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/pyqrack/device.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/pyqrack/noise/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/pyqrack/noise/native.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/pyqrack/qasm2/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/pyqrack/qasm2/core.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/pyqrack/qasm2/glob.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/pyqrack/qasm2/parallel.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/pyqrack/qasm2/uop.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/pyqrack/reg.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/pyqrack/squin/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/pyqrack/squin/noise/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/pyqrack/squin/noise/native.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/pyqrack/squin/op.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/pyqrack/squin/qubit.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/pyqrack/squin/runtime.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/pyqrack/squin/wire.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/pyqrack/target.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/pyqrack/task.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/_qasm_loading.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/_wrappers.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/dialects/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/dialects/core/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/dialects/core/_dialect.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/dialects/core/_emit.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/dialects/core/_typeinfer.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/dialects/core/address.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/dialects/core/stmts.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/dialects/expr/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/dialects/expr/_dialect.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/dialects/expr/_emit.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/dialects/expr/_from_python.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/dialects/expr/_interp.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/dialects/expr/stmts.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/dialects/glob.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/dialects/indexing.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/dialects/inline.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/dialects/noise/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/dialects/noise/_dialect.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/dialects/noise/fidelity.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/dialects/noise/model.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/dialects/noise/stmts.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/dialects/parallel.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/dialects/uop/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/dialects/uop/_dialect.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/dialects/uop/_emit.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/dialects/uop/schedule.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/dialects/uop/stmts.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/emit/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/emit/base.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/emit/gate.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/emit/impls/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/emit/impls/noise.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/emit/main.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/emit/target.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/glob.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/groups.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/noise.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/parallel.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/parse/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/parse/ast.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/parse/build.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/parse/lowering.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/parse/parser.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/parse/print.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/parse/qasm2.lark +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/parse/visitor.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/parse/visitor.pyi +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/passes/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/passes/fold.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/passes/glob.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/passes/lift_qubits.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/passes/noise.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/passes/parallel.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/passes/py2qasm.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/passes/qasm2py.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/passes/unroll_if.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/rewrite/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/rewrite/desugar.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/rewrite/glob.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/rewrite/insert_qubits.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/rewrite/native_gates.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/rewrite/noise/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/rewrite/noise/heuristic_noise.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/rewrite/noise/remove_noise.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/rewrite/parallel_to_glob.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/rewrite/parallel_to_uop.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/rewrite/register.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/rewrite/uop_to_parallel.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qasm2/types.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qbraid/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qbraid/lowering.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qbraid/schema.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qbraid/simulation_result.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/qbraid/target.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/rewrite/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/rewrite/passes/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/rewrite/passes/canonicalize_ilist.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/rewrite/rules/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/rewrite/rules/flatten_ilist.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/rewrite/rules/inline_getitem_ilist.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/rewrite/rules/split_ifs.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/squin/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/squin/_typeinfer.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/squin/analysis/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/squin/analysis/address_impl.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/squin/analysis/nsites/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/squin/analysis/nsites/analysis.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/squin/analysis/nsites/impls.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/squin/analysis/nsites/lattice.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/squin/analysis/schedule.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/squin/cirq/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/squin/cirq/emit/emit_circuit.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/squin/cirq/emit/noise.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/squin/cirq/emit/op.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/squin/cirq/emit/qubit.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/squin/cirq/emit/runtime.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/squin/cirq/lowering.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/squin/groups.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/squin/lowering.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/squin/noise/_dialect.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/squin/noise/rewrite.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/squin/op/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/squin/op/_dialect.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/squin/op/_wrapper.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/squin/op/number.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/squin/op/rewrite.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/squin/op/stdlib.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/squin/op/traits.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/squin/op/types.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/squin/qubit.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/squin/rewrite/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/squin/rewrite/canonicalize.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/squin/rewrite/remove_dangling_qubits.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/squin/rewrite/wrap_analysis.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/squin/types.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/squin/wire.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/_wrappers.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/dialects/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/dialects/auxiliary/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/dialects/auxiliary/_dialect.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/dialects/auxiliary/emit.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/dialects/auxiliary/interp.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/dialects/auxiliary/lowering.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/dialects/auxiliary/stmts/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/dialects/auxiliary/stmts/annotate.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/dialects/auxiliary/stmts/const.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/dialects/auxiliary/types.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/dialects/collapse/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/dialects/collapse/_dialect.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/dialects/collapse/emit_str.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/dialects/collapse/stmts/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/dialects/collapse/stmts/measure.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/dialects/collapse/stmts/pp_measure.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/dialects/collapse/stmts/reset.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/dialects/gate/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/dialects/gate/_dialect.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/dialects/gate/emit.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/dialects/gate/stmts/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/dialects/gate/stmts/base.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/dialects/gate/stmts/clifford_1q.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/dialects/gate/stmts/clifford_2q.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/dialects/gate/stmts/control_2q.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/dialects/gate/stmts/pp.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/dialects/noise/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/dialects/noise/_dialect.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/dialects/noise/emit.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/dialects/noise/stmts.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/emit/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/emit/stim_str.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/groups.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/parse/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/parse/lowering.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/passes/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/passes/simplify_ifs.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/rewrite/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/rewrite/ifs_to_stim.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/rewrite/py_constant_to_stim.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/rewrite/qubit_to_stim.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/rewrite/squin_measure.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/rewrite/wire_identity_elimination.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/rewrite/wire_to_stim.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/upstream/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/stim/upstream/from_squin.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/task.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/test_utils.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/types.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/visual/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/visual/animation/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/visual/animation/animate.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/visual/animation/base.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/visual/animation/gate_event.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/visual/animation/runtime/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/visual/animation/runtime/aod.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/visual/animation/runtime/atoms.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/visual/animation/runtime/ppoly.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/visual/animation/runtime/qpustate.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/src/bloqade/visual/animation/runtime/utils.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/analysis/address/test_qubit_analysis.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/analysis/address/test_wire_analysis.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/analysis/address/util.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/analysis/fidelity/test_fidelity.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/analysis/measure_id/test_measure_id.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/cirq_utils/test_lpsolvers.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/cirq_utils/test_parallelize.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/pyqrack/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/pyqrack/runtime/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/pyqrack/runtime/noise/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/pyqrack/runtime/noise/qasm2/test_loss.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/pyqrack/runtime/noise/qasm2/test_pauli.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/pyqrack/runtime/test_dyn_memory.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/pyqrack/runtime/test_qrack.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/pyqrack/squin/test_kernel.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/pyqrack/squin/test_noise.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/pyqrack/test_target.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/qasm2/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/qasm2/analysis/test_dag.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/qasm2/emit/test_extended.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/qasm2/emit/test_extended_noise.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/qasm2/emit/test_qasm2.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/qasm2/emit/test_qasm2_emit.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/qasm2/parse/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/qasm2/parse/invalid_programs/invalid_if.qasm +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/qasm2/parse/programs/README.md +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/qasm2/parse/programs/global.qasm +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/qasm2/parse/programs/iqft1.qasm +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/qasm2/parse/programs/main.qasm +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/qasm2/parse/programs/noise.qasm +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/qasm2/parse/programs/para.qasm +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/qasm2/parse/programs/process_tomo.qasm +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/qasm2/parse/programs/qelib1.inc +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/qasm2/parse/programs/qft.qasm +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/qasm2/parse/programs/qft2.qasm +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/qasm2/parse/programs/rb.qasm +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/qasm2/parse/programs/rep_code.qasm +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/qasm2/parse/programs/ripple_carry_adder.qasm +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/qasm2/parse/programs/tele.qasm +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/qasm2/parse/programs/valid_if.qasm +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/qasm2/parse/test_ast.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/qasm2/parse/test_roundtrip.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/qasm2/passes/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/qasm2/passes/test_global_to_parallel.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/qasm2/passes/test_global_to_uop.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/qasm2/passes/test_heuristic_noise.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/qasm2/passes/test_parallel_to_global.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/qasm2/passes/test_parallel_to_uop.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/qasm2/passes/test_qasm2py.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/qasm2/passes/test_unroll_if.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/qasm2/passes/test_uop_to_parallel.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/qasm2/test_count.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/qasm2/test_inline.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/qasm2/test_lowering.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/qasm2/test_native.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/qasm2/test_two2one.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/qbraid/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/qbraid/test_clean_circuit.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/qbraid/test_lowering.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/qbraid/test_target.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/sample/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/sample/test_noise_model.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/squin/analysis/test_nsites_analysis.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/squin/cirq/test_cirq_to_squin.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/squin/cirq/test_squin_noise_to_cirq.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/squin/cirq/test_squin_to_cirq.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/squin/op/test_reset.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/squin/rewrite/test_canonicalize.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/squin/rewrite/test_desugar.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/squin/rewrite/test_mult_rewrite.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/squin/test_constprop.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/squin/test_typeinfer.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/squin/wire/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/squin/wire/test_check.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/dialects/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/dialects/stim/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/dialects/stim/emit/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/dialects/stim/emit/base.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/dialects/stim/emit/test_stim_1q.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/dialects/stim/emit/test_stim_ctrl.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/dialects/stim/emit/test_stim_detector.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/dialects/stim/emit/test_stim_meas.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/dialects/stim/emit/test_stim_noise.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/dialects/stim/emit/test_stim_obs_inc.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/dialects/stim/emit/test_stim_ppmeas.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/dialects/stim/emit/test_stim_qubit_coords.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/dialects/stim/emit/test_stim_spp.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/dialects/stim/test_stim_circuits.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/dialects/stim/test_stim_const.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/parse/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/parse/base.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/parse/test_parse.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/parse/test_parse_clifford.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/parse/test_parse_control.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/parse/test_parse_custom.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/parse/test_parse_noise.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/parse/test_parse_spp.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/passes/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/passes/stim_reference_programs/pure_squin_rewrite.txt +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/passes/stim_reference_programs/qubit/qubit.stim +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/passes/stim_reference_programs/qubit/qubit_broadcast.stim +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/passes/stim_reference_programs/qubit/qubit_loss.stim +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/passes/stim_reference_programs/qubit/qubit_reset.stim +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/passes/stim_reference_programs/qubit/u3_to_clifford.stim +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/passes/stim_reference_programs/simple_if_rewrite.txt +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/passes/stim_reference_programs/wire/wire.stim +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/passes/stim_reference_programs/wire/wire_apply.stim +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/passes/stim_reference_programs/wire/wire_apply_control.stim +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/passes/stim_reference_programs/wire/wire_broadcast.stim +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/passes/stim_reference_programs/wire/wire_broadcast_control.stim +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/passes/stim_reference_programs/wire/wire_measure.stim +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/passes/stim_reference_programs/wire/wire_multiple_apply.stim +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/passes/stim_reference_programs/wire/wire_qubit_loss.stim +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/passes/stim_reference_programs/wire/wire_reset.stim +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/passes/test_squin_meas_to_stim.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/passes/test_squin_to_stim_cases.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/passes/test_squin_wire_to_stim.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/test_measure_id_analysis.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/wrapper/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/stim/wrapper/test_wrapper.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/test_serialization.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/test_zone_model.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/visual/__init__.py +0 -0
- {bloqade_circuit-0.5.2 → bloqade_circuit-0.6.0}/test/visual/test_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: bloqade-circuit
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.6.0
|
|
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
|
|
@@ -4,6 +4,7 @@ from ._wrapper import (
|
|
|
4
4
|
pp_error as pp_error,
|
|
5
5
|
depolarize as depolarize,
|
|
6
6
|
qubit_loss as qubit_loss,
|
|
7
|
+
depolarize2 as depolarize2,
|
|
7
8
|
pauli_error as pauli_error,
|
|
8
9
|
two_qubit_pauli_channel as two_qubit_pauli_channel,
|
|
9
10
|
single_qubit_pauli_channel as single_qubit_pauli_channel,
|
|
@@ -20,6 +20,10 @@ def pp_error(op: Op, p: float) -> Op: ...
|
|
|
20
20
|
def depolarize(p: float) -> Op: ...
|
|
21
21
|
|
|
22
22
|
|
|
23
|
+
@wraps(stmts.Depolarize2)
|
|
24
|
+
def depolarize2(p: float) -> Op: ...
|
|
25
|
+
|
|
26
|
+
|
|
23
27
|
@wraps(stmts.SingleQubitPauliChannel)
|
|
24
28
|
def single_qubit_pauli_channel(
|
|
25
29
|
params: ilist.IList[float, Literal[3]] | list[float] | tuple[float, float, float],
|
|
@@ -33,7 +33,16 @@ class PPError(NoiseChannel):
|
|
|
33
33
|
@statement(dialect=dialect)
|
|
34
34
|
class Depolarize(NoiseChannel):
|
|
35
35
|
"""
|
|
36
|
-
Apply depolarize error to qubit
|
|
36
|
+
Apply depolarize error to single qubit
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
p: ir.SSAValue = info.argument(types.Float)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
@statement(dialect=dialect)
|
|
43
|
+
class Depolarize2(NoiseChannel):
|
|
44
|
+
"""
|
|
45
|
+
Apply correlated depolarize error to two qubit
|
|
37
46
|
"""
|
|
38
47
|
|
|
39
48
|
p: ir.SSAValue = info.argument(types.Float)
|
|
@@ -103,7 +103,7 @@ class U3(PrimitiveOp):
|
|
|
103
103
|
Note that we use the convention from the QASM2 specification, namely
|
|
104
104
|
|
|
105
105
|
$$
|
|
106
|
-
U_3(
|
|
106
|
+
U_3(\\theta, \\phi, \\lambda) = R_z(\\phi) R_y(\\theta) R_z(\\lambda)
|
|
107
107
|
$$
|
|
108
108
|
"""
|
|
109
109
|
|
|
@@ -119,7 +119,7 @@ class PhaseOp(PrimitiveOp):
|
|
|
119
119
|
A phase operator.
|
|
120
120
|
|
|
121
121
|
$$
|
|
122
|
-
PhaseOp(
|
|
122
|
+
\\text{PhaseOp}(\\theta) = e^{i \\theta} I
|
|
123
123
|
$$
|
|
124
124
|
"""
|
|
125
125
|
|
|
@@ -133,7 +133,7 @@ class ShiftOp(PrimitiveOp):
|
|
|
133
133
|
A phase shift operator.
|
|
134
134
|
|
|
135
135
|
$$
|
|
136
|
-
Shift(
|
|
136
|
+
\\text{Shift}(\\theta) = \\begin{bmatrix} 1 & 0 \\\\ 0 & e^{i \\theta} \\end{bmatrix}
|
|
137
137
|
$$
|
|
138
138
|
"""
|
|
139
139
|
|
|
@@ -144,7 +144,7 @@ class ShiftOp(PrimitiveOp):
|
|
|
144
144
|
@statement(dialect=dialect)
|
|
145
145
|
class Reset(PrimitiveOp):
|
|
146
146
|
"""
|
|
147
|
-
Reset operator for qubits
|
|
147
|
+
Reset operator for qubits and wires.
|
|
148
148
|
"""
|
|
149
149
|
|
|
150
150
|
traits = frozenset({ir.Pure(), lowering.FromPythonCall(), FixedSites(1)})
|
|
@@ -126,6 +126,14 @@ class SquinU3ToClifford(RewriteRule):
|
|
|
126
126
|
if theta is None or phi is None or lam is None:
|
|
127
127
|
return ()
|
|
128
128
|
|
|
129
|
+
# For U3(2*pi*n, phi, lam) = U3(0, 0, lam + phi) which is a Z rotation.
|
|
130
|
+
if np.isclose(np.mod(theta, math.tau), 0):
|
|
131
|
+
lam = lam + phi
|
|
132
|
+
phi = 0.0
|
|
133
|
+
elif np.isclose(np.mod(theta + np.pi, math.tau), 0):
|
|
134
|
+
lam = lam - phi
|
|
135
|
+
phi = 0.0
|
|
136
|
+
|
|
129
137
|
theta_half_pi: int | None = self.resolve_angle(theta)
|
|
130
138
|
phi_half_pi: int | None = self.resolve_angle(phi)
|
|
131
139
|
lam_half_pi: int | None = self.resolve_angle(lam)
|
|
@@ -54,7 +54,9 @@ class ApplyDesugarRule(RewriteRule):
|
|
|
54
54
|
qubits = node.qubits
|
|
55
55
|
|
|
56
56
|
if len(qubits) > 1 and all(q.type.is_subseteq(QubitType) for q in qubits):
|
|
57
|
-
(qubits_ilist_stmt := ilist.New(qubits)).insert_before(
|
|
57
|
+
(qubits_ilist_stmt := ilist.New(qubits)).insert_before(
|
|
58
|
+
node
|
|
59
|
+
) # qubits is just a tuple of SSAValues
|
|
58
60
|
qubits_ilist = qubits_ilist_stmt.result
|
|
59
61
|
|
|
60
62
|
elif len(qubits) == 1 and qubits[0].type.is_subseteq(QubitType):
|
|
@@ -76,34 +78,44 @@ class ApplyDesugarRule(RewriteRule):
|
|
|
76
78
|
return RewriteResult()
|
|
77
79
|
|
|
78
80
|
is_ilist = isinstance(qbit_stmt := qubits[0].stmt, ilist.New)
|
|
81
|
+
|
|
79
82
|
if is_ilist:
|
|
80
|
-
if len(qbit_stmt.values) != 1:
|
|
81
|
-
return RewriteResult()
|
|
82
83
|
|
|
83
|
-
if not
|
|
84
|
-
qbit_getindex_result
|
|
84
|
+
if not all(
|
|
85
|
+
isinstance(qbit_getindex_result, ir.ResultValue)
|
|
86
|
+
for qbit_getindex_result in qbit_stmt.values
|
|
85
87
|
):
|
|
86
88
|
return RewriteResult()
|
|
87
89
|
|
|
88
|
-
|
|
90
|
+
# Get the parent statement that the qubit came from
|
|
91
|
+
# (should be a GetItem instance, see logic below)
|
|
92
|
+
qbit_getindices = [
|
|
93
|
+
qbit_getindex_result.stmt
|
|
94
|
+
for qbit_getindex_result in qbit_stmt.values
|
|
95
|
+
]
|
|
89
96
|
else:
|
|
90
|
-
|
|
97
|
+
qbit_getindices = [qubit.stmt for qubit in qubits]
|
|
91
98
|
|
|
92
|
-
if
|
|
99
|
+
if any(
|
|
100
|
+
not isinstance(qbit_getindex, py.indexing.GetItem)
|
|
101
|
+
for qbit_getindex in qbit_getindices
|
|
102
|
+
):
|
|
93
103
|
return RewriteResult()
|
|
94
104
|
|
|
95
|
-
|
|
96
|
-
|
|
105
|
+
# The GetItem should have been applied on something that returns an IList of Qubits
|
|
106
|
+
if any(
|
|
107
|
+
not qbit_getindex.obj.type.is_subseteq(
|
|
108
|
+
ilist.IListType[QubitType, types.Any]
|
|
109
|
+
)
|
|
110
|
+
for qbit_getindex in qbit_getindices
|
|
97
111
|
):
|
|
98
112
|
return RewriteResult()
|
|
99
113
|
|
|
100
114
|
if is_ilist:
|
|
101
|
-
|
|
115
|
+
qubits_ilist = qbit_stmt.result
|
|
102
116
|
else:
|
|
103
|
-
values
|
|
104
|
-
|
|
105
|
-
(qubits_ilist_stmt := ilist.New(values=values)).insert_before(node)
|
|
106
|
-
qubits_ilist = qubits_ilist_stmt.result
|
|
117
|
+
(qubits_ilist_stmt := ilist.New(values=[qubits[0]])).insert_before(node)
|
|
118
|
+
qubits_ilist = qubits_ilist_stmt.result
|
|
107
119
|
else:
|
|
108
120
|
return RewriteResult()
|
|
109
121
|
|
|
@@ -11,7 +11,6 @@ from kirin.rewrite import (
|
|
|
11
11
|
DeadCodeElimination,
|
|
12
12
|
CommonSubexpressionElimination,
|
|
13
13
|
)
|
|
14
|
-
from kirin.analysis import const
|
|
15
14
|
from kirin.dialects import scf, ilist
|
|
16
15
|
from kirin.ir.method import Method
|
|
17
16
|
from kirin.passes.abc import Pass
|
|
@@ -44,11 +43,6 @@ class SquinToStimPass(Pass):
|
|
|
44
43
|
|
|
45
44
|
def unsafe_run(self, mt: Method) -> RewriteResult:
|
|
46
45
|
|
|
47
|
-
cp_frame, _ = const.Propagate(dialects=mt.dialects).run_analysis(mt)
|
|
48
|
-
cp_results = cp_frame.entries
|
|
49
|
-
|
|
50
|
-
# Assume that address analysis and
|
|
51
|
-
# wrapping has been done before this pass!
|
|
52
46
|
# inline aggressively:
|
|
53
47
|
rewrite_result = InlinePass(
|
|
54
48
|
dialects=mt.dialects, no_raise=self.no_raise
|
|
@@ -117,11 +111,7 @@ class SquinToStimPass(Pass):
|
|
|
117
111
|
)
|
|
118
112
|
|
|
119
113
|
# Rewrite the noise statements first.
|
|
120
|
-
rewrite_result = (
|
|
121
|
-
Walk(SquinNoiseToStim(cp_results=cp_results))
|
|
122
|
-
.rewrite(mt.code)
|
|
123
|
-
.join(rewrite_result)
|
|
124
|
-
)
|
|
114
|
+
rewrite_result = Walk(SquinNoiseToStim()).rewrite(mt.code).join(rewrite_result)
|
|
125
115
|
|
|
126
116
|
# Wrap Rewrite + SquinToStim can happen w/ standard walk
|
|
127
117
|
rewrite_result = Walk(SquinU3ToClifford()).rewrite(mt.code).join(rewrite_result)
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
from typing import
|
|
1
|
+
from typing import Tuple
|
|
2
2
|
from dataclasses import dataclass
|
|
3
3
|
|
|
4
4
|
from kirin.ir import SSAValue, Statement
|
|
5
|
-
from kirin.
|
|
6
|
-
from kirin.dialects import py
|
|
5
|
+
from kirin.dialects import py, ilist
|
|
7
6
|
from kirin.rewrite.abc import RewriteRule, RewriteResult
|
|
8
7
|
|
|
9
|
-
from bloqade.squin import wire, noise as squin_noise, qubit
|
|
8
|
+
from bloqade.squin import op, wire, noise as squin_noise, qubit
|
|
10
9
|
from bloqade.stim.dialects import noise as stim_noise
|
|
11
10
|
from bloqade.stim.rewrite.util import (
|
|
11
|
+
get_const_value,
|
|
12
12
|
create_wire_passthrough,
|
|
13
13
|
insert_qubit_idx_after_apply,
|
|
14
14
|
)
|
|
@@ -17,8 +17,6 @@ from bloqade.stim.rewrite.util import (
|
|
|
17
17
|
@dataclass
|
|
18
18
|
class SquinNoiseToStim(RewriteRule):
|
|
19
19
|
|
|
20
|
-
cp_results: Dict[SSAValue, const.Result]
|
|
21
|
-
|
|
22
20
|
def rewrite_Statement(self, node: Statement) -> RewriteResult:
|
|
23
21
|
match node:
|
|
24
22
|
case qubit.Apply() | qubit.Broadcast():
|
|
@@ -34,17 +32,17 @@ class SquinNoiseToStim(RewriteRule):
|
|
|
34
32
|
# this is an SSAValue, need it to be the actual operator
|
|
35
33
|
applied_op = stmt.operator.owner
|
|
36
34
|
|
|
35
|
+
if isinstance(applied_op, squin_noise.stmts.QubitLoss):
|
|
36
|
+
return RewriteResult()
|
|
37
|
+
|
|
37
38
|
if isinstance(applied_op, squin_noise.stmts.NoiseChannel):
|
|
38
39
|
|
|
39
40
|
qubit_idx_ssas = insert_qubit_idx_after_apply(stmt=stmt)
|
|
40
41
|
if qubit_idx_ssas is None:
|
|
41
42
|
return RewriteResult()
|
|
42
43
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
stim_stmt = self.rewrite_SingleQubitPauliChannel(stmt, qubit_idx_ssas)
|
|
46
|
-
elif isinstance(applied_op, squin_noise.stmts.TwoQubitPauliChannel):
|
|
47
|
-
stim_stmt = self.rewrite_TwoQubitPauliChannel(stmt, qubit_idx_ssas)
|
|
44
|
+
rewrite_method = getattr(self, f"rewrite_{type(applied_op).__name__}")
|
|
45
|
+
stim_stmt = rewrite_method(stmt, qubit_idx_ssas)
|
|
48
46
|
|
|
49
47
|
if isinstance(stmt, (wire.Apply, wire.Broadcast)):
|
|
50
48
|
create_wire_passthrough(stmt)
|
|
@@ -57,6 +55,29 @@ class SquinNoiseToStim(RewriteRule):
|
|
|
57
55
|
return RewriteResult(has_done_something=True)
|
|
58
56
|
return RewriteResult()
|
|
59
57
|
|
|
58
|
+
def rewrite_PauliError(
|
|
59
|
+
self,
|
|
60
|
+
stmt: qubit.Apply | qubit.Broadcast | wire.Broadcast | wire.Apply,
|
|
61
|
+
qubit_idx_ssas: Tuple[SSAValue],
|
|
62
|
+
) -> Statement:
|
|
63
|
+
"""Rewrite squin.noise.PauliError to XError, YError, ZError."""
|
|
64
|
+
squin_channel = stmt.operator.owner
|
|
65
|
+
assert isinstance(squin_channel, squin_noise.stmts.PauliError)
|
|
66
|
+
basis = squin_channel.basis.owner
|
|
67
|
+
assert isinstance(basis, op.stmts.PauliOp)
|
|
68
|
+
p = get_const_value(float, squin_channel.p)
|
|
69
|
+
|
|
70
|
+
p_stmt = py.Constant(p)
|
|
71
|
+
p_stmt.insert_before(stmt)
|
|
72
|
+
|
|
73
|
+
if isinstance(basis, op.stmts.X):
|
|
74
|
+
stim_stmt = stim_noise.XError(targets=qubit_idx_ssas, p=p_stmt.result)
|
|
75
|
+
elif isinstance(basis, op.stmts.Y):
|
|
76
|
+
stim_stmt = stim_noise.YError(targets=qubit_idx_ssas, p=p_stmt.result)
|
|
77
|
+
else:
|
|
78
|
+
stim_stmt = stim_noise.ZError(targets=qubit_idx_ssas, p=p_stmt.result)
|
|
79
|
+
return stim_stmt
|
|
80
|
+
|
|
60
81
|
def rewrite_SingleQubitPauliChannel(
|
|
61
82
|
self,
|
|
62
83
|
stmt: qubit.Apply | qubit.Broadcast | wire.Broadcast | wire.Apply,
|
|
@@ -67,7 +88,7 @@ class SquinNoiseToStim(RewriteRule):
|
|
|
67
88
|
squin_channel = stmt.operator.owner
|
|
68
89
|
assert isinstance(squin_channel, squin_noise.stmts.SingleQubitPauliChannel)
|
|
69
90
|
|
|
70
|
-
params =
|
|
91
|
+
params = get_const_value(ilist.IList, squin_channel.params)
|
|
71
92
|
new_stmts = [
|
|
72
93
|
p_x := py.Constant(params[0]),
|
|
73
94
|
p_y := py.Constant(params[1]),
|
|
@@ -94,7 +115,7 @@ class SquinNoiseToStim(RewriteRule):
|
|
|
94
115
|
squin_channel = stmt.operator.owner
|
|
95
116
|
assert isinstance(squin_channel, squin_noise.stmts.TwoQubitPauliChannel)
|
|
96
117
|
|
|
97
|
-
params =
|
|
118
|
+
params = get_const_value(ilist.IList, squin_channel.params)
|
|
98
119
|
param_stmts = [py.Constant(p) for p in params]
|
|
99
120
|
for param_stmt in param_stmts:
|
|
100
121
|
param_stmt.insert_before(stmt)
|
|
@@ -118,3 +139,37 @@ class SquinNoiseToStim(RewriteRule):
|
|
|
118
139
|
pzz=param_stmts[14].result,
|
|
119
140
|
)
|
|
120
141
|
return stim_stmt
|
|
142
|
+
|
|
143
|
+
def rewrite_Depolarize2(
|
|
144
|
+
self,
|
|
145
|
+
stmt: qubit.Apply | qubit.Broadcast | wire.Broadcast | wire.Apply,
|
|
146
|
+
qubit_idx_ssas: Tuple[SSAValue],
|
|
147
|
+
) -> Statement:
|
|
148
|
+
"""Rewrite squin.noise.Depolarize2 to stim.Depolarize2."""
|
|
149
|
+
|
|
150
|
+
squin_channel = stmt.operator.owner
|
|
151
|
+
assert isinstance(squin_channel, squin_noise.stmts.Depolarize2)
|
|
152
|
+
|
|
153
|
+
p = get_const_value(float, squin_channel.p)
|
|
154
|
+
p_stmt = py.Constant(p)
|
|
155
|
+
p_stmt.insert_before(stmt)
|
|
156
|
+
|
|
157
|
+
stim_stmt = stim_noise.Depolarize2(targets=qubit_idx_ssas, p=p_stmt.result)
|
|
158
|
+
return stim_stmt
|
|
159
|
+
|
|
160
|
+
def rewrite_Depolarize(
|
|
161
|
+
self,
|
|
162
|
+
stmt: qubit.Apply | qubit.Broadcast | wire.Broadcast | wire.Apply,
|
|
163
|
+
qubit_idx_ssas: Tuple[SSAValue],
|
|
164
|
+
) -> Statement:
|
|
165
|
+
"""Rewrite squin.noise.Depolarize to stim.Depolarize1."""
|
|
166
|
+
|
|
167
|
+
squin_channel = stmt.operator.owner
|
|
168
|
+
assert isinstance(squin_channel, squin_noise.stmts.Depolarize)
|
|
169
|
+
|
|
170
|
+
p = get_const_value(float, squin_channel.p)
|
|
171
|
+
p_stmt = py.Constant(p)
|
|
172
|
+
p_stmt.insert_before(stmt)
|
|
173
|
+
|
|
174
|
+
stim_stmt = stim_noise.Depolarize1(targets=qubit_idx_ssas, p=p_stmt.result)
|
|
175
|
+
return stim_stmt
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
from
|
|
1
|
+
from typing import TypeVar
|
|
2
|
+
|
|
3
|
+
from kirin import ir, interp
|
|
4
|
+
from kirin.analysis import const
|
|
2
5
|
from kirin.dialects import py
|
|
3
6
|
from kirin.rewrite.abc import RewriteResult
|
|
4
7
|
|
|
@@ -201,3 +204,19 @@ def is_measure_result_used(
|
|
|
201
204
|
Check if the result of a measure statement is used in the program.
|
|
202
205
|
"""
|
|
203
206
|
return bool(stmt.result.uses)
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
T = TypeVar("T")
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
def get_const_value(typ: type[T], value: ir.SSAValue) -> T:
|
|
213
|
+
if isinstance(hint := value.hints.get("const"), const.Value):
|
|
214
|
+
data = hint.data
|
|
215
|
+
if isinstance(data, typ):
|
|
216
|
+
return hint.data
|
|
217
|
+
raise interp.InterpreterError(
|
|
218
|
+
f"Expected constant value <type = {typ}>, got {data}"
|
|
219
|
+
)
|
|
220
|
+
raise interp.InterpreterError(
|
|
221
|
+
f"Expected constant value <type = {typ}>, got {value}"
|
|
222
|
+
)
|
|
@@ -59,6 +59,18 @@ def test_s():
|
|
|
59
59
|
assert isinstance(get_stmt_at_idx(test_equiv, 5), op.stmts.S)
|
|
60
60
|
|
|
61
61
|
|
|
62
|
+
def test_s_alternative():
|
|
63
|
+
|
|
64
|
+
@kernel
|
|
65
|
+
def test():
|
|
66
|
+
q = qubit.new(4)
|
|
67
|
+
oper = op.u(theta=0.0, phi=0.25 * math.tau, lam=0.0)
|
|
68
|
+
qubit.apply(oper, q[0])
|
|
69
|
+
|
|
70
|
+
SquinToCliffordTestPass(test.dialects)(test)
|
|
71
|
+
assert isinstance(get_stmt_at_idx(test, 5), op.stmts.S)
|
|
72
|
+
|
|
73
|
+
|
|
62
74
|
def test_z():
|
|
63
75
|
|
|
64
76
|
@kernel
|
|
@@ -81,6 +93,18 @@ def test_z():
|
|
|
81
93
|
assert isinstance(get_stmt_at_idx(test, 15), op.stmts.Z)
|
|
82
94
|
|
|
83
95
|
|
|
96
|
+
def test_z_alternative():
|
|
97
|
+
|
|
98
|
+
@kernel
|
|
99
|
+
def test():
|
|
100
|
+
q = qubit.new(4)
|
|
101
|
+
oper = op.u(theta=0.0, phi=0.5 * math.tau, lam=0.0)
|
|
102
|
+
qubit.apply(oper, q[0])
|
|
103
|
+
|
|
104
|
+
SquinToCliffordTestPass(test.dialects)(test)
|
|
105
|
+
assert isinstance(get_stmt_at_idx(test, 5), op.stmts.Z)
|
|
106
|
+
|
|
107
|
+
|
|
84
108
|
def test_sdag():
|
|
85
109
|
|
|
86
110
|
@kernel
|
|
@@ -104,6 +128,58 @@ def test_sdag():
|
|
|
104
128
|
assert isinstance(get_stmt_at_idx(test_equiv, 6), op.stmts.Adjoint)
|
|
105
129
|
|
|
106
130
|
|
|
131
|
+
def test_sdag_alternative_negative():
|
|
132
|
+
|
|
133
|
+
@kernel
|
|
134
|
+
def test():
|
|
135
|
+
q = qubit.new(4)
|
|
136
|
+
oper = op.u(theta=0.0, phi=-0.25 * math.tau, lam=0.0)
|
|
137
|
+
qubit.apply(oper, q[0])
|
|
138
|
+
|
|
139
|
+
SquinToCliffordTestPass(test.dialects)(test)
|
|
140
|
+
assert isinstance(get_stmt_at_idx(test, 5), op.stmts.S)
|
|
141
|
+
assert isinstance(get_stmt_at_idx(test, 6), op.stmts.Adjoint)
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
def test_sdag_alternative():
|
|
145
|
+
|
|
146
|
+
@kernel
|
|
147
|
+
def test():
|
|
148
|
+
q = qubit.new(4)
|
|
149
|
+
oper = op.u(theta=0.0, phi=0.75 * math.tau, lam=0.0)
|
|
150
|
+
qubit.apply(oper, q[0])
|
|
151
|
+
|
|
152
|
+
SquinToCliffordTestPass(test.dialects)(test)
|
|
153
|
+
assert isinstance(get_stmt_at_idx(test, 5), op.stmts.S)
|
|
154
|
+
assert isinstance(get_stmt_at_idx(test, 6), op.stmts.Adjoint)
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
def test_sdag_weird_case():
|
|
158
|
+
|
|
159
|
+
@kernel
|
|
160
|
+
def test():
|
|
161
|
+
q = qubit.new(4)
|
|
162
|
+
oper = op.u(theta=2 * math.tau, phi=0.7 * math.tau, lam=0.05 * math.tau)
|
|
163
|
+
qubit.apply(oper, q[0])
|
|
164
|
+
|
|
165
|
+
SquinToCliffordTestPass(test.dialects)(test)
|
|
166
|
+
assert isinstance(get_stmt_at_idx(test, 5), op.stmts.S)
|
|
167
|
+
assert isinstance(get_stmt_at_idx(test, 6), op.stmts.Adjoint)
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
def test_sdag_weirder_case():
|
|
171
|
+
|
|
172
|
+
@kernel
|
|
173
|
+
def test():
|
|
174
|
+
q = qubit.new(4)
|
|
175
|
+
oper = op.u(theta=0.5 * math.tau, phi=0.05 * math.tau, lam=0.8 * math.tau)
|
|
176
|
+
qubit.apply(oper, q[0])
|
|
177
|
+
|
|
178
|
+
SquinToCliffordTestPass(test.dialects)(test)
|
|
179
|
+
assert isinstance(get_stmt_at_idx(test, 5), op.stmts.S)
|
|
180
|
+
assert isinstance(get_stmt_at_idx(test, 6), op.stmts.Adjoint)
|
|
181
|
+
|
|
182
|
+
|
|
107
183
|
def test_sqrt_y():
|
|
108
184
|
|
|
109
185
|
@kernel
|
|
@@ -46,7 +46,7 @@ def test_apply_sugar():
|
|
|
46
46
|
h = squin.op.h()
|
|
47
47
|
x = squin.op.x()
|
|
48
48
|
|
|
49
|
-
# test applying to
|
|
49
|
+
# test applying to list with getindex
|
|
50
50
|
squin.qubit.apply(x, [q[0]])
|
|
51
51
|
|
|
52
52
|
# test apply with ast.Name
|
|
@@ -89,3 +89,18 @@ def test_apply_in_for_loop():
|
|
|
89
89
|
|
|
90
90
|
assert math.isclose(abs(ket[0]) ** 2, 1, abs_tol=1e-7)
|
|
91
91
|
assert ket[1] == ket[2] == ket[3] == 0
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
def test_apply_in_for_loop_index_multiple_index():
|
|
95
|
+
|
|
96
|
+
@squin.kernel
|
|
97
|
+
def main():
|
|
98
|
+
q = squin.qubit.new(3)
|
|
99
|
+
squin.qubit.apply(squin.op.h(), q[0])
|
|
100
|
+
cx = squin.op.cx()
|
|
101
|
+
for i in range(2):
|
|
102
|
+
squin.qubit.apply(cx, [q[i], q[i + 1]])
|
|
103
|
+
|
|
104
|
+
sim = StackMemorySimulator(min_qubits=3)
|
|
105
|
+
ket = sim.state_vector(main)
|
|
106
|
+
assert math.isclose(abs(ket[0]) ** 2, 0.5, abs_tol=1e-5)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
DEPOLARIZE1(0.01000000) 0
|
bloqade_circuit-0.6.0/test/stim/passes/stim_reference_programs/noise/apply_pauli_channel_1.stim
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
PAULI_CHANNEL_1(0.01000000, 0.02000000, 0.03000000) 0
|
bloqade_circuit-0.6.0/test/stim/passes/stim_reference_programs/noise/broadcast_depolarize1.stim
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
DEPOLARIZE1(0.01000000) 0 1 2 3
|
bloqade_circuit-0.6.0/test/stim/passes/stim_reference_programs/noise/broadcast_depolarize2.stim
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
DEPOLARIZE2(0.01500000) 0 1
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
X_ERROR(0.01000000) 0 1 2 3
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Z_ERROR(0.01000000) 0 1 2 3
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Y_ERROR(0.01000000) 0 1 2 3
|
bloqade_circuit-0.6.0/test/stim/passes/stim_reference_programs/noise/broadcast_pauli_channel_1.stim
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
PAULI_CHANNEL_1(0.01000000, 0.02000000, 0.03000000) 0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
PAULI_CHANNEL_1(0.01000000, 0.02000000, 0.03000000) 0 1
|
bloqade_circuit-0.6.0/test/stim/passes/stim_reference_programs/noise/broadcast_pauli_channel_2.stim
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
PAULI_CHANNEL_2(0.00100000, 0.00200000, 0.00300000, 0.00400000, 0.00500000, 0.00600000, 0.00700000, 0.00800000, 0.00900000, 0.01000000, 0.01100000, 0.01200000, 0.01300000, 0.01400000, 0.01500000) 0 1
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
PAULI_CHANNEL_2(0.00100000, 0.00200000, 0.00300000, 0.00400000, 0.00500000, 0.00600000, 0.00700000, 0.00800000, 0.00900000, 0.01000000, 0.01100000, 0.01200000, 0.01300000, 0.01400000, 0.01500000) 0 1
|
|
2
|
+
PAULI_CHANNEL_2(0.00100000, 0.00200000, 0.00300000, 0.00400000, 0.00500000, 0.00600000, 0.00700000, 0.00800000, 0.00900000, 0.01000000, 0.01100000, 0.01200000, 0.01300000, 0.01400000, 0.01500000) 2 3
|