Skip to content

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.

5 participants