Skip to content
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

WIP: QASM3 Compilation #272

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from
Open

WIP: QASM3 Compilation #272

wants to merge 11 commits into from

Conversation

gribeill
Copy link
Contributor

@gribeill gribeill commented Dec 15, 2020

Rather than develop our own full-stack quantum circuit compiler and optimizer, we can use the relatively widely used QASM language to interface with other toolkits like QisKit and Cirq. The 3.0 release of QASM is a good match to QGL's capabilities for mixed classical/quantum control. It should be possible to compile many QASM3 programs into QGL sequences (up to what the sequencer supports).

A rough roadmap:

  • QASM3 lexer for tokenization
  • Parse tokens into CST
  • Various transformations to go from CST -> AST
  • Gate translation (from QASM U representation into concrete pulse library)
  • Realtime function mapping (QASM bit to sequencer VRAM) and control flow
  • Tests tests tests!

Some open questions:

  • Should we optimize gates at this level? We can re-use some of the RandomCircuits.jl infrastructure for compressing single qubit gates and decomposing 2-qubit gates.
  • How best to deal with subroutines and loops? Should we do some amount of inlining/unrolling?
  • How to deal with classical instructions that aren't implemented (should we implement some of these?)

@coveralls
Copy link

coveralls commented Dec 15, 2020

Coverage Status

Coverage decreased (-0.3%) to 59.608% when pulling 9b193ae on feature/qasm3 into 12315bb on develop.

@matthewware matthewware marked this pull request as ready for review July 1, 2021 16:59
@matthewware
Copy link
Collaborator

Rebase so we can get the nice GitHub CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants