Quantum Compiler Function Object Ensemble AST Annotation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Programming for quantum computers is inefficient and cost-ineffective due to the lack of effective methods to leverage their computational strengths, particularly in compiling source code into quantum circuits that can be executed efficiently on these systems.

Innovation Solution

A compiler is developed that generates a function object ensemble, creates an abstract syntax tree from source code, and annotates nodes with corresponding function objects, enabling the compilation of source code into quantum circuits that can be executed on quantum computers, facilitating the generation of quantum circuit descriptions for practical quantum computers.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If traditional compilation methods are used for quantum computers, then the compilation process is simple, but the execution efficiency and cost-effectiveness of quantum programs are poor

Engineering Contradiction:
Improveexecution efficiency of quantum programsVSAvoidcompilation system complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The compilation process is segmented into distinct phases: parsing source code into an abstract syntax tree, annotating AST nodes with function objects, generating quantum circuit descriptions, and executing on quantum computers. This segmentation allows each phase to be optimized independently, improving overall execution efficiency while managing complexity through modular design.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

Function objects are pre-compiled and stored in a database before actual quantum program execution. The compiler annotates AST nodes with these pre-compiled function objects during the compilation phase, so that during runtime, the quantum computer can directly execute the referenced functions without additional compilation overhead, significantly improving execution efficiency.

Inventive Principle:
Principle #10Preliminary action

2Adaptability or versatility

If quantum circuits are compiled without function object annotation, then the compilation process is fast, but the quantum programs cannot effectively leverage quantum computational strengths

Engineering Contradiction:
Improveability to leverage quantum computational strengthsVSAvoidcompilation time
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

Function objects representing quantum operations are pre-compiled and stored in a database during the preliminary phase. When compiling quantum programs, the compiler quickly references these pre-compiled function objects by identifier rather than compiling quantum operations from scratch, reducing compilation time while ensuring proper quantum computational strengths are leveraged through the annotated function objects.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

Instead of compiling quantum operations directly from source code each time, the system creates copies of pre-compiled function objects and attaches them to AST nodes. These function object copies contain the compiled quantum operation data, allowing rapid compilation while maintaining the ability to execute efficient quantum operations that leverage quantum computational strengths.

Inventive Principle:
Principle #26Copying

3Productivity

If detailed function objects are annotated to each AST node, then quantum circuit execution efficiency is improved, but memory consumption increases

Engineering Contradiction:
Improvequantum circuit execution efficiencyVSAvoidmemory consumption
Core Design Contradiction:
ProductivityVSQuantity of substance

Solution Approach 1:

The system attaches copies of function object identifiers to AST nodes rather than storing complete function object data at each node. The actual function objects are stored once in a database, and multiple AST nodes reference the same function object copies by identifier, reducing memory consumption while maintaining execution efficiency through the annotated references.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

Function objects are designed to be universal and reusable across multiple AST nodes. A single function object can be referenced by multiple nodes in the quantum program, and the system manages shared references efficiently. This universality allows detailed function objects to be stored once and reused multiple times, improving execution efficiency without proportionally increasing memory consumption.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS10908885B2Quantum compiler
Publication Date: 2021.02.02 IONQ INC
  • US10908885B2 patent drawing
  • US10908885B2 patent drawing
  • US10908885B2 patent drawing

AI summary

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.