[New Tutorial] Using Keras 3 with pennylane (including full multi-backend support) #1555
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.
Before submitting
Please complete the following checklist when submitting a PR:
Ensure that your tutorial executes correctly and conforms to the
guidelines specified in the README.
Remember to do a grammar check of the content you include.
All tutorials conform to
PEP8 standards.
To auto format files, simply
pip install black
, and thenrun
black -l 100 path/to/file.py
.When all the above are checked, delete everything above the dashed
line and fill in the pull request template.
Title:
Keras 3 Training
Summary:
A demo showing how to integrate a pennylane circuit into keras 3 and train it using both pytorch and tensorflow
Relevant references:
None
Possible Drawbacks:
None
Related GitHub Issues:
None
If you are writing a demonstration, please answer these questions to facilitate the marketing process.
GOALS — Why are we working on this now?
I implemented this support for a paper I was working on, and thought it would be useful as a general tutorial for everyone.
AUDIENCE — Who is this for?
For people who want to train QML models but have a Keras-based workflow for their ML stack. Also great for those who want to define a QML layer that can be integrated and trained with multiple ML backends without code changes.
KEYWORDS — What words should be included in the marketing post?
Quantum Machine Learning, Keras, Tensorflow, PyTorch, Jax, How-To, Tutorial
Which of the following types of documentation is most similar to your file?
(more details here)