TF Quantum Starter Example
Add a TF Quantum example for beginners to get started with TF Quantum. The notebook demonstrates the following pretty simple operations-
- Placing a Qubit
- Working with simple quantum data
- Building a quantum circuit
- Creating and training a hybrid model
- Inferencing the hybrid model
I am aware that the tutorial hello_many_worlds exists which is a beginner tutorial however, this tutorial has different aims.
This PR was originally created on tensorflow/examples#244 ported to this repo as suggested by @lamberta .
Check out this pull request on ![]()
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
So most of this code looks to be copied from our already existing notebook at https://github.com/tensorflow/quantum/blob/research/binary_classifier/binary_classifier.ipynb I see that, relative to the existing notebook, you simplified the quantum data input to have just two entries. Perhaps if there is interest in the existing notebook becoming a tutorial we could consider such a simplification. @MichaelBroughton thoughts on this? (see also page 9 of the TFQ paper)
So most of this code looks to be copied from our already existing notebook at https://github.com/tensorflow/quantum/blob/research/binary_classifier/binary_classifier.ipynb I see that, relative to the existing notebook, you simplified the quantum data input to have just two entries. Perhaps if there is interest in the existing notebook becoming a tutorial we could consider such a simplification. @MichaelBroughton thoughts on this? (see also page 9 of the TFQ paper)
That's right, this is inspired from that notebook, I built this as a simplification to the existing one, to make it a lot easier for beginners to understand.
I think we might be able to fit this in as a tutorial, right after the hello many worlds and before the MNIST classification tutorial. The goal of our tutorials is to showcase the functionality and features of the library so that experts have an easy time making the mental connections between how TFQ functions and QC theory (which we generally expect people to have a strong grasp of).
Even though this is a more "beginner" example and doesn't touch any new library code that hello many worlds doesn't already touch, I think showcasing good visualizations of the single qubit rotation problem might give experts a little more opportunity to connect with and understand how TFQ works. (I think ultimately this means moving that particular example out of research and into tutorials @zaqqwerty )
@lamberta Are you alright if I give this a review and then hand off to you for final say ?
Thanks, @MichaelBroughton I agree. A beginner's tutorial is good, but need to be mindful of the TFQ audience: beginning researchers (and not beginning practitioners). Seems better to port https://github.com/tensorflow/quantum/blob/research/binary_classifier/binary_classifier.ipynb with the sections added here, but with added explanation.
Thanks, @MichaelBroughton These points make sense and I will start working on them.
- I am just a bit unclear about adding descriptions, I can most certainly have a description to address the questions you mentioned in the comment but would anything more be required to make this more clear?
- This makes sense, I will definitely showcase some more math and make sure I firm up understanding for them.
Thanks, @lamberta
A beginner's tutorial is good, but need to be mindful of the TFQ audience: beginning researchers (and not beginning practitioners)
This is something I need to be mindful of while making changes and maybe could change the tone of the tutorial since this tutorial was originally made for a talk I gave at a TensorFlow User Group where some folks were practitioners and was made to help them out too.