qiskit-ibm-runtime
qiskit-ibm-runtime copied to clipboard
Save local mode jobs
Summary
Dependent on making PrimitiveJob
serializable (Qiskit PR https://github.com/Qiskit/qiskit/pull/12963)
Now when local jobs are run, they will be pickled and saved in a local_jobs
directory as job_id.pkl
. These jobs can then be retrieved with job()
or jobs()
and deleted with delete_job()
. Ended up using pickle instead of json encoder/decoder because PrimitiveJob
takes a function (sampler/estimator run) as one of it's init parameters.
Details and comments
When to delete the data. This should be user-configurable and the default can be 30 days.
Not sure the best way to auto delete without some sort of cron job
Fixes #1607