Quantum compiler
AssigneeIonQ, Inc.
InventorsAndrew Maps Ducore, Omar Shehab, Matthew Joseph Keesan
Life of this patent
Estimating the term…
Abstract
Technologies are described herein to compile a Turing-complete quantum programming language program into a quantum circuit. The techniques described and recited herein include compiling TCQPL source code to generate a quantum circuit by generating a function object ensemble, generating an abstract syntax tree from received source code, and annotating nodes corresponding to the abstract syntax tree with corresponding function objects.
Claims18
A non-transitory computer-readable medium storing executable instructions that, upon execution, cause a digital computing processor to compile source code to generate a quantum circuit by performing functions comprising:
- generating a function object ensemble;
- generating an abstract syntax tree from received source code, the source code being written in a Turing complete quantum programming language;
- and
- annotating nodes corresponding to the abstract syntax tree with each respective function object from the function object ensemble.
A digital processor, comprising:
- a compiler to:
- load into memory function objects corresponding, respectively, to all potential nodes of a parse tree,
- receive source code, the source code being written in a Turing complete quantum programming language,
- generate a parse tree from the received source code, and
- annotate nodes of the generated parse tree with corresponding function objects loaded into the memory;
- and
- a runtime to execute the annotated nodes of the parse tree.
A compiling method, comprising:
- loading function objects into memory;
- receiving source code, the source code being written in a Turing complete quantum programming language;
- loading compiler plugins;
- generating a parse tree based on each statement included in the received source code;
- resolving each statement included in the received source code;
- hoisting the source code;
- and
- annotating the generated parse tree by binding respective function objects loaded into the memory to a corresponding node of the parse tree, in accordance with results of a type-check.
Dependencies are inferred from the claim text.