-
Notifications
You must be signed in to change notification settings - Fork 56
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
Gauge transformations on SPAM #378
Comments
Update: Found out that even providing a TP matrix for T (I used the identity) in the code above "ggEl = FullGaugeGroupElement(T) Still evaluates isinstance(s, _gaugegroup.TPSpamGaugeGroupElement) as False. |
Hi @juangmendoza19, thanks for the bug report and sorry for the slow response. I have added the same warning that checks for Unitary/TP gauge groups in A few other comments though: In general, non-TP gauge transformations are allowed (in that we don't check whether gauge transformations are TP or not, we just call
and the resulting model did have the SPAM modified. This leads me to believe that you were testing a model that was not "full" parameterized, but maybe "CPTPLND"? Or perhaps just the SPAM was "CPTPLND"? In that case, a non-TP gauge transformation would have been performed on the gates, but not on the SPAM due to the if statement you mention in the issue. (But if your ops were also CPTPLND, then they should have hit the else branch in Finally, with regards to your followup comment: I think this is intended behavior. Even though T is TP in your case, you created a FullGaugeGroupElement with it. That object does not automatically test for TP-ness, so you still fail the if statement. |
Describe the bug
When using the transform_inplace(s) method for models, I obtained a new model where only the logical operations were gauge transformed, but not the SPAM operators.
To Reproduce
Steps to reproduce the behavior:
Create your favorite non-TP gauge transformation, "T"
import your favorite model from the modelpacks, "model"
ggEl = FullGaugeGroupElement(T)
model.transform_inplace(ggEl)
Expected behavior
Either a warning message should be displayed telling the user that non-TP gauge transformations are not allowed, or the SPAM should also be transformed.
Additional context
Currently we have one if statement in modelmembers/operations/experrorgenop.py in ExpErrorgenOp.spam_transform_inplace()
"
if isinstance(s, _gaugegroup.UnitaryGaugeGroupElement)
or isinstance(s, _gaugegroup.TPSpamGaugeGroupElement):
"
which is False for non-TP matrices. Thus nothing gets done to the SPAM in this case.
I believe this condition is not tested for gates. See modelmember/operations/composedop.py ComposedOp.transform_inplace()
The text was updated successfully, but these errors were encountered: