Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable IBMQExperiment checkpointing #327

Open
sserita opened this issue Jun 20, 2023 · 1 comment · May be fixed by #379
Open

Enable IBMQExperiment checkpointing #327

sserita opened this issue Jun 20, 2023 · 1 comment · May be fixed by #379
Labels
enhancement Request for a new feature or a change to an existing feature
Milestone

Comments

@sserita
Copy link
Contributor

sserita commented Jun 20, 2023

Is your feature request related to a problem? Please describe.
It would be nice if it was possible to do a possible checkpointing of an IBMQExperiment.

Describe the solution you'd like
The use case I'm imagining is that a notebook has generated an IBMQExperiment and submitted at least some of the jobs, but then the kernel dies. It should be able to save the state of the IBMQExperiment on each submit/poll for results. Even on notebook restart, it should be possible to interact with the existing jobs since we save the job ids.

@sserita sserita added the enhancement Request for a new feature or a change to an existing feature label Jun 20, 2023
@nemill
Copy link

nemill commented Jun 20, 2023

Environment: Windows 11, Python 3.10.11, PyGSTi 0.9.11.1

Issue:
Attempting to write experiment results, the following error occurs and prevents writing:

Code:
combined_exp.write("C:\Users\nemill\pyGSTi\nathan_scripts")

Error:
TypeError Traceback (most recent call last)
Cell In[30], line 1
----> 1 combined_exp.write("C:\Users\nemill\pyGSTi\nathan_scripts")

File ~\pyGSTi\pygsti\extras\ibmq\ibmqcore.py:384, in IBMQExperiment.write(self, dirname)
382 for atr in _attribute_to_pickle:
383 with open(dirname + '/ibmqexperiment/{}.pkl'.format(atr), 'wb') as f:
--> 384 _pickle.dump(self[atr], f)

TypeError: cannot pickle '_thread.lock' object

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Request for a new feature or a change to an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants