Skip to content

PauliString repr does not preserve qubit order. #5564

Closed
@dabacon

Description

@dabacon

Description of the issue

If you create a PauliString

p = cirq.PauliString({q2: cirq.Z, q1: cirq.Y, q0: cirq.X})

and round trip it via its repr, the qubit order does not match.

eval(repr(p)).qubits == p.qubits
>>> False

PauliString having ordered qubits was introduced in #4270

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions