Skip to content

v8.1.21 - Chunk multi-chunk JIT fusion, QASMCircuit.__iter__

Latest

Choose a tag to compare

@tatopenn-cell tatopenn-cell released this 21 Jul 17:54

Added

  • QASMCircuit.__iter__ — duck-types a parsed circuit as an iterable of the same tuples .to_tuples() returns, so it works anywhere a plain circuit list is expected (Chunk.run_chunk, QuantumTranspiler.transpile, ...) without remembering to call .to_tuples() first.

Fixed / Performance

  • Chunk's multi-chunk dispatch (num_chunks > 1) used to apply every gate through a Python loop calling non-JIT apply_gate_1q/apply_gate_2q — measured 6x slower than run_circuit_jit_beast_mode on an identical workload. Replaced with a single jax.lax.scan over the whole circuit operating directly on the stacked (num_chunks, chunk_dim) representation — never materializing a (2**n_qubits,) array, preserving the anti-OOM property Chunk exists for. All 6 gate/qubit-location cases were ported formula-for-formula from the old implementation and verified case-by-case against a DenseSVSimulator reference before it was removed. Gate coverage now built via GATE_IDS, aligning with beast-mode. Measured speedup: 2.2s → 0.42s (~5x) on the benchmark that surfaced the problem — now close to beast-mode's 0.37s on the same non-chunked workload. Closes #5.

PyPI: https://pypi.org/project/dense-evolution/8.1.21/