How to use a real hardware for VQE?

Hi,

You have demos on how to use IBMQ via Pennylane:

If you have an error in the device about your account already exist you need to create a provider object and pass it to the divide. Like this:

from qiskit_ibm_runtime import QiskitRuntimeService

# For an IBM Cloud account.
ibm_cloud_service = QiskitRuntimeService(channel="ibm_cloud", token="MY_IBM_CLOUD_API_KEY", instance="MY_IBM_CLOUD_CRN")

# For an IBM Quantum account.
ibm_quantum_service = QiskitRuntimeService(channel="ibm_quantum", token="MY_IBM_QUANTUM_TOKEN")

Best

1 Like