D-Wave has introduced a computing system built around a new kind of processor. This system is called the D-Wave One. It is unlike any other you may have programmed in the past.
The processor in the D-Wave One – codenamed Rainier – is designed to perform a single mathematical operation called discrete optimization. It is a special purpose processor. When writing applications the D-Wave One is used only for the steps in your task that involve solving optimization problems. All the other parts of your code still run on your conventional systems of choice.
Rainier solves optimization problems using quantum annealing (QA), which is a class of problem solving approaches that use quantum effects to help get better solutions, faster. Because D-Wave One is a type of quantum computer, it‘s natural to think that developing applications on the system might be really hard. While it does require some work, it is not as difficult as you might think. Most of the hard work arises from having to bring together basic knowledge from fields that normally don‘t cross-pollinate much, such as quantum physics and machine learning.
This is the first in a series of blog posts describing the algorithms we have run on D-Wave quantum computers, and how to use these to build interesting applications. It is meant to be practical and hands-on, and is not meant to be an advanced or comprehensive review of any of the underlying concepts used. We can point you to reference material on any subject where you might want a deeper dive.
We start by introducing and describing an algorithm, called quantum binary classification (QBC), which is a supervised machine learning technique which can be used to train any binary classifier. A binary classifier is software that inputs an object, such as an image, document, or sound file, and labels it with one of two possible labels – for example, “yes” or “no”. The “yes” or “no” response can be to any question you can think of pertaining to the type of object in question. The QBC algorithm was co-developed with researchers at Google and Purdue University, and was first used for building a classifier for labeling the presence or absence of cars in images.
To make everything concrete, we will run through a fully worked example, where we use the QBC algorithm to train a binary classifier that inputs a person‘s first name, and classifies it as either more likely to be male or female. This example was chosen because it‘s fun, simple, and exhibits the basic features of more complex binary classification problems.
Audience and Required Background
This material was developed to help software developers interested in learning how to program D-Wave quantum computing systems get started. Experience in machine learning (in particular classification) and discrete optimization is helpful but not necessary. The programming language used in the included examples and source code is Python 2.7, and use is made of the Natural Language Tool Kit (NLTK) and the Natural Language Processing with Python book. While the example we will go through involves basic concepts in natural language processing (NLP), no background in NLP is required. No previous exposure to programming D-Wave quantum computing systems is necessary. A very helpful companion document, which first introduced the algorithm described here, is Training a Large Scale Classifier with the Quantum Adiabatic Algorithm.