rigetti / rigetti/pyquil

Can't parse quil code with a call to a DEFCIRCUIT with no arguments

Open
#294 8 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.