I am solving a QUBO using QAOA. It works flawlessly with default parameters for smaller instances of the problem, but my RAM is saturated when I try to solve a problem of size 15. I suspect this can be resolved by changing the parameter
p. Don't mind if it generates a wrong result as output, at least don't wanna run out of resources and end abruptly. I even checked with different simulators, but it didn't work. Mainly, want to know how to play around with the number of layers
Here's the code for reference:
from qiskit import Aer from qiskit.aqua import aqua_globals, QuantumInstance from qiskit.aqua.algorithms import QAOA from qiskit.optimization import QuadraticProgram qp=QuadraticProgram() qp.from_ising(op, offset, linear=True) aqua_globals.random_seed = 123 quantum_instance = QuantumInstance(Aer.get_backend('aer_simulator'), seed_simulator=aqua_globals.random_seed, seed_transpiler=aqua_globals.random_seed) qaoa_mes = QAOA(quantum_instance=quantum_instance, initial_point=[0., 0.]) qaoa = MinimumEigenOptimizer(qaoa_mes) result = qaoa.solve(qubo)
Also, how to get the circuit?