str(GridQubit) too similar to str(tuple)
See original GitHub issueWas 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]
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (3 by maintainers)
Top Results From Across the Web
converting string to tuple - python
This approach takes not modules at all. But it's not very robust (if the input string will have some inconsistency, e.g. space between ......
Read more >Python | Convert String to Tuple
Method #1 : Using map() + int + split() + tuple(). This method can be used to solve this particular task. In this,...
Read more >3 Ways to Convert List to Tuple in Python
Learn how to convert python list to tuple in 3 different ways. ... a tuple with a single element, it will be similar...
Read more >How to Convert Python Tuples To String | join() - YouTube
How to Convert Python Tuples To String | join() | map() | reduce() | Python BasicsTopics to be covered :How to convert Python...
Read more >Python Tuples Tutorial: Create & Use ...
C : <class 'str'> 0 : <class 'int'> 0 : <class 'int'> K : <class 'str'> I : <class 'str'> E ... As...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Qubits could have their own version of
_circuit_diagram_info_
so the diagram isn’t dependent on the string representation. This would allow a more clearstr(q)
without changing diagrams.cirq.q
added in #5181