Skip to content

v0.2.2b1

Choose a tag to compare

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

0.2.2b1 (2025-08-08)

✨ Added

  • COBYLA optimizer implementation: added fmin_cobyla() function in divi/exp/scipy/_cobyla.py (342 lines) using pure-Python PRIMA implementation for constrained optimization, integrated into optimizer enum as Optimizer.COBYLA
  • use_circuit_packing parameter to QoroService constructor: added boolean flag to enable circuit packing functionality for more efficient job submission
  • draw_partitions() method in GraphPartitioningQAOA: added visualization function to draw graph partitions with nodes colored by partition assignment using matplotlib
  • Maximum size constraint for subgraph partitioning: added max_n_nodes_per_cluster parameter to PartitioningConfig dataclass to limit subgraph size in _node_partition_graph() function
  • Support for pymetis and Kernighan-Lin partitioning methods: added support for additional graph partitioning algorithms beyond spectral clustering
  • Apache 2.0 license headers across the codebase: added comprehensive license headers to all source files with copyright notice and full Apache 2.0 license text
  • Pre-commit hook for license header insertion: added automated license header insertion to pre-commit configuration for consistent license management
  • charge parameter to VQE constructor: added optional charge argument for molecular calculations (defaults to 0)
  • Improved job naming for partitioning: enhanced job name generation in graph partitioning workflows for better identification
  • Progress bar behavior improvements for Jupyter: added is_jupyter parameter to make_progress_bar() function with manual refresh mode and improved terminal size handling in OverwriteStreamHandler for Jupyter notebook compatibility
  • Python-dotenv support: added python-dotenv dependency and support for loading environment variables from .env files, including .env in .gitignore

🔄 Changed

  • Renamed Optimizers enum to Optimizer: refactored enum name for consistency across codebase
  • Added use_packing parameter to QoroService.submit_circuits() method: method-level parameter to override constructor-level circuit packing setting
  • Refactored partitioning method parameter handling: improved parameter validation and error messages for unsupported partitioning methods
  • Improved partitioning logic: refactored _node_partition_graph() and perform_partitioning() functions to return list of subgraphs instead of partition labels, added partition_graph_with_max_nodes() function for recursive partitioning with size constraints, and improved edge count validation

🐛 Fixed

  • Fixed progress bar behavior in Jupyter notebooks: corrected terminal size detection and line clearing logic in OverwriteStreamHandler to work properly in Jupyter environments
  • Fixed logger message formatting: corrected string slicing in OverwriteStreamHandler.emit() to properly handle message overwriting (changed from [2:-1] to [2:-2])
  • Fixed partitioning logic: corrected edge counting and subgraph validation in _node_partition_graph() to properly handle empty subgraphs and edge preservation