-
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
repr(PauliString) on one qubit doesn't round-trip #2771
Comments
|
If you try to include a single-qubit pauli string as part of an object for the |
Should |
AFAIK Python types by themselves aren't expected to be round-trippable. |
|
Is this still an issue? |
the behavior has not changed (I just ran the snippet provided) |
- The repr of pauli strings with coefficient of one used to truncate the one. - This is prettier but does not actually repr to the same thing, ie. type(eval('cirq.Z.on(cirq.LineQubit(0))') != type(eval('1*cirq.Z.on(cirq.LineQubit(0))') Fixes: quantumlib#2771
* Update repr of pauli strings - The repr of pauli strings with coefficient of one used to truncate the one. - This is prettier but does not actually repr to the same thing, ie. type(eval('cirq.Z.on(cirq.LineQubit(0))') != type(eval('1*cirq.Z.on(cirq.LineQubit(0))') Fixes: #2771
* Update repr of pauli strings - The repr of pauli strings with coefficient of one used to truncate the one. - This is prettier but does not actually repr to the same thing, ie. type(eval('cirq.Z.on(cirq.LineQubit(0))') != type(eval('1*cirq.Z.on(cirq.LineQubit(0))') Fixes: quantumlib#2771
* Update repr of pauli strings - The repr of pauli strings with coefficient of one used to truncate the one. - This is prettier but does not actually repr to the same thing, ie. type(eval('cirq.Z.on(cirq.LineQubit(0))') != type(eval('1*cirq.Z.on(cirq.LineQubit(0))') Fixes: quantumlib#2771
and it is no longer a PauliString
The text was updated successfully, but these errors were encountered: