-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
B as alias is not parsed #56
Comments
@quantumkoen And A, C without the B works? I think it's because of the precedence of b being parsed as a special token for bit identifiers. |
@kel85uk hard to say what works exactly and what doesn't, as I'm not getting any line numbers with the syntax errors, but I suspect it's the B indeed because of the b[..] syntax. |
Yeap, tested using the new develop branch with the line reporting. It does say line 12, which is where b is located. Consider the code:
|
Question is, should b be supported as a string and not a special keyword, then if so, q would be open for such interpretation too. @quantumkoen @Nader-Khammassi @imranashraf @andreasppg |
Closing due to no response, and the way I interpret it is that b and q should be a special keyword for cQASM the same way as special registers (e.g. ax) are reserved for classical assembly. |
Given that it is trivial to distinguish between the use of b as a signifier for adressing bits vs using it as an alias, and given that the cqasm 1.0 syntax nowhere says b cannot be used as an alias, I think it should be supported by the parser. |
True, reopening this. |
This has been supported since #105, though due to a bug I stumbled on and fixed in #115 I think that particular mapping has only worked since then. Note that you wouldn't be able to refer to the measurement bits associated with the qubits once you redefine |
This code from the qx simulator test suite is not parsed:
Reports:
The text was updated successfully, but these errors were encountered: