Learning to program the D-Wave One: Software you should install & a book you should buy

Before you begin learning to program the D-Wave One,  you should install several free software packages. The example we’re going to use (building a small piece of software that reads in a person’s first name and attempts to classify it as either “male” or “female”) requires some basic understanding of a field known as Natural Language Processing (NLP), which is just the application of computing methods to studying and manipulating human languages. If you don’t know anything about teaching machines to learn, or NLP, don’t worry! We will only need some very basic ideas and tools from these fields. I find the issues in NLP to be intensely fascinating — I hope you will too.

We’re going to code in Python 2.7, so I’d recommend you use this version. Never coded in Python before? Don’t worry. It is super easy and fun to learn and use. Four months ago I’d never written a single line of Python code, and now all the girls love me for my mad coding skillz, OK maybe not.

Alright so please install the following packages:


The material here assumes you are using Python 2.7. You can download Python from here.

Python comes with a simple programming environment called IDLE. While it is OK, what I’d highly recommend is the Jetbrains Integrated Development Environment (IDE) called Pycharm. You can evaluate Pycharm for free and if you decide you like it, you can buy a license for cheap. It is really worth it, it is a great product.

The Natural Language Tool Kit AKA NLTK

The code here uses NLTK version 2.0. You can get it from here. I also very highly recommend that you purchase the Natural Language Processing with Python book. This book taught me both Python and NLP. It is one of the best textbooks I have ever read and is very highly recommended, even if you just want to use it to learn Python!


This is a scientific computing library for Python.

That’s it for now!

38 thoughts on “Learning to program the D-Wave One: Software you should install & a book you should buy

  1. So modelling and interacting with the quantum processor is done with and through python?

    What OS does the main processor run? Is it Linux?

    • Hi Andre!

      There are APIs for the system that can be called from Python, Matlab, C++, SQL and Java. I’m going to be using the Python one as I personally love Python, and there are many libraries for artificial intelligence type stuff freely available (including the natural language toolkit).

      The main processor doesn’t run an OS in the sense you’re thinking of. The OS is written in LISP and isn’t exposed to developers at this point.

  2. I think i haven’t made myself clear…

    From what i gathered D-Wave is essencialy a quantum co-processor wich is acessed from API’s on a host computer or through the network. I was curious on what was the OS of the support machine.

    • It’s entirely up to you — the API is agnostic to the OS of the host machine. I am running Windows 7 on my machine, but you can run any flavor of Linux you want also.

    • Hey, Dave! Long time no see…😉

      Of course it’s Dr. G. who is pushing for that snaky boa constrictor thing here, but, as Geordie points out above, the nuts and bolts are controlled by the proper 50 years old computer language, in its SBCL incarnation.

      But I do not think it was ever Maple; MATLAB, yes… Still useful to plot a chart or two once in a while!

      Paul B.

  3. Hi Geordie,

    In terms of the applications you can build on this, are you saying that as long as the problem can be programmed into a QUBO form, then the processor should take care of it all (with a farhi’s quantum adiabatic algorithm built on LISP?)?

    sorry about the stupid question but just getting my head around it.

    • Yes that’s basically correct.

      As long as part of your application requires solution of QUBOs, you send those QUBOs (via the API) to the system, and the system solves them for you using a quantum annealing algorithm run in the chip.

      The easiest way to think about building applications is to think of the system as a black-box QUBO solver. There are some important issues that need to be dealt with to get maximum performance out of the system, but as a first pass just think of it as a black box QUBO solver.

  4. Wow, this is intense! Very cool stuff. So will DWave be providing modules for mapping other NP-Hard problems to QUBO and back again?

  5. Pingback: Digital is dead: Lockheed Martin buys D-Wave’s first quantum computer | Robert Corvus

  6. Pingback: Lockheed Martin Betting Big on Quantum Computing | NEWS ONLINE

  7. Pingback: Lockheed Martin Betting Big on Quantum Computing | pcgamestore.co.za

  8. I understand that the point of D-Wave One is not necessarily to outperform an equivalently priced supercomputer (this time around), but rather to serve as an exploratory/research tool for companies and institutions that want to investigate adiabatic quantum annealing as a method of solving certain hard optimization problems. To that end, do you have any publications or whitepapers that show, say, 3-SAT solutions generated by this particular machine?

  9. Pingback: Lockheed Martin Bets Big on Quantum Computing | Mini Laptop King

  10. Pingback: Lockheed Martin Bets Big on Quantum Computing | Datacentre Management . org

  11. Pingback: Lockheed Martin Bets Big on Quantum Computing – PCWorld | Daily News

  12. Pingback: Lockheed Martin Bets Big on Quantum Computing – PCWorld | TrendsNews

  13. Pingback: Lockheed Martin Bets Big upon Quantum Computing – PCWorld | Celebrity Gossip

    • No, but the APIs we’ve got are basically wrappers around lisp, so it would be easy to make one. Just figured the number of lisp coders out there was probably pretty small.

  14. Can the D-wave or any quantum computer be programmed in just plain C at this time? Either directly or through the use of some API? I did some research and it looks like a language called QCL (Quantum Computing Language) is used that is similar to C++ except used for quantum computing. Thanks in advance.

  15. Hi Goerdie, I’m really amazed at the product! Is it possible to run simpler queries like – given an arbitrary large integer, what are its factors?

  16. Folks puut up their mobile ffor sale so; there is a verey big
    market for second hand cell phone also. Moreover,
    by ddoing the penile exerciuse recommended with
    every package of Prro – Solution you can get a permanently bigger penis in less
    than 2 weeks. So, purchase a new vehicle just before or after the new model makes its appearance.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s