Number of device executions

Running this tutorial and the number of device executions with the qiskit.aer device yields zero in the latest version of Pennylane which is different to the outputs shown in the notebook.

If the device is swapped out for default.qubit the code is functional.

Any ideas why the output locally is different to the results shown in the tutorial?

Thanks a lot,
Zohim

Hi @Zohim_Chandani1!

Sorry we took some time to respond.

I ran the demo with pennylane version 0.20.0, pennylane-qchem version 0.19.0, openfermion 1.1.0 and cirq 0.11.0

With these versions the only change I had to make in the tutorial was to change the device from ibmq_16_melbourne to ibmq_bogota since melbourne is not available anymore.

Otherwise the demo worked just fine.

I would suggest updating the version of the libraries using pip install <library-name> --upgrade .

Please let me know if this fixes your problem!

I also tried the optimization with SPSA and Gradient Decent in the demo with PennyLane version 0.20.0, noisyopt version 0.2.2 and got number of device executions=0. Why my result is different from the demo’s result?
Thank you,
Terao Morino

Hi @Morino_Terao, I managed to replicate your problem. I thibnk it might be a version issue. I’ll try to see if I can find the right versions to make it work.

Hi @Morino_Terao, this problem arises because we use batch_execute instead of execute and the number of executions is not updated. The problem should be fixed by using pennylane-qiskit==0.18 . I will create an issue so that we can fix the plugin or the demo.

Thanks for reporting this!