Description
Right now in cirq and all modules in the main cirq repo, the cirq_type
field used in json serialization is the unqualified object name. This has not caused any naming collisions yet.
I had always imagined that different packages would have a namespaced cirq_type. For example: cirq_google.PhysicalZTag
or cirq.google.PhysicalZTag
instead of PhysicalZTag
.
In fact, cirq.obj_to_dict_helper
has an optional namespace
argument. I tried to use this for a new cirq_google
object, but the testing procedure uses the unqualified object name to assert that a data file should exist.
While playing around with #4375 I think it would be more robust to decouple the "object generation" from any semantic meaning. Instead, we generate all the example objects and keep track of the types we've successfully round-tripped. Afterwards we can check if there are public objects that weren't round-tripped.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status