-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Reject multiplication of cirq.PauliSum
inside in cirq.PauliString
#5010
Conversation
cirq.PauliSum
inside of cirq.PauliString
cirq.PauliSum
inside of cirq.PauliString
cirq.PauliSum
inside in cirq.PauliString
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.
Looks good. Feel free to merge after the imports are moved to the top.
cirq-core/cirq/ops/pauli_string.py
Outdated
@@ -1237,6 +1237,7 @@ def _imul_helper(self, other: 'cirq.PAULI_STRING_LIKE', sign: int): | |||
Returns: | |||
self on success, NotImplemented given an unknown type of value. | |||
""" | |||
from cirq.ops.linear_combinations import PauliSum |
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.
Nit: can we move this to a module level import at the top ? (even if it means wrapping in LazyLoader)
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.
Totally forgot about LazyLoader
. Thank you. Done.
Fixes: #5009