qiskit-community / qiskit-metal

Quantum Hardware Design. Open-source project for engineers and scientists to design superconducting quantum devices with ease.
https://qiskit-community.github.io/qiskit-metal/
Apache License 2.0
283 stars 209 forks source link

Fix saving and loading of QDesign #911

Closed jagandecapri closed 1 year ago

jagandecapri commented 1 year ago

What are the issues this pull addresses (issue numbers / links)?

Fixes #910.

This is my suggested solution. Please kindly advise if there are other side effects that I have not considered or aware of. 🙂

Did you add tests to cover your changes (yes/no)?

Yes.

On another note, other test cases are passing in my local at least. However, I would appreciate if there is feedback on the possible other side-effects from the changes I am proposing.

Did you update the documentation accordingly (yes/no)?

No.

Did you read the CONTRIBUTING document (yes/no)?

Yes.

Summary

Currently, when saving a QDesign using the save_design method, throws an error saying ERROR WHILE SAVING: 'NoneType' object is not callable.

When the save_design error is fixed using suggestion solution (1), then another error appear when load_design. The error is RecursionError: maximum recursion depth exceeded.

The proposed changes in this PR is to fix the issues mentioned above.

Details and comments

priti-ashvin-shah-ibm commented 1 year ago

Some thoughts:

jagandecapri commented 1 year ago

As discussed in our Slack messages, I have used the QDesign.to_python_script() method for my use case to save the QDesign. I am closing this PR as discussed.