-
Notifications
You must be signed in to change notification settings - Fork 57
Ensure Consistency of Global Parameter Indices. #612
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
base: develop
Are you sure you want to change the base?
Ensure Consistency of Global Parameter Indices. #612
Conversation
…to from_vector will result in an unpassable param vec.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this fix, and for writing the tests!
I have two requests.
- Please make the tests instance methods of a new class, TestRebuildParamvec, that subclasses unittest.TestCase.
- Please update the PR opening comment to explain the purpose of the PR. You, me, and the other pyGSTi devs will know the purpose for the near future, but we'll inevitably forget.
I'll note that a search through the pyGSTi codebase shows that ModelMember.shift_gpindices is called only in two places: once recursively in shift_gpindices itself, and once in OpModel._rebuild_paramvec. The latter wasn't passing in any value for the "memo" argument in ModelMember.shift_gpindices.
We'll also need to track down what is going on with the failing unit tests. These look substantive, so there may be some unexpected consequences being caught. Do these fail locally on your system? |
…y of the parameter vector and not a view of the parameter vector.
Add in a number of patches/workarounds related to parameter-integrity checks when using interposers.
Add a debug option to print out diagnostics for _clean_paramvec
The global parameter indices recorded by a layer with only one non-idle gate should be the same as those recorded by the gate itself.
Whenever a new parameterized object is added to a model, there is a possibility that we need to shift the global parameter indices stored by each object within the model.
A call to
shift_gpindices
will now track which changes have already been made.