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.

Example of a Hybrid Quantum-Classical Neural Network using TensorFlow Quantum. Source: Google

With the classical and the quantum computers working together, the steps to run a quantum machine learning model as as follows:

  1. Prepare a quantum dataset
  2. Evaluate a quantum neural network model
  3. Measure the resultant quantum states as either a sample or an average over several runs
  4. Evaluate a classical neural networks model
  5. Evaluate a cost function
  6. 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.

March 12, 2019