#### Quantum Computing

# The Qiskit Optimization Module starts a path to frictionless quantum computing

July 9, 2020 | Written by: Jay Gambetta and Stefan Woerner

Categorized: Quantum Computing

Share this post:

Software developers expect to run their programs in the language they use, knowing a smooth ballet of technology is working behind the scenes for their results. It’s with this expectation that we’ve started our journey towards a frictionless quantum development experience with the release of the Qiskit Optimization module. It’s an initial step towards our vision for creating a programming environment where the intricacies of the underlying technology are no longer a concern to users. In the future, a program will be handed off to the cloud and vast quantum and classical resources will be employed, and within the blink of an eye the solution is returned perfectly optimized. Everything else is handled and just works.

When we first launched IBM Quantum Experience, we recognized that for quantum computing to be successful, there would need to be an evolution of the access points by which a diverse community of developers and researchers could contribute and add value. With our original interface, programming was initiated through OpenQASM – a representation at the level of logical operations (“gates”)of the underlying qubits, allowing the development of quantum circuits. Subsequently, we made access further down the stack possible with OpenPulse, permitting researchers and scientists interested in understanding noise on real hardware to explore how to design better gates through mitigating errors. Now, we’ve gone back to the top of the stack, and released the Qiskit Optimization module, starting our journey to create a truly frictionless quantum development experience for the user.

It took 60 years to abstract software in classical computing to the point where users could input a simple line of code into a templated program in order to build an app or website. Quantum computing needs to go through a similar process in the next two to three years.

The Qiskit Optimization module enables easy, efficient modeling of optimization problems using DOcplex – IBM Decision Optimization CPLEX modeling. Programmers need only program as they normally would for the problem they are trying to solve. Just as today’s software developers do not need to concern themselves with transistors, NAND gates, assembly language, or even algorithms for linear algebra, the new module abstracts away a layer in quantum programming. This gives an optimization expert access to quantum resources through a standard library of circuits and algorithms. Quantum circuits represent the complex calculations that quantum computers perform, whether it is, for example, optimizing business functions, modeling financial risk or measuring the energy of chemical compounds for the development of new battery technology.

## How it works: Qiskit Optimization Module

Our team developed the new module with help from our open source community, in particular our IBM Q Network collaborators at JPMorgan Chase, to boost research, development and benchmarking of quantum optimization algorithms for near-term quantum computers. A uniform interface as well as automatic conversion between different problem representations allows users to solve different types of quadratic problems with help from fundamental quantum algorithms provided by Qiskit. In addition, the modular design facilitates rapid development and testing of new algorithms. Compatible classical optimizers are also provided for testing, validation and benchmarking. The new module offers a glimpse of the vast number of applications where quantum optimization may have an enormous impact in the future, once quantum systems are available at the required scale.

**A Code Snippet of Qiskit Optimization Module**

```
# example to solve a quadraric problem using a Quantum optimization algorithm
from qiskit.optimization import QuadraticProgram
from qiskit.optimization.algorithms import GroverOptimizer
from qiskit import Aer
from docplex.mp.model import Model
# construct problem with DOcplex
model = Model('docplex_model')
x, y = model.binary_var_list(2)
model.maximize(x*y + x + y)
# convert DOcplex model to Qiskit Quadratic Program
qp = QuadraticProgram()
qp.from_docplex(model)
# define a Quantum backend on which to run the optimization
# a Qiskit simulator in this case
backend = Aer.get_backend('statevector_simulator')
# use the Grover Adaptive Search (GAS) to solve the optimization problem
grover = GroverOptimizer(num_value_qubits=3, quantum_instance=backend)
result = grover.solve(qp)
# printing results: x=[1.0,1.0], fval=3
print(result)
```

By creating modules that make functions such as optimization easier to program on quantum computers, we are working to change the way people who are not experts in quantum theory or quantum mechanics view quantum computers. In doing so, we hope to expand our Qiskit community from hundreds of thousands of programmers today to tens of millions in the future. In giving a broader cross-section of programmers access to quantum computing, businesses will be able to better understand how a quantum computer will solve different problems and how those solutions could scale to meet their enterprise’s needs.

Qiskit’s Optimization module allows for classically simulating the algorithms as well as testing them on real quantum devices, including IBM’s quantum systems available today to our open users and the IBM Q Network users. We have likewise made tutorials available explaining how developers can model their own optimization problems and on how to use the different optimizers to solve them. This release is a significant step on the path to frictionless quantum development, which will eventually impact users in about every application area imaginable.

It took 60 years to abstract software in classical computing to the point where users could input a simple line of code into a templated program in order to build an app or website. Quantum computing needs to go through a similar process in the next two to three years. In the coming weeks and months we will further extend and improve the Optimization module by adding support for new types of problems and new algorithms. We will also release new modules that tackle a wider variety of applications important to businesses and science.

The final stage of technological adoption is when the technology itself becomes invisible. All the parts you care about are exposed, the rest are hidden. Our vision for quantum computing is exactly this.

*Read more in the Qiskit Medium about how the new module boosts research, development, and benchmarking of quantum optimization algorithms for near-term quantum computers.* — Stefan Woerner

## IBM Quantum

### Quantum starts here

**Jay Gambetta**

IBM Fellow and Vice President, IBM Quantum

**Stefan Woerner**

Quantum Applications Lead, IBM Quantum

### Goldman Sachs & IBM researchers estimate quantum advantage for derivative pricing

In a new preprint now on arXiv, “A Threshold for Quantum Advantage in Derivative Pricing”, our quantum research teams at IBM and Goldman Sachs provide the first detailed estimate of the quantum computing resources needed to achieve quantum advantage for derivative pricing – one of the most ubiquitous calculations in finance.

### The IBM Quantum Challenge Fall 2020 results are in

What does programming for the not-so-distant quantum future look like? From November 9 to 30, more than 3,300 people from 85 countries applied for the 2,000 seats of the IBM Quantum Challenge to find out. As our cloud-accessible quantum systems continue to advance in scale and capability with better processors of larger number of qubits, […]

### Rethinking quantum systems for faster, more efficient computation

As we looked closer at the kinds of jobs our systems execute, we noticed a richer structure of quantum-classical interactions including multiple domains of latency. These domains include real-time computation, where calculations must complete within the coherence time of the qubits, and near-time computation, which tolerates larger latency but which should be more generic. The constraints of these two domains are sufficiently different that they demand distinct solutions.