Releases: imluri/qsm
Releases · imluri/qsm
qsm v0.1.2
1. Improved Print Handling for Quantum Results
The execute_deferred_prints method was implemented and enhanced to:
- Collect measurement results after simulation.
- Map classical register names (like
answer[0],answer[1], etc.) to a Python dictionary for easy access. - Support printing entire classical registers as bitstrings (e.g.,
answerprints as0101 (5)). - Correctly resolve and print both individual bits and full registers, even inside loops or control flow.
- Provide fallback and debug output for unknown or missing variables.
2. Simulation Output
- After running the quantum circuit, the simulation results are stored and made available for print statements.
- The print output is formatted to show both the bitstring and its integer value for classical registers.
3. Robust AST Handling
The code now robustly handles various AST node types for print arguments, including:
- String constants
- Subscripted variables (e.g.,
answer[0]) - Whole registers (e.g.,
answer) - General expressions
4. Debugging Support
Debug messages are printed if debug mode is enabled, showing measurement results and the execution environment.
5. General Improvements
- The code follows Python best practices for extensibility and maintainability.
- All quantum circuit operations are implemented using Qiskit, as per project guidelines.
qsm v0.1.1 Bug fix
- Robust Print Handler: Print statements now support both generic (result) and user-defined classical register names (e.g., answer). Measurement results are displayed as bitstrings and their integer values for clarity.
- Modern Qiskit Integration: The compiler uses up-to-date Qiskit primitives and supports multi-controlled gates, including robust handling of MCZ gates.
- Multiline Comments: QSM now supports Lua-style multiline comments (--[[ ... ]]--), making scripts easier to document.
- Improved Parser: The parser is more resilient, supporting flexible print statements and skipping bare identifiers.
- User-Friendly Output: Print output is consistent and intuitive, matching Python’s print behavior and supporting both bitstring and integer result formats.
- Extensibility: The codebase is refactored for easier extension and future feature additions.
qsm v0.1.0 Initial Release
- First public release of qsm
- Lua-inspired quantum programming language using Qiskit
- Supports basic quantum gates, measurement, and comments
- Includes installation and usage instructions