Repository navigation
Release 1.4.0 (November 19, 2026)
Summary
Added
- Added the
Publish qBraid Lab environmentworkflow (publish-lab-env.yml), run by hand for a released version. It builds an environment with pyqasm and every extra it declares on an Ubuntu 24.04 runner with the system Python 3.12, which matches Lab, and smoke tests it. Then it uploads and approves it on qBraid staging or production, and adds it to the configured group as its latest. A failed run can resume from its slug. Each target reads its API key and URL from theenv-publish-stagingorenv-publish-productionGitHub Environment. The steps live inbin/publish_lab_env.pyandbin/lab_env_smoke_test.py(#455).
Improved / Modified
- Separated OpenQASM 2 printing and conditional-branch normalization into
pyqasm.printer, leaving the module focused on program handling. Printed output and validation behavior are unchanged (#454). - Breaking: circuit drawing moved from
pyqasm.printertopyqasm.visualization.pyqasm.drawis unchanged, but code that imports frompyqasm.printer, such asfrom pyqasm.printer import mpl_draw, must import frompyqasm.visualizationinstead (#461). publish-lab-env.ymlsets the pyqasm light and dark logos from qbraid-static-assets as the environment's catalog logo and kernel icon. An optionalQBRAID_ENV_LOGO_URLvariable, the https URL of a PNG, overrides both. It replacesQBRAID_ENV_LOGO, since pyqasm is not a qBraid provider (#456).- The Lab environment from
publish-lab-env.ymlnow installs pyqasm with its user-facing extras and ipykernel only. It leaves out thetest,lintanddocsextras, which added about 50 developer packages, so the environment has 48 packages instead of 100 (#456). - Named the Lab environments that
publish-lab-env.ymlbuildspyqasm (vX.Y.Z), with kernelPython 3 [pyqasm vX.Y.Z], to match the existing pyqasm environments. The rule that keeps a backport from becoming the group's latest reads both this and the olderpyqasm X.Y.Zname (#456).
Fixed
- Fixed
ctrl @on standard gates with no dedicated controlled form, which raisedUnsupported controlled QASM operation.ctrl(n) @now works for up to 10 controls on every single-qubit standard gate (includings,sdg,t,tdg,sx,sxdg,id,U/u3,u2,prx,gpi,gpi2), on gates that are themselves controlled single-qubit gates or swap (such ascs,csx,cu,cz,cswap,c4x), and ongphasewith two or more controls. It also fixesctrl @ u, which raised aTypeError, andinv @over controlled gates, which gave the wrong relative phase forU/u2/cuand leftcs,crx,cu,cphaseshiftandcvuninverted. (#459, #252). loads()works withopenqasm31.0.2 again, and still with 1.0.1. OpenQASM 2 programs load instead of failing withprogram reports being unsupported version '2.0', syntax errors name the offending token instead ofparse failed, andnopunrolls to onenopper operand qubit as before, also inside gate definitions (nop;to nothing). A measurement call such asmeasure_iq q[0], which 1.0.2 parses, raisesValidationError. Known issue: openpulse 1.0.1 cannot parse an assignment in acalordefcalblock with openqasm3 1.0.2, and pyqasm now raises aValidationErrorthat names this cause instead of anAttributeError. #481 tracks the fix (#475, #472).unroll()now broadcasts a gate over register operands element by element, as the spec defines.cx a, bon two registers now unrolls tocx a[0], b[0]; cx a[1], b[1];. Before, it unrolled tocx a[0], a[1]; cx b[0], b[1];, and slices, aliases, subroutine register arguments andctrl @did the same. A register beside single-qubit operands (cx q, r[0]) now repeats the single qubit instead of raising, and register operands of different lengths raiseValidationError(#462, #384).- Decompose
p,phaseshift, andu1(U1) gates into a singlerz(theta)rotation instead ofh; rx(theta); h(#470, #469). - Fixed
rebasefailing onccx,id, and thepgates produced by unrollingc3xfor theROTATIONAL_CX/CLIFFORD_Tbasis sets (#468, #467). loads()syntax errors now name the offending token, line and column, e.g.Failed to parse OpenQASM string: syntax error near ';' at line 3, column 13. Before, the reason after the colon was empty (#460).- Fixed the matplotlib circuit drawer's controlled-gate lookup for
c3xandc4x(#458, #322). - Fixed
loads("")/ whitespace-only input raisingAttributeErrorinstead ofValidationError. Empty and whitespace programs now raiseValidationErrorlike other parse failures (#451, #437).
Dependencies
- Bumped
github/codeql-action/upload-sariffrom 3.37.8 to 4.38.1 (#431). - Bumped
actions/upload-artifactfrom 4.6.2 to 7.0.2 inscorecard.yml, and pinned the other workflows to 7.0.2 instead of thev7major tag (#453). - Bumped
ossf/scorecard-actionfrom 2.4.4 to 2.5.0 (#457).
Other
- The wheel and sdist build scripts in
bin/install their tools from hash-locked files in.github/requirements/, which pin the versions CI used before. This clears the last six Scorecard Pinned-Dependencies alerts on the scripts (#466). lab-env-tools.insets minimum versions for qbraid-cli and qbraid-core instead of exact ones, so Dependabot's weeklyuvupdate can raise them together. Its exact pins made that update fail.lab-env-tools.txtstill installs qbraid-cli 0.16.10 and qbraid-core 0.6.27 (#465).- Hardened the GitHub Actions workflows for the OpenSSF Scorecard and CodeQL alerts. Every action is pinned to a commit SHA. Every workflow declares least-privilege
GITHUB_TOKENpermissions. Workflow tools install from hash-locked files in.github/requirements/. A grouped weekly Dependabot PR updates them. Thepr-compliance.ymljob no longer checks out the repository (#463). - Moved the arm64 macOS jobs in CI and in the release workflows from the retired
macos-14runner tomacos-15(#479).
New Contributors
- @tonycoder-hub made their first contribution in #451
- @Riiocodee made their first contribution in #458
- @HVSharma12 made their first contribution in #475
Full Changelog: v1.3.0...v1.4.0