Can't parse quil code with a call to a DEFCIRCUIT with no arguments
Open
Nobody has claimed this yet.
bug :bug:
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 358
- Avg merge
- 1d 58m
- Merged PRs (30d)
- 4
Description
This does not parse:
DEFCIRCUIT FOO:
NOP
FOO
But this is OK:
DEFCIRCUIT FOO a:
NOP
FOO 1
python -c 'from pyquil._parser.PyQuilListener import run_parser; run_parser("DEFCIRCUIT FOO:\n NOP\nFOO")'
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with pyquil._parser.PyQuilListener.py and the run_parser entry point, reproducing the provided no-argument DEFCIRCUIT example. Compare it with the argument-taking example and trace where the parser rejects FOO; done means the no-argument circuit parses successfully without breaking the existing case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- compilers, quantum-computing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100