rigetti / rigetti/pyquil

Option to toggle off compiler simplifications

Open
#602 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement :sparkles:
Dominant language
Python
Stars
1.5k
Forks
358
Avg merge
1d 58m
Merged PRs (30d)
4

Description

Currently the compiler does several kinds of transformations, including mapping into a target gates set, routing onto a fixed qubit topology, and doing algebraic simplifications (e.g. X 0 \n X 0 is changed to an identity).

When doing things like benchmarking the chip, it can be useful to turn off the algebraic simplification. Otherwise, for example, all randomized benchmarking sequences will compile to an empty program.

A suggested interface could be to split the compiler to allow different passes in the flag, e.g.

backend.compile(pq, simplification=False)

Alternatively we could eventually expose different passes as different methods, e.g. backend.route(), backend.gate_transform, backend.simplify etc.

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 by tracing the backend.compile entry point and the compiler transformations described in the issue. Compare the proposed compile flag with separate pass methods, then verify that algebraic simplification can be disabled while gate mapping and topology routing still occur. Done means randomized benchmarking sequences no longer compile to an empty program solely because of simplification.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.