-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Add Rust PropertySet
#12209
Comments
Imo the two fields with hard-defined types are |
I agree on that point, the ones I was more concerned about were passes like |
Oh yeah, I'm in favour of that too, assuming we're sticking with the idea of a Within |
For inherent parts of the IR (like the |
What should we add?
Right now the property set exists solely in Python space as a dict subclass that defaults to
None
on missing elements:https://github.com/Qiskit/qiskit/blob/stable/1.0/qiskit/passmanager/compilation_status.py#L20-L24
As part of the work in #12208 we will need a rust structure that enables us to share data between passes like the property set does in Python space. The ideal case would be if we just replaced the property set with a similar construct that was built in rust, but this might be difficult because a python dict is flexible with regards to typing and rust would enable us to do that by itself. One option might be to have a
enum
value type where one variant is aPyObject
, but then we have variants for all of the types we share between passes in rust space. Another alternative is that we define a custom struct that does a mapping with strict typing in rust space for known names (likelayout
, etc) and defaults to a pyobject for other field names.The text was updated successfully, but these errors were encountered: