Skip to content

PyQASM 0.0.2

Compare
Choose a tag to compare
@TheGupta2012 TheGupta2012 released this 21 Oct 12:18
· 42 commits to main since this release
8e5111e

Release 0.0.2 (Oct 21, 2024)

Summary

Added

  • Sphinx docs and examples added for pyqasm (#20)
  • qBraid header check enabled in format action(#29)
  • Integrated code coverage with codecov (#30)

Improved / Modified

  • Housekeeping updates involving codeowners, workflows, pyproject, and readme (#16)
  • Fixed parsing of compile-time constants for register sizes. Statements like const int[32] N = 3; qubit[N] q; are now supported (#21).
  • Update project README.md (#22)
  • Updated sphinx docs page (#26)
  • Major Change: The default type for pyqasm.unroller.unroll has been changed from pyqasm.elements.Qasm3Module to str. This change is backward-incompatible and will require users to update their code. The following code snippet demonstrates the change -
from pyqasm.unroller import unroll
qasm_str = """
OPENQASM 3;
qubit[3] q;
h q;
"""

# Old way : The default type for unroll was pyqasm.elements.Qasm3Module
program = unroll(qasm_str, as_module=True)
unrolled_qasm_old = program.unrolled_qasm

# New way : The default type for unroll is now str
unrolled_qasm_new = unroll(qasm_str)

To force the return type to be pyqasm.elements.Qasm3Module, users can set the as_module parameter to True as shown above to update their code.

Deprecated

Removed

Fixed

  • Issue with aliasing of qubits was fixed where aliased qubits were referenced with non-aliased qubits in a quantum gate (#14). The following program is now supported -
OPENQASM 3;
include "stdgates.inc";
qubit[4] q;
let alias = q[0:2];
cx alias[1], q[2];
  • Issue with subroutines, when return keyword was absent, was fixed in (#21)

Full Changelog: v0.0.1...v0.0.2