I am using QAOA to solve the max-cut problem. On my machine, 10 qubits already takes a minute or two to simulate. I'm hoping that the ibmq-qasm-simulator could simulate 32 qubits faster than my laptop would. Here's my code:

After loading in my IBMQ token and such...

optimizer = COBYLA()
# Simulate using IBM's cloud service
backend = provider.get_backend('ibmq_qasm_simulator')
quantum_instance = QuantumInstance(backend, shots=1)

part_array = part.values
w = calc_w(part_array)  # Calculate pairwise distances between points

# Execute algorithm
qubit_ops, offset = max_cut.get_max_cut_qubitops(w)
qaoa = QAOA(qubit_ops, optimizer, p)
result = qaoa.run(quantum_instance)

While the code runs a message in red (like a warning but without "Warning:") displays saying, "The skip Qobj validation does not work for IBMQ provider. Disable it." How do I do what this message is asking?


There is a parameter when instantiating a QuantumInstance() called skip_qobj_validation. This parameter is set to True by default. When creating the QuantumInstance, you can set it to False, and that will get rid of the warning.

q_instance = QuantumInstace(skip_qobj_validation=False)
| improve this answer | |
  • $\begingroup$ Thank you! This worked great! $\endgroup$ – AJ Rasmusson Sep 23 '19 at 11:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.