Add CPU accelerator option and update dependencies#14
Merged
JeremieGince merged 2 commits intodevfrom Nov 28, 2025
Merged
Conversation
Added 'accelerator="cpu"' to pipeline initialization in all relevant notebooks for consistent device selection. Updated pyproject.toml to require matchcake>=0.1.2 and added jupyter and notebook to dev dependencies. Also replaced SptmfRxRx and SptmFHH with CompRxRx and CompHH in the deep learning notebook, and updated execution metadata and outputs.
1 task
Removed execution counts, outputs, and execution metadata from all code cells in nif_deep_learning.ipynb. Also reduced AutoML iterations and max time for faster runs.
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified FilesNo covered modified files...
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request updates three tutorial notebooks to explicitly set the
acceleratorparameter to"cpu"for both the Lightning and AutoML pipelines, ensuring consistent hardware usage regardless of GPU availability. Additionally, thenif_deep_learning.ipynbnotebook receives refactoring to use new quantum operation classes, includes execution metadata and outputs for improved reproducibility, and displays detailed training and evaluation results inline.Hardware configuration and pipeline consistency:
accelerator="cpu"to the pipeline initialization innotebooks/automl_pipeline_tutorial.ipynb,notebooks/ligthning_pipeline_tutorial.ipynb, andnotebooks/nif_deep_learning.ipynbto force CPU usage and avoid GPU selection issues. [1] [2] [3] [4]Quantum circuit refactoring:
NIFDLmodel fromSptmfRxRx/SptmFHHtoCompRxRx/CompHHfor improved clarity or functionality. [1] [2]Notebook execution and reproducibility:
notebooks/nif_deep_learning.ipynbfor better reproducibility and tracking of cell runs. [1] [2] [3] [4] [5] [6]Inline output and results reporting:
notebooks/nif_deep_learning.ipynbto capture and display detailed training, validation, and test metrics, including model summaries, progress bars, and metric tables, directly within the notebook outputs. [1] [2]These changes make the tutorials more robust across different hardware environments, improve the quantum model implementation, and enhance the clarity and reproducibility of notebook results.
Checklist
Please complete the following checklist when submitting a PR. The PR will not be reviewed until all items are checked.
Make sure that the tests passed and the coverage is
sufficient by running
pytest tests --cov=src --cov-report=term-missing.You can do this by running
black src tests.You can do this by running
isort src tests.You can do this by running
mypy src tests.