Skip to content

v0.3.4

Choose a tag to compare

@Shiro-Raven Shiro-Raven released this 17 Nov 01:59

0.3.4 (2025-10-04)

✨ Added

  • GenericLayerAnsatz class: flexible ansatz that alternates single-qubit gates with optional entanglers, supporting custom gate sequences and entangling layouts (linear, brick, circular, all-to-all)
  • Ansatz abstract base class: new abstraction for all VQE ansaetze with n_params_per_layer() and build() methods for better extensibility
  • Comprehensive test suite for ansaetze: 241 lines of tests in test_ansatze.py covering all ansatz implementations

🔄 Changed

  • Restructured project for better modularity: moved exp/ directory to extern/, moved backend-related files (interfaces.py, qoro_service.py, qpu_system.py, _parallel_simulator.py) to backends/ subdirectory, moved circuit-related files to circuits/ subdirectory, and reorganized test files to match new structure
  • Improved QASM validation API: changed is_valid_qasm() return type from bool to bool | str to return error messages, and updated QoroService.submit_circuits() to use this improved validation with clearer error messages
  • Enhanced QASM parser error handling: added validation to prevent redefinition of built-in gates with clearer error messages including line and column numbers
  • Refactored VQE to use new Ansatz abstraction: extracted ansatz logic into _ansatze.py module, reducing VQE code complexity and enabling better extensibility
  • Updated tutorial examples: modified tutorial examples to use new ansatz interface

🐛 Fixed

  • Fixed wire order handling in expectation value calculation: updated to use cost_hamiltonian.wires when available instead of assuming integer wire indices, enabling support for non-integer wire labels
  • Fixed sparse input bug in QUBO conversion: replaced .A1 attribute access with .tocoo() method for proper sparse matrix handling in convert_qubo_matrix_to_pennylane_ising()
  • Fixed test failures related to ansatz refactoring: updated VQE and VQE sweep tests to work with new Ansatz abstraction interface