[go: up one dir, main page]

CN115409194B - Quantum program generation system and quantum computer operation system - Google Patents

Quantum program generation system and quantum computer operation system Download PDF

Info

Publication number
CN115409194B
CN115409194B CN202110590259.6A CN202110590259A CN115409194B CN 115409194 B CN115409194 B CN 115409194B CN 202110590259 A CN202110590259 A CN 202110590259A CN 115409194 B CN115409194 B CN 115409194B
Authority
CN
China
Prior art keywords
target
quantum
code
development environment
quantum program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110590259.6A
Other languages
Chinese (zh)
Other versions
CN115409194A (en
Inventor
高宁
王奥博
方圆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Benyuan Quantum Computing Technology Hefei Co ltd
Original Assignee
Benyuan Quantum Computing Technology Hefei Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Benyuan Quantum Computing Technology Hefei Co ltd filed Critical Benyuan Quantum Computing Technology Hefei Co ltd
Priority to CN202110590259.6A priority Critical patent/CN115409194B/en
Publication of CN115409194A publication Critical patent/CN115409194A/en
Application granted granted Critical
Publication of CN115409194B publication Critical patent/CN115409194B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N10/00Quantum computing, i.e. information processing based on quantum-mechanical phenomena
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • G06F8/22Procedural
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/315Object-oriented languages
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Computational Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Condensed Matter Physics & Semiconductors (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a quantum program generating system and a quantum computer operating system, which are characterized in that in the editing space of a container, and generating a target development environment based on a development environment template acquired in the cloud, calling a code compiling plug-in the target development environment, and converting the target code into a target quantum program. Based on cloud storage development environment, the user can directly acquire the development environment without building the development environment, the user editing space is provided based on the container, the user does not need to locally perform program development, the user can pull the development environment stored in the cloud to perform quantum program editing based on the editing space in the container, the complicated environment building operation is avoided, the development environment stored in the cloud can be directly upgraded, the user can download the development environment of the corresponding version based on the actual requirement, the multiplexing rate of the development environment is improved, and therefore the development efficiency of the quantum program is improved.

Description

Quantum program generation system and quantum computer operation system
Technical Field
The invention belongs to the technical field of quantum computing, and particularly relates to a quantum program generation system and a quantum computer operation system.
Background
The quantum computer is a kind of physical device which performs high-speed mathematical and logical operation, stores and processes quantum information according to the law of quantum mechanics. When a device processes and calculates quantum information and operates on a quantum algorithm, the device is a quantum computer. Quantum computers are a key technology under investigation because of their ability to handle mathematical problems more efficiently than ordinary computers, for example, to accelerate the time to crack RSA keys from hundreds of years to hours.
At present, a developer needs to locally install a plurality of matched plug-ins before developing a quantum program, and then builds a development environment based on the installed plurality of matched plug-ins, so that the environment building operation is complicated, the development environment needs to be built before each development program, the multiplexing rate is low, and the development efficiency of the quantum program is low.
Disclosure of Invention
The invention aims to provide a quantum program generation system and a quantum computer operation system, and aims to solve the technical problems of low development efficiency of a quantum program caused by complex environment construction operation and low development environment multiplexing rate.
One embodiment of the present application provides a quantum program generation system, including:
the client is used for responding to the user operation, generating a code editing instruction based on the user editing operation and sending the code editing instruction to the server;
the cloud center is used for generating and starting a dock container, and the container comprises a development environment of a quantum program;
And the server is used for determining an editing space in the container based on the code editing instruction and converting the target code into a target quantum program capable of running on a quantum computer based on a code compiling plug-in the development environment in the editing space.
Optionally, the code compiling plug-in includes a quantum language compiling plug-in and a host language compiling plug-in, and the server is specifically configured to:
determining a target host language corresponding to the target code according to a first part of codes containing language type identifiers in the target code;
Invoking the quantum language compiling plugin to convert a second part of codes in the target codes from a quantum language to the target host language;
And calling the host language compiling plug-in to convert codes corresponding to the target host language into the target quantum program, wherein the codes corresponding to the target host language comprise converted second partial codes and third partial codes written by the target host language in the target codes.
Optionally, the host language compiling plugin includes a first preset plugin and a second preset plugin, and the server is specifically configured to:
When the target host language is C++, calling the first preset plug-in, and converting codes corresponding to the C++ into the target quantum program;
and when the target host language is python, calling the second preset plug-in, and converting codes corresponding to the python into the target quantum program.
Optionally, the quantum program generating system further includes:
The code detection module is used for detecting the code of the target code, and generating and returning a corresponding detection result reminding message to the client.
Optionally, the quantum program generating system further includes:
And the code warehouse updating module is used for storing the target codes and the target quantum programs corresponding to the target codes in a code warehouse in an associated manner, and finishing updating of the code warehouse.
Optionally, the server is specifically configured to:
When the code editing instruction is received, acquiring user identity information of a current user, and carrying out identity verification on the current user according to the user identity information;
Generating a reminding message without development permission when the current user fails the identity verification;
and when the current user passes the identity verification, determining an editing space in the container, and converting the target code into a target quantum program capable of running on a quantum computer based on a code compiling plug-in the development environment in the editing space.
Optionally, the quantum program generating system further includes:
And the quantum computer is used for receiving and operating the target quantum program sent by the server and returning the operation result of the target quantum program to the server.
Yet another embodiment of the present application provides a quantum computer operating system that realizes generation of a quantum program according to the generation system of a quantum program described in the above embodiment.
Compared with the prior art, the quantum program generating system provided by the invention has the advantages that when a code editing instruction is received, the dock container is started, an editing space is determined in the container, and a development environment template is acquired in the cloud; generating a target development environment based on the development environment template in the editing space so as to enable a current user to edit the quantum program; and when receiving the target code input by the current user, calling a code compiling plug-in the target development environment to convert the target code into a target quantum program capable of running on a quantum computer. Through the mode, the cloud storage development environment is convenient for a user to directly acquire the development environment without building the user, the user editing space is provided based on the dock container, the user does not need to locally develop programs, the user can pull the development environment stored in the cloud to carry out quantum program editing based on the editing space in the dock container, complicated environment building operation is avoided, the development environment stored in the cloud can be directly upgraded, the user can download the development environment of a corresponding version based on actual requirements, the multiplexing rate of the development environment is improved, and therefore the development efficiency of the quantum program is improved.
Drawings
Fig. 1 is a hardware block diagram of a computer terminal of a quantum program generating system according to an embodiment of the present invention;
Fig. 2 is a schematic structural diagram of a quantum program generating system according to an embodiment of the present invention.
Detailed Description
The embodiments described below by referring to the drawings are illustrative only and are not to be construed as limiting the invention.
The embodiment of the invention firstly provides a method for generating a quantum program, which comprises the following steps:
When a code editing instruction is received, starting a dock container, determining an editing space in the container, and acquiring a development environment template in a cloud;
Generating a target development environment based on the development environment template in the editing space so as to enable a current user to edit the quantum program;
And when receiving the target code input by the current user, calling a code compiling plug-in the target development environment to convert the target code into a target quantum program capable of running on a quantum computer.
Further, the code compiling plug-in includes a quantum language compiling plug-in and a host language compiling plug-in, and the step of calling the code compiling plug-in the target development environment to convert the target code into a target quantum program executable on a quantum computer includes:
determining a target host language corresponding to the target code according to a first part of codes containing language type identifiers in the target code;
Invoking the quantum language compiling plugin to convert a second part of codes in the target codes from a quantum language to the target host language;
And calling the host language compiling plug-in to convert codes corresponding to the target host language into the target quantum program, wherein the codes corresponding to the target host language comprise converted second partial codes and third partial codes written by the target host language in the target codes.
Further, the host language compiling plug-in includes a first preset plug-in and a second preset plug-in, and the step of calling the host language compiling plug-in to convert the code corresponding to the target host language into the target quantum program includes:
When the target host language is C++, calling the first preset plug-in, and converting codes corresponding to the C++ into the target quantum program;
and when the target host language is python, calling the second preset plug-in, and converting codes corresponding to the python into the target quantum program.
Further, after the step of receiving the target code input by the current user, the method further includes:
Calling a code detection plug-in to detect the code of the target code;
And generating and returning a corresponding detection result reminding message.
Further, the method further comprises:
And storing the target codes and the target quantum programs corresponding to the target codes in a code warehouse in an associated manner, and finishing updating of the code warehouse.
Further, when receiving the code editing instruction, determining an editing space in the container, and before the step of acquiring the development environment template from the pre-stored data, the method further includes:
acquiring user identity information of the current user, and carrying out identity verification on the current user according to the user identity information;
when the current user passes the identity verification, a corresponding code editing instruction is generated;
and generating a reminding message without development permission when the current user fails the identity verification.
Further, the method further comprises:
and receiving an operation result of the target quantum program returned by the quantum computer.
The method can be applied to electronic equipment such as computer terminals, in particular to common computers, quantum computers and the like.
The following describes the operation of the computer terminal in detail by taking it as an example. Fig. 1 is a hardware block diagram of a computer terminal of a quantum program generating system according to an embodiment of the present invention. As shown in fig. 1, the computer terminal may include one or more (only one is shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a microprocessor MCU or a processing device such as a programmable logic device FPGA) and a memory 104 for storing a quantum program-based generation method, and optionally, a transmission device 106 for a communication function and an input-output device 108. It will be appreciated by those skilled in the art that the configuration shown in fig. 1 is merely illustrative and is not intended to limit the configuration of the computer terminal described above. For example, the computer terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store software programs and modules of application software, such as program instructions/modules corresponding to a quantum program generation system in the embodiments of the present application, and the processor 102 executes the software programs and modules stored in the memory 104 to perform various functional applications and data processing, that is, implement the above-described methods. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located relative to the processor 102, which may be connected to the computer terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission means 106 is arranged to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of a computer terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module for communicating with the internet wirelessly.
It should be noted that a real quantum computer is a hybrid structure, which includes two major parts: part of the computers are classical computers and are responsible for performing classical computation and control; the other part is quantum equipment, which is responsible for running quantum programs so as to realize quantum computation. The quantum program is a series of instruction sequences written in a quantum language such as QRunes language and capable of running on a quantum computer, so that the support of quantum logic gate operation is realized, and finally, quantum computing is realized. Specifically, the quantum program is a series of instruction sequences for operating the quantum logic gate according to a certain time sequence.
In practical applications, quantum computing simulations are often required to verify quantum algorithms, quantum applications, etc., due to the development of quantum device hardware. Quantum computing simulation is a process of realizing simulated operation of a quantum program corresponding to a specific problem by means of a virtual architecture (namely a quantum virtual machine) built by resources of a common computer. In general, it is necessary to construct a quantum program corresponding to a specific problem. The quantum program, namely the program for representing the quantum bit and the evolution thereof written in the classical language, wherein the quantum bit, the quantum logic gate and the like related to quantum computation are all represented by corresponding classical codes.
Quantum circuits, which are one embodiment of quantum programs and weigh sub-logic circuits as well, are the most commonly used general quantum computing models, representing circuits that operate on qubits under an abstract concept, and their composition includes qubits, circuits (timelines), and various quantum logic gates, and finally the result often needs to be read out through quantum measurement operations.
Unlike conventional circuits, which are connected by metal lines to carry voltage or current signals, in a quantum circuit, the circuit can be seen as being connected by time, i.e., the state of the qubit naturally evolves over time, as indicated by the hamiltonian operator, during which it is operated until a logic gate is encountered.
One quantum program is corresponding to one total quantum circuit, and the quantum program refers to the total quantum circuit, wherein the total number of quantum bits in the total quantum circuit is the same as the total number of quantum bits of the quantum program. It can be understood that: one quantum program may consist of a quantum circuit, a measurement operation for the quantum bits in the quantum circuit, a register to hold the measurement results, and a control flow node (jump instruction), and one quantum circuit may contain several tens to hundreds or even thousands of quantum logic gate operations. The execution process of the quantum program is a process of executing all quantum logic gates according to a certain time sequence. Note that the timing is the time sequence in which a single quantum logic gate is executed.
It should be noted that in classical computation, the most basic unit is a bit, and the most basic control mode is a logic gate, and the purpose of the control circuit can be achieved by a combination of logic gates. Similarly, the way in which the qubits are handled is a quantum logic gate. Quantum logic gates are used, which are the basis for forming quantum circuits, and include single-bit quantum logic gates, such as Hadamard gates (H gates, ada Ma Men), bery-X gates (X gates), bery-Y gates (Y gates), bery-Z gates (Z gates), RX gates, RY gates, RZ gates, and the like; multi-bit quantum logic gates such as CNOT gates, CR gates, iSWAP gates, toffoli gates, and the like. Quantum logic gates are typically represented using unitary matrices, which are not only in matrix form, but also an operation and transformation. The general function of a quantum logic gate on a quantum state is to calculate through a unitary matrix multiplied by a matrix corresponding to the right vector of the quantum state.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a quantum program generating system according to an embodiment of the present invention.
Yet another embodiment of the present invention provides a quantum program generation system including:
The client 10 is used for responding to the user operation, generating a code editing instruction based on the user editing operation and sending the code editing instruction to the server;
A server 20 for determining an edit space in the container based on the code editing instructions, and converting the target code into a target quantum program executable on a quantum computer based on a code compiling plug-in the development environment in the edit space;
Cloud center 30 for generating and launching a dock container, which contains the development environment for the quantum program.
In this embodiment, the generating system specifically includes a Cloud editor Cloud ide and a Cloud center (i.e., cloud end), where the Cloud ide is stored in a dock container, and the dock container is stored in the Cloud end.
The cloud end (i.e. cloud center) 30 is configured to store a development environment of the quantum program and start a dock container;
Cloud editor Cloud is implemented based on ECLIPSE THEIA, ECLIPSE THEIA is web that implements an editor interface based on Moncao editor. The Cloud editor Cloud is an integrated quantum program development tool built based on nodejs, not only integrates a quantum development environment, but also can run on a browser, and can be used for a developer to develop a quantum program in the browser. Front and back ends of the Cloud editor Cloud are taken typescript as development languages, and development and debugging of quantum programs in different languages are realized depending on language Server Protocol and Debug Adapter Protocol.
The Cloud editor Cloud comprises a Client10 and a Server20;
Client10 is a web Client of a web page, i.e., a code editor page displayed in a browser, and is a user interaction end, and a user can input written codes, debug codes, or input other instructions based on Client 10. When detecting a user operation, the Client10 responds to a user instruction corresponding to the user operation, generates a corresponding code editing instruction and sends the code editing instruction to the server 20;
The server 20 is configured to determine an edit space in the container based on the code editing instructions, and convert the target code into a target quantum program executable on a quantum computer based on code compilation plug-ins in the development environment in the edit space.
Specifically, the client 10 detects a user operation in real time and generates a corresponding user instruction including a code editing instruction or other program debugging instruction, etc., and then transmits the code editing instruction or other program debugging instruction to the server 20.
The server 20, upon receiving a code editing instruction sent by the client in response to a user instruction, sends an editing space acquisition request to the cloud center 30.
When receiving the edit space acquisition request, the cloud center 30 starts a dock container, determines an edit space corresponding to the current user in the dock container, and feeds back space address information of the edit space to the server 20.
After determining the editing space corresponding to the current user, the server 20 pulls the built development environment template from the cloud center 30 and stores the template in the editing space.
In a specific embodiment, the server 20 may correspondingly modify the development environment template based on the editing instruction triggered by the current user, so as to generate a target development environment required by the current user, so that the current user edits a quantum program, such as quantum program code writing, debugging, compiling, and the like, based on the target development environment. The target development environment is a real running environment for editing the quantum program codes, a code compiling plug-in for compiling is integrated in the target development environment, and the current user can compile the quantum program based on the code compiling plug-in the target development environment.
Since the object code in the current language (e.g., qrunes) cannot be run directly on the quantum computer, the server 20, upon receiving the object code uploaded by the current user, needs to invoke a code compilation plug-in (e.g., quartor plug-in) in the target development environment to compile the object code to convert the object code into a target quantum program that can be run on the quantum computer.
By the method, the development environment template is deployed at the cloud end, the subsequent development environment is upgraded, the upgrading of the development environment template can be completed at the cloud end, and a plurality of versions of development environment templates are provided for users to download according to actual needs, so that the development environment building flow of the users is saved.
Illustratively, the code compiling plug-ins include a quantum language compiling plug-in and a host language compiling plug-in, and the server 20 is specifically configured to:
determining a target host language corresponding to the target code according to a first part of codes containing language type identifiers in the target code;
Invoking the quantum language compiling plugin to convert a second part of codes in the target codes from a quantum language to the target host language;
And calling the host language compiling plug-in to convert codes corresponding to the target host language into the target quantum program, wherein the codes corresponding to the target host language comprise converted second partial codes and third partial codes written by the target host language in the target codes.
Specifically, the object code includes three parts, namely a first part code including a language type identifier, a second part code written in qrunes language, and a third part code written in the object host language.
First, a target host language corresponding to the target code is determined based on the language type identification in the first partial code, i.e., the target host language is determined to be C++ or python. After determining the target host language, a quantum language compilation plug-in the code compilation plug-in (for converting code from qrunes to host language) is invoked to convert a second portion of code in the target code from quantum language (i.e., qrunes language) to the target host language (i.e., C++ or python). And finally, calling the host language compiling plug-in (used for converting codes from a host language into code languages capable of running on the quantum computer), and converting the converted second part of codes (namely, the second part of codes corresponding to the target host language) and the third part of codes written by the target host language into target quantum programs capable of running on the quantum computer.
Illustratively, the host language compiling plug-in includes a first preset plug-in and a second preset plug-in, and the server 20 is specifically configured to:
When the target host language is C++, calling the first preset plug-in, and converting codes corresponding to the C++ into the target quantum program;
and when the target host language is python, calling the second preset plug-in, and converting codes corresponding to the python into the target quantum program.
Specifically, the host language compilation plug-in includes a first preset plug-in and a second preset plug-in, namely a qpanda framework for converting the C++ corresponding code into a target quantum program and a pyqpanda framework for converting the python corresponding code into the target quantum program. The host language compiling plug-in is called to convert codes corresponding to the target host language into the target quantum program, namely, when the target host language is C++, a qpanda framework is called to convert codes corresponding to the C++ into the target quantum program; and when the target host language is python, invoking pyqpanda a framework to convert codes corresponding to the python into the target quantum program.
Illustratively, the server 20 is specifically configured to:
When the code editing instruction is received, acquiring user identity information of a current user, and carrying out identity verification on the current user according to the user identity information;
Generating a reminding message without development permission when the current user fails the identity verification;
and when the current user passes the identity verification, determining an editing space in the container, and converting the target code into a target quantum program capable of running on a quantum computer based on a code compiling plug-in the development environment in the editing space.
Specifically, the server 20 performs authentication on the current user when receiving a user instruction triggered by a user operation of the current user. If the verification is not passed, if the identity information corresponding to the current user is not in the white list or the account and password corresponding to the current user is not matched (stored in the server and/or the cloud center), generating and displaying a reminding message without development permission. And if the verification is passed, responding to the user instruction, generating a corresponding code editing instruction, and determining an editing space corresponding to the current user.
In a specific embodiment, if an editing space corresponding to the current user exists currently, determining an associated editing space corresponding to the current user; if the editing space corresponding to the current user does not exist currently, an editing space is allocated for the current user, the current user and the editing space corresponding to the current user are stored in a correlated mode, and the current user can log in the editing space subsequently to perform related editing and debugging operations conveniently.
Illustratively, the quantum program generation system further includes:
The code detection module is used for detecting the code of the target code, and generating and returning a corresponding detection result reminding message to the client.
In order to avoid code operation failure caused by code abnormality, in this embodiment, when receiving an object code uploaded by the current user, the server invokes a code detection plug-in stored in a cloud to detect the code of the object code, and returns a corresponding detection result to the client, so that the detection result of the object code is displayed to the current user through the client, and the current user can conveniently perform corresponding code adjustment based on an abnormal result in the detection result, or perform the next operation based on a normal result in the detection result.
Illustratively, the quantum program generation system further includes:
And the code warehouse updating module is used for storing the target codes and the target quantum programs corresponding to the target codes in a code warehouse in an associated manner, and finishing updating of the code warehouse.
Specifically, the target code and the target quantum program association corresponding to the target code are stored in a code warehouse, so that the code warehouse for storing the user input code and the quantum program corresponding to the user input code is updated continuously. When the code uploaded by the user is received, whether the corresponding quantum program exists or not is firstly inquired in the code warehouse, if so, the corresponding quantum program is sent to a quantum computer to run, and if not, the code uploaded by the user is compiled, so that the development efficiency of the quantum program is further improved.
Illustratively, the quantum program generation system further includes:
And the quantum computer is used for receiving and operating the target quantum program sent by the server and returning the operation result of the target quantum program to the server.
Specifically, the server is further configured to receive an operation result of the target quantum program returned by the quantum computer, and send the operation result to the client. And displaying the running result of the target quantum program through the client.
Compared with the prior art, the embodiment provides a quantum program generation system, which starts a dock container when a code editing instruction is received, determines an editing space in the container, and acquires a development environment template in a cloud; generating a target development environment based on the development environment template in the editing space so as to enable a current user to edit the quantum program; and when receiving the target code input by the current user, calling a code compiling plug-in the target development environment to convert the target code into a target quantum program capable of running on a quantum computer. Through the mode, the cloud storage development environment is convenient for a user to directly acquire the development environment without building the user, the user editing space is provided based on the dock container, the user does not need to locally develop programs, the user can pull the development environment stored in the cloud to carry out quantum program editing based on the editing space in the dock container, complicated environment building operation is avoided, the development environment stored in the cloud can be directly upgraded, the user can download the development environment of a corresponding version based on actual requirements, the multiplexing rate of the development environment is improved, and therefore the development efficiency of the quantum program is improved.
A further embodiment of the invention provides a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of the method embodiment of any of the above-mentioned methods when run.
Specifically, in the present embodiment, the above-described storage medium may be configured to store a computer program for executing the steps of:
S1, when a code editing instruction is received, starting a dock container, determining an editing space in the container, and acquiring a development environment template in a cloud;
S2, generating a target development environment in the editing space based on the development environment template so as to enable a current user to edit the quantum program;
S3, when receiving the target code input by the current user, calling a code compiling plug-in the target development environment, and converting the target code into a target quantum program capable of running on a quantum computer.
Specifically, in the present embodiment, the storage medium may include, but is not limited to: a usb disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
Still another embodiment of the present invention provides an electronic device comprising a memory having a computer program stored therein and a processor configured to run the computer program to perform the steps of the method embodiment of any of the above.
Specifically, the electronic apparatus may further include a transmission device and an input/output device, where the transmission device is connected to the processor, and the input/output device is connected to the processor.
Specifically, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program:
S1, when a code editing instruction is received, starting a dock container, determining an editing space in the container, and acquiring a development environment template in a cloud;
S2, generating a target development environment in the editing space based on the development environment template so as to enable a current user to edit the quantum program;
S3, when receiving the target code input by the current user, calling a code compiling plug-in the target development environment, and converting the target code into a target quantum program capable of running on a quantum computer.
Still another embodiment of the present invention further provides a quantum computer operating system, where the quantum computer operating system implements the generation of the quantum program according to the generation system of the quantum program described in the above embodiment.
The construction, features and effects of the present invention have been described in detail with reference to the embodiments shown in the drawings, but the above description is only a preferred embodiment of the present invention, but the present invention is not limited to the embodiments shown in the drawings, all changes, or modifications to the teachings of the invention, which fall within the meaning and range of equivalents are intended to be embraced therein, are intended to be embraced therein.

Claims (7)

1. A quantum program generation system, the quantum program generation system comprising:
the client is used for responding to the user operation, generating a code editing instruction based on the user editing operation and sending the code editing instruction to the server;
the cloud center is used for generating and starting a dock container, and the container comprises a development environment of a quantum program;
A server for determining an editing space in the container based on the code editing instruction, and converting an object code into an object quantum program which can be run on a quantum computer based on a code compiling plug-in the development environment in the editing space;
wherein the code compilation plug-in comprises a quantum language compilation plug-in and a host language compilation plug-in, the server being specifically configured to:
determining a target host language corresponding to the target code according to a first part of codes containing language type identifiers in the target code;
Invoking the quantum language compiling plugin to convert a second part of codes in the target codes from a quantum language to the target host language;
And calling the host language compiling plug-in to convert codes corresponding to the target host language into the target quantum program, wherein the codes corresponding to the target host language comprise converted second partial codes and third partial codes written by the target host language in the target codes.
2. The generation system of claim 1, wherein the host language compilation plug-in comprises a first preset plug-in and a second preset plug-in, the server being operable in particular to:
When the target host language is C++, calling the first preset plug-in, and converting codes corresponding to the C++ into the target quantum program;
and when the target host language is python, calling the second preset plug-in, and converting codes corresponding to the python into the target quantum program.
3. The generation system of claim 1, wherein the quantum program generation system further comprises:
The code detection module is used for detecting the code of the target code, and generating and returning a corresponding detection result reminding message to the client.
4. The generation system of claim 1, wherein the quantum program generation system further comprises:
And the code warehouse updating module is used for storing the target codes and the target quantum programs corresponding to the target codes in a code warehouse in an associated manner, and finishing updating of the code warehouse.
5. The generation system of any of claims 1-4, wherein the server is specifically configured to:
When the code editing instruction is received, acquiring user identity information of a current user, and carrying out identity verification on the current user according to the user identity information;
Generating a reminding message without development permission when the current user fails the identity verification;
and when the current user passes the identity verification, determining an editing space in the container, and converting the target code into a target quantum program capable of running on a quantum computer based on a code compiling plug-in the development environment in the editing space.
6. The generation system of claim 1, wherein the quantum program generation system further comprises:
And the quantum computer is used for receiving and operating the target quantum program sent by the server and returning the operation result of the target quantum program to the server.
7. A quantum computer operating system characterized in that it generates the target quantum program according to the generation system as claimed in any one of claims 1 to 6.
CN202110590259.6A 2021-05-28 2021-05-28 Quantum program generation system and quantum computer operation system Active CN115409194B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110590259.6A CN115409194B (en) 2021-05-28 2021-05-28 Quantum program generation system and quantum computer operation system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110590259.6A CN115409194B (en) 2021-05-28 2021-05-28 Quantum program generation system and quantum computer operation system

Publications (2)

Publication Number Publication Date
CN115409194A CN115409194A (en) 2022-11-29
CN115409194B true CN115409194B (en) 2024-08-13

Family

ID=84155504

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110590259.6A Active CN115409194B (en) 2021-05-28 2021-05-28 Quantum program generation system and quantum computer operation system

Country Status (1)

Country Link
CN (1) CN115409194B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109240662A (en) * 2018-08-09 2019-01-18 赛尔网络有限公司 A kind of software development methodology based on cloud platform, cloud platform, equipment and medium
CN111767055A (en) * 2020-06-16 2020-10-13 合肥本源量子计算科技有限责任公司 Quantum program compiling method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8327316B2 (en) * 2008-09-30 2012-12-04 Ics Triplex Isagraf Inc. Compilation model
CN109656538B (en) * 2017-10-11 2022-09-27 阿里巴巴集团控股有限公司 Application program generation method, device, system, equipment and medium
WO2021046184A1 (en) * 2019-09-03 2021-03-11 Zapata Computing, Inc. Computer architecture for executing quantum programs

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109240662A (en) * 2018-08-09 2019-01-18 赛尔网络有限公司 A kind of software development methodology based on cloud platform, cloud platform, equipment and medium
CN111767055A (en) * 2020-06-16 2020-10-13 合肥本源量子计算科技有限责任公司 Quantum program compiling method and device

Also Published As

Publication number Publication date
CN115409194A (en) 2022-11-29

Similar Documents

Publication Publication Date Title
CN113742202B (en) AI chip verification system, method, device and storage medium
CN115146782B (en) Quantum circuit compiling method and device, compiling frame and quantum operating system
CN113805882A (en) Method and device for developing application program, electronic equipment and storage medium
CN113190238B (en) Frame deployment method, device, computer equipment and storage medium
CN112363938A (en) Data processing method and device, electronic equipment and storage medium
CN107918558A (en) Business Process Control method, apparatus and equipment based on state machine
CN112564989A (en) Application deployment method and device
CN109492749B (en) Method and device for realizing neural network model online service in local area network
CN107608873B (en) Software testing method and system and testing platform
CN115409193B (en) Quantum program generation method, quantum program generation device, quantum program generation medium and quantum computer operating system
CN113590483B (en) Use case operation method and device
CN115562931A (en) Processor debugging module verification method and device, electronic equipment and storage medium
CN115409194B (en) Quantum program generation system and quantum computer operation system
CN110502439B (en) Debugging method, device, electronic equipment and storage medium
CN110209565A (en) A kind of metadata schema adjustment method and its device
CN112988578A (en) An automated testing method and device
CN109508193B (en) Application deployment and operation method, device, terminal equipment and medium
CN115775029B (en) Quantum circuit conversion method, quantum circuit conversion device, quantum circuit conversion medium and electronic device
CN115048082A (en) Micro front-end system construction method and device, server and readable storage medium
EP2782005A1 (en) Verifying state reachability in a statechart model having computer program code embedded therein
CN112015478B (en) Kernel loading method, server, device, computer device and storage medium
CN119248303B (en) ECU upgrade flashing method, device, electronic device and readable storage medium
CN116383014B (en) Monitoring computer, software debugging method, software debugging system, medium and product
CN115730670B (en) Method and device for generating mode file, medium and electronic device
US11714657B2 (en) Self optimizing application

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 230088 6th floor, E2 building, phase II, innovation industrial park, 2800 innovation Avenue, high tech Zone, Hefei City, Anhui Province

Applicant after: Benyuan Quantum Computing Technology (Hefei) Co.,Ltd.

Address before: 230088 6th floor, E2 building, phase II, innovation industrial park, 2800 innovation Avenue, high tech Zone, Hefei City, Anhui Province

Applicant before: ORIGIN QUANTUM COMPUTING COMPANY, LIMITED, HEFEI

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant