Skip to content

Ensamble#6

Merged
KahnR merged 8 commits into
mainfrom
ensamble
May 12, 2026
Merged

Ensamble#6
KahnR merged 8 commits into
mainfrom
ensamble

Conversation

@KahnR
Copy link
Copy Markdown
Collaborator

@KahnR KahnR commented May 11, 2026

Separate out the QPL method.

Refactor QEnsemble code

f-utro and others added 8 commits April 9, 2026 17:05
Major Features:
- Quantum ensemble classifier with swap and random unitary methods
- Blob dataset generator for benchmarking
- Generalized evaluation metrics supporting 6 metrics (accuracy, brier, f1, precision, recall, auc)
- Data encoding utilities for quantum state preparation

Core API Changes:
- qbiocode/learning/compute_qensemble.py: Unified quantum ensemble implementation
- qbiocode/utils/data_encoding.py: normalize_data, label_to_array, prepare_training_set
- qbiocode/data_generation/make_blobs.py: Blob dataset generation
- qbiocode/evaluation/model_evaluation.py: Enhanced evaluation_metrics function
- qbiocode/utils/qutils.py: Added execute_circuit for general quantum execution

Documentation:
- Updated README.md with quantum ensemble usage examples
- Updated CHANGELOG.md with detailed feature descriptions
- Updated docs/source/tutorials.md with comprehensive tutorial guide
- Added API documentation for all new modules
- Cleaned tutorial notebook of implementation details

Tutorial Updates:
- tutorial/QEnsemble/helper_functions.py: Classical baselines and quantum workflows
- tutorial/QEnsemble/QEnsemble_example_blobs.ipynb: Updated to use QBioCode API
- Removed standalone modeling.py, modeling_random_unitary.py, Utils.py files
- Removed implementation migration notes from notebook

Bug Fixes:
- Fixed KeyError issues in modeleval integration
- Fixed DataFrame column access errors in RF/XGBoost best params
- Fixed numpy array handling in evaluation metrics
- Added comprehensive error handling for edge cases
- Cleared Python and Jupyter caches

References:
- Macaluso et al. (2023) - IET Quantum Communication
- Rhrissorrakrai et al. (2025) - arXiv:2506.02213
- Resolved merge conflicts in __init__.py files (data_generation, learning, utils, evaluation)
- Applied black formatting to model_evaluation.py for consistency
- Kept ensemble additions (compute_qensemble, evaluation_metrics, data_encoding, make_blobs)
- Updated to use double quotes for string consistency with main branch
- Integrated testing infrastructure from main (pytest, test files)
- Integrated code quality improvements (black, isort, CI/CD updates)
- Updated CHANGELOG with testing and code quality improvements from PR #5
- Consolidated two [Unreleased] sections into one
- Combined quantum ensemble features with testing/code quality improvements
- Maintains chronological order and proper formatting
- Moved apps/ directory to qbiocode/apps/ to make it part of the main package
- Updated qbiocode/__init__.py to expose apps submodule
- Updated setup.py entry points and package_data paths
- Updated all documentation and tutorial imports from 'apps.*' to 'qbiocode.apps.*'
- Added proper quoting for pip install commands with extras (zsh compatibility)
- Tested imports successfully: qbiocode.apps.qprofiler and qbiocode.apps.sage

Users can now use intuitive imports:
  from qbiocode.apps.qprofiler import qprofiler
  from qbiocode.apps.sage.sage import QuantumSage
@KahnR KahnR merged commit ecfe68b into main May 12, 2026
11 of 12 checks passed
@KahnR KahnR deleted the ensamble branch May 12, 2026 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants