Skip to content

Add generative quantum advantage tutorial for issue #909.#1094

Open
rosspeili wants to merge 2 commits into
tensorflow:masterfrom
rosspeili:generative-quantum-advantage-tutorial
Open

Add generative quantum advantage tutorial for issue #909.#1094
rosspeili wants to merge 2 commits into
tensorflow:masterfrom
rosspeili:generative-quantum-advantage-tutorial

Conversation

@rosspeili

Copy link
Copy Markdown
Contributor

New TFQ tutorial based on arxiv:2509.09033 on generative quantum advantage, walks through a small 8-qubit demo, build a shallow ansatz, create training bitstrings, train with TFQ (get_state_op + parameter shift), and sample with get_sampling_op.

Also updates docs/_book.yaml and adds CI runtime caps in scripts/test_tutorials.py.

Closes #909

@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new tutorial notebook, generative_quantum_advantage.ipynb, demonstrating generative quantum advantage using TensorFlow Quantum, along with registering it in _book.yaml and updating test_tutorials.py to scale down parameters for faster testing. A critical mathematical bug was identified in the parameter shift gradient calculation: the parameter shift rule is incorrectly applied directly to the non-linear negative log-likelihood loss function rather than the underlying probabilities, which leads to incorrect gradients. A code suggestion is provided to resolve this issue.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread docs/tutorials/generative_quantum_advantage.ipynb Outdated
@rosspeili

Copy link
Copy Markdown
Contributor Author

@mhucka let me know how this looks, or if I should add more sections, or anything else I might be forgetting. Thanks in advance <3

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.

Implement Generative Quantum Advantage Tutorial

1 participant