On qiskit, I have defined a QUBO, called
qp as follows:
print(qp.prettyprint()) Minimize -1.7324559764718837*x10^2 + 0.00619189721450626*x10*x11 ... + 3.6972673229589947*x27*x29 - 32.42658793825545*x28^2 + 7.39453464591802*x28*x29 - 61.155908553552145*x29^2 Subject to No constraints Binary variables (20) x10 x11 x12 x13 x14 x15 x16 x17 x18 x19 x20 x21 x22 x23 x24 x25 x26 x27 x28 x29
There are actually 104 lines in the minimization problem.
Using a classical solver, I can easily solve this problem:
cplex_optimizer = CplexOptimizer() qubo_minimization_result = cplex_optimizer.solve(qp)
This gives me:
print("minimum point (binary): ", qubo_minimization_result.x) minimum point (binary): [0. 0. 0. 0. 1. 0. 0. 0. 0. 1. 0. 1. 1. 1. 0. 1. 1. 1. 1. 0.]
I want now to solve it using QAOA on a IBM quantum computer (QC). But before doing it on a real QC, I would like to solve it using a IBM simulator
# Select a backend. backend = provider.get_backend("ibmq_qasm_simulator") # QAOA parameters number_of_shots = 100000 qaoa_reps = 1 # Betas and Gammas as described in the original QAOA paper betas =  gammas =  algorithm_globals.random_seed = 10598 quantum_instance = QuantumInstance( backend, seed_simulator=algorithm_globals.random_seed, seed_transpiler=algorithm_globals.random_seed, shots=number_of_shots) qaoa_mes = QAOA(quantum_instance=quantum_instance, reps=qaoa_reps, initial_point=[*betas, *gammas]) qaoa = MinimumEigenOptimizer(qaoa_mes) # using QAOA qaoa_result = qaoa.solve(qp)
When I run this qiskit code, I never obtain a result in the sense that the code is running but never stops. Do you think my QUBO is too big for solving it on a 32-qubits IBM simulator? Should I try directly on a real 127-qubits QC?