The D-Wave 2X System has a web API with client libraries available for C, C++, Python and MATLAB. This interface allows the machine to be easily accessed as a cloud resource over a network. Using development tools and client libraries, users can write code in the language of their choice.
A variety of tools are being developed by D-Wave, quantum software companies, and D-Wave system users to make the system easier to use by programmers and subject matter experts. These tools will enable more users to build effective algorithms, models, and applications.
Programming a quantum computer is different than programming a traditional computer. To program the system, the user maps a problem into a search for the “lowest point in a vast landscape,” which corresponds to the best possible outcome. The processor considers all the possibilities simultaneously to determine the lowest energy required to form those relationships. Because a quantum computer is probabilistic rather than deterministic, the computer returns many very good answers in a short amount of time - 10,000 answers in one second. This gives the user not only the optimal solution or a single answer, but also other alternatives to choose from.
Users can submit problems to the system in a number of different ways, as described below. Values corresponding to the “weights” of the qubits and coupling “strengths” of the interaction between them are submitted to the system, which then executes a single Quantum Machine Instruction (QMI) for processing. Up to about 1000 weights and about 3000 strengths can be specified, reflecting the number of qubits and the number of connections in the current D-Wave 2X 1000 qubit processor.
The solutions are values that correspond to the optimal configuration of qubits found, or the lowest points in the energy landscape. These values are returned to the user program over the network. USers can specify the number of solutions they want the system to return.
There are multiple ways to engage the system:
- Use a higher level program in C, C++, Fortran or Python to create and execute a Quantum Machine Instruction.
Use one of the D-Wave tools under development including:
• ToQ, a high level language translator used for constraint satisfaction problems and designed to let users “speak” in the language of their problem domain
• qbsolv, a hybrid partitioning optimization solver for problems that are larger than will fit natively on the quantum processor. Qbsolv has been released as open-source software and is accessible on GitHub at github.com/dwavesystems/qbsolv
• dw, which executes QMIs created via a text editor
- Manually enter a QMI using the Qubist web interface to learn about the structure of a QMI, and to view and execute a Quantum Machine Instruction
Download this white paper to learn more about the programming model for a D-Wave system.