Skip to content

PyQASM 1.3.0

Latest

Choose a tag to compare

@TheGupta2012 TheGupta2012 released this 05 Oct 12:20
· 1 commit to main since this release
f5df95a

Release 1.3.0 (October 5, 2026)

Summary

Added

  • Added support for OpenQASM 3 end; statements. Unrolling stops after an unconditional end; in global or nested scopes and keeps end; inside runtime-dependent branches. (#396)

Fixed

  • Fixed bare OpenQASM expression statements raising AttributeError or KeyError. Their values are now evaluated and discarded, and unknown gate errors name the gate using the original source line. (#388)
  • Fixed qubit register ranges dropping their final qubit during unrolling. Endpoints are now inclusive for gates, aliases, barriers, and measurements. Code using an exclusive upper bound must lower it by one, for example q[0:1] instead of q[0:2] to select two qubits. (#432)
  • Fixed cs and csdg from stdgates.inc being rejected during unrolling. They now decompose to controlled phase shifts. (#439)
  • Fixed Clifford+T rebasing for exact rx, ry, and rz rotations at multiples of π/4. These gates now decompose instead of disappearing, while angles outside the exact basis raise RebaseError instead of producing an incorrect result. (#428)
  • Fixed the OpenQASM 2 serializer emitting OpenQASM 3 syntax for classical conditionals. if(m==1) x q[1]; was written as a braced block and, after unroll(), as a per-bit if (m[0] == true) chain, which QASM 2 parsers such as pytket and Qiskit reject. Conditionals are now emitted as if (creg == int) <statement>, and validate() rejects branch shapes QASM 2 cannot express. (#337)
  • Fixed unroll() reading c[0] as the most significant bit of a classical register condition, so if (c == 2) ran its body when c was 1. >=, <=, >, <, out-of-range values, and single-bit conditions such as c[0] < 1 now unroll correctly too, and != is now supported. (#444)

Dependencies

  • Bumped codecov/codecov-action from 7.0.0 to 7.1.1. (#430)
  • Bumped actions/checkout from 7.0.0 and 4.4.0 (in scorecard.yml) to 7.0.1. (#423)

Other

  • Added a notify-docs job to the release workflow. When a release reaches PyPI it sends a package-released event to qBraid/docs, which opens a pull request bumping its versions.json so this release's documentation moves from Latest into Stable. The job reads the published version from PyPI rather than the release tag, runs with continue-on-error, and skips when DOCS_DISPATCH_TOKEN is absent, so it can never fail or block a release. (#443)

New Contributors

Full Changelog: v1.2.1...v1.3.0