# Does the Qiskit ADMM optimizer really run on quantum computers?

I doubt whether this Qiskit ADMM algorithm can run on a quantum computer. The code did import packages from Qiskit, but it doesn't create any quantum circuit.

The ADMM optimizer is a classical optimizer that will be execute on the classical computer.

Nowadays, because of the limitation of the hardware, we see a lot of hybrid quantum-classical algorithms. In particular, Variational algorithms. These algorithms relies on the variational principle.

Hence, part of the algorithm require a classical computer doing some optimization, for instance, running ADMM optimizer over some cost function. Thus, this is not being done on a quantum computer but rather being executed on a classical computer.

• Thanks. I focus on the part updating dual variables/multipliers in ADMM. Is the part updating dual variables executed on a quantum or a classical computer? Dec 13 '20 at 20:29
• I am not familiar with ADMM optimizer but what I can say is that the quantum computer only being used to execute the circuit you tells it to run. Everything else is being done classically. You start with some circuit with some parameters, these parameters will be updated through a classical optimizer in order to minimize the cost function you defined, and it will submit a new circuit with updated parameters to the quantum computer for another run. The quantum computer doesn't do anything other than evaluating the given quantum circuit and return the value it found. Dec 13 '20 at 20:55

ADMN optimizer is used for functions having shape $$f(x,y) = q(x) + \varphi(y),$$ where $$q(x)$$ is quadratic function with binary variables and $$\varphi(x)$$ is convex continuous function.

For optimization of $$\varphi(y)$$ a classical optimization method is used while $$q(x)$$ can be optimized with a quantum optimizer (VQE, QAOA) or a classical one. Hence you can see that the algorithm can be hybrid or purely classical, it depends on algorithms you choose for optimizing $$f(x,y)$$.

When you start the optimization in Qiskit, try to log to your IBM Q Experience account where you can check if a quantum circuit was prepared and sent to IBM Q.

Here a part of code based on Qiskit Tutorial when you can see how to use QAOA in ADMN optimization. Please note that this code run on a state vector simulator. To run it on real quantum hardware, you have to change the backend.

# classical optimizer for phi function
cobyla=CobylaOptimizer()
# QAOA for q function
qaoa=MinimumEigenOptimizer(QAOA(quantum_instance=BasicAer.get_backend('statevector_simulator')))

qubo_optimizer = qaoa
convex_optimizer= cobyla

# initialize ADMM with classical QUBO and convex optimizer