What I have been doing so far is getting the result of the jobs post job completion using qiskit:
from qiskit import IBMQ
IBMQ.load_account()
provider = IBMQ.get_provider(hub='ibm-q', group='open', project='main')
backend = provider.get_backend('ibmq_qasm_simulator')
job_id = backend.jobs()[0].job_id()
print(f'JOBID: {job_id}')
job = backend.retrieve_job(job_id)
time_steps = job.time_per_step()
counts = job.result().get_counts()
print(f'RUNNING: {time_steps["RUNNING"]}')
print(f'COMPLETED: {time_steps["COMPLETED"]}')
RUNTIME = time_steps["COMPLETED"] - time_steps["RUNNING"]
print(f'RUNTIME: {RUNTIME.total_seconds()}')
Is there a better way of doing this within Pennylane so I don’t have to retrieve the information after runs? If I do optimisation on the circuit I will also have quite a few jobs to retrieve the runtime for to get the total runtime. My aim is to compare my algorithm to the best classical alternative experimentally.