qiskit-ibm-runtime icon indicating copy to clipboard operation
qiskit-ibm-runtime copied to clipboard

Save local mode jobs

Open kt474 opened this issue 6 months ago • 0 comments

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

kt474 avatar Aug 12 '24 21:08 kt474