TensorFlow was originally released by Google in 2015 as a machine learning system that runs on classical computers including CPUs, GPUs, and TPUs. The classical version is still in wide use today both inside and external to Google for a number of applications. Google announcement unveils a new version called TensorFlow Quantum that is open sourced and integrates with their Cirq quantum computer programming language. It is used in a hybrid quantum-classical configuration to allow the rapid prototyping of quantum machine learning models.
With the classical and the quantum computers working together, the steps to run a quantum machine learning model as as follows:
- Prepare a quantum dataset
- Evaluate a quantum neural network model
- Measure the resultant quantum states as either a sample or an average over several runs
- Evaluate a classical neural networks model
- Evaluate a cost function
- Update the gradients and parameters in a direction expected to decrease the cost. Then, go to step 2 and repeat until the cost function can no longer be decreased.
Steps number 2 and 3 can be run on either a quantum processor, such as their Sycamore chip, or on a quantum simulator. In conjunction with this announcement, Google also released open sourced versions of the high performance qsim and qsimh simulators. These simulators were used for cross entropy benchmarking in Google’s Quantum Supremacy Experiment. qsim is a Schrödinger full state-vector simulator. It computes all the 2n amplitudes of the state vector, where n is the number of qubits. qsim is significantly faster than the native simulator built in to Cirq. In Google’s arXiv paper they showed a 7 times improvement for a 20 qubit random circuit with a depth of 20 and a 100 times improvement for structured circuit of the same size. qsimh is a hybrid Schrödinger-Feynman simulator that uses a technique of splitting the lattice into two parts.
Google has released a lot of information related to these products. Here are links to the documentation and the software.
- Google AI Blog Announcing TensorFlow Quantum and the simulators
- Technical paper on arXiv describing TensorFlow Quantum
- TensorFlow Quantum Main Page on Tensorflow.org
- TensorFlow Quantum Notebook Tutorials
- GitHub Library for TensorFlow Quantum
- Video Presentation on TensorFlow Quantum
- GitHub Library for qsim and qsimh
March 12, 2019