-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Pauli expansion protocol #1390
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
Pauli expansion protocol #1390
Conversation
cirq/linalg/operator_spaces.py
Outdated
} | ||
|
||
|
||
def reconstruct_from_expansion(expansion: Dict[str, complex], |
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.
This name is not clear out of context. Perhaps matrix_from_basis_coefficients
?
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.
Done. BTW: Do you think we should expose these names directly under cirq.
package? They're currently under cirq.linalg.
.
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.
I consider linalg to be one of the "flattened packages", so it should be exposed globally.
This is ready for re-review. Coverage fails because protocol consistency checks have been disabled for parametrized code. They should pass once #1399 is merged here. |
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.
LGTM! Expose the methods to the global namespace (and get them from cirq.
in tests as an
8000
assertion of that) then merge it.
|
Logic for expanding an operator in the Pauli basis extracted from #1299 into a protocol.