pennylane_qiskit.vqe_runner(backend, hamiltonian, x0, program_id, ansatz='EfficientSU2', ansatz_config=None, optimizer='SPSA', optimizer_config=None, shots=8192, use_measurement_mitigation=False, **kwargs)[source]

Routine that executes a given VQE problem via the sample-vqe program on the target backend.

  • backend (ProgramBackend) – Qiskit backend instance.

  • hamiltonian (qml.Hamiltonian) – Hamiltonian whose ground state we want to find.

  • x0 (array_like) – Initial vector of parameters.

  • program_id (str) – Id of the program, it has to be generated by using the upload_vqe_runner function.

  • uploaded (Once the program is) –

  • online. (you can find the id in your program list) –

  • ansatz (Quantum function or str) – Optional, a PennyLane quantum function or the name of the Qiskit ansatz quantum circuit to use. Default=’EfficientSU2’

  • ansatz_config (dict) – Optional, configuration parameters for the ansatz circuit if from Qiskit library.

  • optimizer (str) – Optional, string specifying classical optimizer. Default=’SPSA’.

  • optimizer_config (dict) – Optional, configuration parameters for the optimizer.

  • shots (int) – Optional, number of shots to take per circuit. Default=1024.

  • use_measurement_mitigation (bool) – Optional, use measurement mitigation. Default=False.


The result in SciPy optimization format.

Return type