You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Okay, I now see that I should have set flatten_structure if I wanted effects to be changed. So this isn't necessarily a bug. Can anyone think of a reason why we'd be okay with ComposedPOVMEffects inside a TPPOVM?
Here's a minimal example, per @coreyostrove's request in chat:
frompygsti.modelpacksimportsmq1Q_XYImodel=smq1Q_XYI.target_model()
model.convert_members_inplace('full TP') # no errormodel.convert_members_inplace('CPTPLND') # no errormodel.convert_members_inplace('full TP') # error
The specific error is
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/rjmurr/Documents/pygsti-general/pyGSTi/pygsti/models/explicitmodel.py", line 359, in convert_members_inplace
self._clean_paramvec() # param indices were probabaly updated
File "/Users/rjmurr/Documents/pygsti-general/pyGSTi/pygsti/models/model.py", line 754, in _clean_paramvec
self._rebuild_paramvec()
File "/Users/rjmurr/Documents/pygsti-general/pyGSTi/pygsti/models/model.py", line 1091, in _rebuild_paramvec
w[obj.gpindices] = obj.to_vector()
File "/Users/rjmurr/Documents/pygsti-general/pyGSTi/pygsti/modelmembers/povms/tppovm.py", line 98, in to_vector
assert isinstance(effect, _FullPOVMEffect)
AssertionError
I have a CPTP model, and I want to convert spam members in-place to only be TP. The following codepath gets hit in that conversion.
pyGSTi/pygsti/modelmembers/povms/__init__.py
Lines 579 to 582 in 962216e
I don't know if the code's current behavior is intended, but it doesn't return an effect that can be fed into a TPPOVM class.
Comments, @coreyostrove and @sserita?
The text was updated successfully, but these errors were encountered: