Option to toggle off compiler simplifications
Nobody has claimed this yet.
- 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
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 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