Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Compiling method and device of quantum program

A compiling method and program technology, applied in the field of quantum computing, which can solve problems such as the inability to handle the loop structure of quantum programs and the limited execution time of quantum programs.

Pending Publication Date: 2020-10-13
ORIGIN QUANTUM COMPUTING TECH (HEFEI) CO LTD
View PDF6 Cites 17 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] However, the current existing quantum processors have great limitations in executing waveform sequences to obtain execution results. The performance is: the execution time of quantum programs is very limited, and it is impossible to wait for user input after executing a few lines of quantum programs. Therefore, the current quantum processing The machine cannot handle the loop structure in the quantum program

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Compiling method and device of quantum program
  • Compiling method and device of quantum program
  • Compiling method and device of quantum program

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0044] The embodiments described below by referring to the figures are exemplary only for explaining the present invention and should not be construed as limiting the present invention.

[0045] It should be noted that the terms "first" and "second" in the description and claims of the present invention are used to distinguish similar objects, but not necessarily used to describe a specific order or sequence.

[0046] The following will describe it in detail by taking it running on a computer terminal as an example. figure 1 It is a computer terminal hardware structural block diagram of a quantum program compiling method provided by the embodiment of the present application. Such as figure 1 As shown, the computer terminal may include one or more ( figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. O...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a compiling method and device of a quantum program. The method comprises the steps: obtaining a source code of the quantum program, wherein the logic structure of the source code at least comprises a loop structure; performing lexical analysis on the source code to obtain a plurality of syntax unit tokens; performing grammatical analysis on the token, and constructing a syntax tree; performing semantic analysis on the source code based on the syntax tree, and determining types corresponding to source code variables, expressions and functions, wherein the types at leastcomprise auxiliary types and classic types; according to the types corresponding to the variables, the expressions and the functions, compiling the source codes into intermediate codes in a specific form, wherein logic structures of the intermediate codes do not include a loop structure. According to the invention, the problem that the type needs to be strictly distinguished at present can be solved from a user programming level.

Description

technical field [0001] The invention belongs to the technical field of quantum computing, in particular to a method and device for compiling a quantum program. Background technique [0002] A compiler is a computer program that translates computer code written in one programming language (source language) into another language (target language). A compiler is primarily used to convert source code from a high-level language to a low-level language (eg, assembly language, object code, or machine code) to create an executable program. [0003] Although there are different types of compilers, a compiler may perform some or all of the following operations: preprocessing, lexical analysis, parsing, semantic analysis (syntax-oriented translation), conversion of an input program into an intermediate representation, code optimization, and code generation, among others. Compilers implement these operations in stages to facilitate efficient design and correct translation of source cod...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F8/41G06N10/00
CPCG06F8/425G06F8/42G06F8/436G06F8/447G06N10/00
Inventor 方圆陈博颖
Owner ORIGIN QUANTUM COMPUTING TECH (HEFEI) CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products