Skip to content

Gate tagged with cirq.google.PhysicalZTag does not serialize #3897

Closed
@jarthurgross

Description

Description of the issue

Cannot serialize a gate with the cirq.google.PhysicalZTag

How to reproduce the issue

>>> import cirq
>>> q = cirq.LineQubit(0)
>>> physical_gate = cirq.Z(q).with_tags(cirq.google.PhysicalZTag)
>>> physical_gate
cirq.TaggedOperation(cirq.Z(cirq.LineQubit(0)), <class 'cirq.google.ops.physical_z_tag.PhysicalZTag'>)
>>> cirq.to_json(physical_gate)
Traceback (most recent call last):
...
TypeError: _json_dict_() missing 1 required positional argument: 'self'

Cirq version

0.10.0

Metadata

Assignees

Labels

area/tagskind/bug-reportSomething doesn't seem to work.status/needs-agreed-designWe want to do this, but it needs an agreed upon design before implementationtriage/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