Skip to content

repr(PauliString) on one qubit doesn't round-trip #2771

Closed
@mpharrigan

Description

@mpharrigan
In[23]: ps = cirq.Z(q0)*1
In[24]: repr(ps)
Out[24]: 'cirq.Z.on(cirq.LineQubit(0))'
In[26]: type(ps)
Out[26]: cirq.ops.pauli_string.PauliString
In[28]: type(eval(repr(ps)))
Out[28]: cirq.ops.pauli_string.SingleQubitPauliStringGateOperation

and it is no longer a PauliString

Metadata

Metadata

Assignees

Labels

area/pauliscomplexity/mediumintroduces/modifies 3-5 concepts, takes max up to a month for an advanced contributorkind/bug-reportSomething doesn't seem to work.skill-level/advancedOne or more of the areas need a solid understanding.triage/acceptedA consensus emerged that this bug report, feature request, or other action should be worked on

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions