Skip to content

str(GridQubit) too similar to str(tuple) #2405

@mpharrigan

Description

@mpharrigan

Was just waylaid in debugging an issue because I thought I was dealing with two-tuples but it was actually a GridQubit. Their str representation is indistinguishable. I suggest adding a subtle hint that it's different.

The closest analogy I can think of is the difference between a python list and a numpy array

In[3]: l = [1, 2, 3]
In[4]: print(l)
[1, 2, 3]
In[5]: print(np.asarray(l))
[1 2 3]

Metadata

Metadata

Assignees

Labels

area/circuitsarea/qubitsarea/visualizationkind/feature-requestDescribes new functionalityno QC knowledge neededWant to contribute to Cirq, but don't know quantum computing? This issue is for you.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