Skip to content

Add CPU accelerator option and update dependencies#14

Merged
JeremieGince merged 2 commits intodevfrom
13-bug-gates-with-old-naming-convention
Nov 28, 2025
Merged

Add CPU accelerator option and update dependencies#14
JeremieGince merged 2 commits intodevfrom
13-bug-gates-with-old-naming-convention

Conversation

@JeremieGince
Copy link
Contributor

@JeremieGince JeremieGince commented Nov 28, 2025

Description

This pull request updates three tutorial notebooks to explicitly set the accelerator parameter to "cpu" for both the Lightning and AutoML pipelines, ensuring consistent hardware usage regardless of GPU availability. Additionally, the nif_deep_learning.ipynb notebook 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:

  • Added accelerator="cpu" to the pipeline initialization in notebooks/automl_pipeline_tutorial.ipynb, notebooks/ligthning_pipeline_tutorial.ipynb, and notebooks/nif_deep_learning.ipynb to force CPU usage and avoid GPU selection issues. [1] [2] [3] [4]

Quantum circuit refactoring:

  • Replaced quantum operation imports and usage in the NIFDL model from SptmfRxRx/SptmFHH to CompRxRx/CompHH for improved clarity or functionality. [1] [2]

Notebook execution and reproducibility:

  • Added execution metadata (timestamps and execution counts) to most code cells in notebooks/nif_deep_learning.ipynb for better reproducibility and tracking of cell runs. [1] [2] [3] [4] [5] [6]

Inline output and results reporting:

  • Updated notebooks/nif_deep_learning.ipynb to 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.

  • All new features include a unit test.
    Make sure that the tests passed and the coverage is
    sufficient by running pytest tests --cov=src --cov-report=term-missing.
  • All new functions and code are clearly documented.
  • The code is formatted using Black.
    You can do this by running black src tests.
  • The imports are sorted using isort.
    You can do this by running isort src tests.
  • The code is type-checked using Mypy.
    You can do this by running mypy src tests.

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.
@JeremieGince JeremieGince linked an issue Nov 28, 2025 that may be closed by this pull request
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.
@github-actions
Copy link

github-actions bot commented Nov 28, 2025

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
882 859 97% 90% 🟢

New Files

No new covered files...

Modified Files

No covered modified files...

updated for commit: d6cd179 by action🐍

@JeremieGince JeremieGince merged commit 2fb559e into dev Nov 28, 2025
6 checks passed
@JeremieGince JeremieGince deleted the 13-bug-gates-with-old-naming-convention branch November 28, 2025 17:05
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.

[BUG] Gates with old naming convention

1 participant