I'm running VQE algorithm from qiskit aqua on
statevector_simulator and each time I run it I get different results which are sometimes correct and sometimes not. I'm not sure if I'm setting parameters correctly.
Here is my code:
qubitOp is generated with DOcplex module.
max_trials = 80 depth = 1 entanglement='full' slsqp = SLSQP(maxiter=max_trials) ry = RY(qubitOp.num_qubits, depth=depth, entanglement=entanglement) vqe = VQE(qubitOp, ry, slsqp) provider = IBMQ.get_provider('ibm-q') backend = Aer.get_backend('statevector_simulator') quantum_instance = QuantumInstance(backend,seed_simulator=seed, seed_transpiler=seed, optimization_level=0) res = vqe.run(quantum_instance)