I read Qiskit quantum admm on this website.
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.
I read Qiskit quantum admm on this website.
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.
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
admm=ADMMOptimizer(params=admm_params,qubo_optimizer=qubo_optimizer,continuous_optimizer=convex_optimizer)