Ambiguity with character code for mu in microsecond #422
Labels
bug
clarify specification
Change text of spec, not (mainly) semantics of spec
Reference Parser
ANLTR-based Python reference parser
OpenQASM version:
bcd5348
Python version:
3.10.5
Operating system:
fedora
What is the current behavior?
The lexer recognizes
chr(181) + 's'
as aTimeUnit
representing microsecond.The lexer does not recognize
chr(956) + 's'
as anyTimeUnit
.However, backslash + mu [TAB] in ipython produces
chr(956)
. (The same in Julia).The qss parser also uses
chr(956)
in theTimeUnit
for microsecond.Steps to reproduce the problem
Try to parse first
1µs
, then1μs
. The first works, the second throws an error.(Also, paste this into ipython or Jupyter:
'µ' == 'μ'
.)What is the expected behavior?
That's a good question.
Suggested solutions (Optional)
Perhaps allow both characters to represent the character mu in microsecond.
The text was updated successfully, but these errors were encountered: