Skip to content

cirq.PauliStringPhasor returns wrong unitary #6612

Open
@pgoiporia

Description

@pgoiporia

Description of the issue
I am trying to check the unitary of acirq.PauliStringPhasor. I don't get what I expect.

How to reproduce the issue

import cirq

qubits = cirq.LineQubit.range(2)
phasor = cirq.PauliStringPhasor(cirq.Z(qubits[0]), qubits, exponent_neg=1)
circuit = cirq.Circuit(phasor)

print(circuit)
print(cirq.unitary(circuit))

image

The unitary this generates represents a Z⊗Z, not Z⊗I

Cirq version
1.4.0.dev20240403011731

Metadata

Metadata

Labels

kind/bug-reportSomething doesn't seem to work.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