I am curious to understand why does the IBMQDevice keep executing the code endlessly?
I am referring to the Quantum transfer learning code (ants vs. bees classification) from (Mari et al., 2019 Link:https://arxiv.org/pdf/1912.08278.pdf
code link: https://pennylane.ai/qml/app/tutorial_quantum_transfer_learning.html).
Though I specify the number_of_epochs = 1 and the shots=1 for ‘ibmqx2’ device, the execution seems endless on the quantum hardware.
Plus the fact that I am unable to track the training progress on my system (this only worked with the simulator).
Am I missing some code segment to get back the results from the quantum hardware?
At present I only replaced the ‘default.qubit’ device to the actual ibm machine i.e.
From, p_device = qml.device(“default.qubit”, wires=n_qubits)
To, p_device = IBMQDevice(wires=n_qubits, backend=‘ibmqx2’, shots=1)
I am a novice in quantum computing, please pardon my query. I assumed 1 shot = 1 run on the quantum hardware.
On checking the IBMQ account, it displays the number of shots =1 correctly yet it seems to be executing for a lot of runs i.e. I could see 415 results (with status: COMPLETED) displayed for that particular job.
Does that have any connection with the stability of the actual quantum device? Or is the learning rate and the decay in the learning rate responsible for this?
Further details:
The following piece of code seems to execute endlessly
model_hybrid = train_model(
model_hybrid, loss_function, optimizer_hybrid, exp_lr_scheduler, num_epochs=num_epochs
)
Could you please help me understand the same?
Thank you.