qiskit-community / qiskit-dynamics

Tools for building and solving models of quantum systems in Qiskit
https://qiskit-community.github.io/qiskit-dynamics/
Apache License 2.0
106 stars 60 forks source link

pulse backend string model parser #71

Closed DanPuzzuoli closed 2 years ago

DanPuzzuoli commented 2 years ago

Summary

Closes #53.

Bring string model parser from Aer into dynamics. Currently a work in progress as I attempt to reduce the original number of files and lines of code involved.

Details and comments

DanPuzzuoli commented 2 years ago

This PR is ready for review. I think it adds the "smallest usable unit" that makes sense for parsing the pulse backend model strings.

All non-test files added are in qiskit_dynamics/pulse/string_model_parser. The main function, and probably the only one that should be used, is string_model_parser.parse_hamiltonian_dict, which takes in the backend hamiltonian dictionary, and returns:

In subsequent developments, the operators can be used to construct a model or solver in dynamics, and the list of channels will be used in the schedule -> signal conversion routine put the output signals in the right order.

Some notes:

DanPuzzuoli commented 2 years ago

Not sure why I can't reply to the one comment about adding the output to one of the examples in the docs.

I'm kind of on the fence about this - two of the outputs of the function consist of arrays and so showing them isn't necessarily too informative. Given that this function is primarily for internal use anyway I'm leaning towards not adding this.

brosand commented 2 years ago

Not sure why I can't reply to the one comment about adding the output to one of the examples in the docs.

I'm kind of on the fence about this - two of the outputs of the function consist of arrays and so showing them isn't necessarily too informative. Given that this function is primarily for internal use anyway I'm leaning towards not adding this.

Not sure why I can't reply to this one either haha, but this makes sense,

DanPuzzuoli commented 2 years ago

@chriseclectic I think I've addressed most comments with the latest changes. The remaining things to discuss are:

DanPuzzuoli commented 2 years ago

Closing this PR as it is extremely out of date - will reopen a new one.