CN110826720A - Interface display method and device and interface switching method and device - Google Patents

Interface display method and device and interface switching method and device Download PDF

Info

Publication number
CN110826720A
CN110826720A CN201911074902.9A CN201911074902A CN110826720A CN 110826720 A CN110826720 A CN 110826720A CN 201911074902 A CN201911074902 A CN 201911074902A CN 110826720 A CN110826720 A CN 110826720A
Authority
CN
China
Prior art keywords
interface
quantum
displaying
area
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.)
Granted
Application number
CN201911074902.9A
Other languages
Chinese (zh)
Other versions
CN110826720B (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.)
Hefei Native Quantum Computing Technology Co Ltd
Original Assignee
Hefei Native Quantum Computing Technology 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 Hefei Native Quantum Computing Technology Co Ltd filed Critical Hefei Native Quantum Computing Technology Co Ltd
Priority to CN201911074902.9A priority Critical patent/CN110826720B/en
Publication of CN110826720A publication Critical patent/CN110826720A/en
Application granted granted Critical
Publication of CN110826720B publication Critical patent/CN110826720B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N10/00Quantum computing, i.e. information processing based on quantum-mechanical phenomena

Landscapes

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

Abstract

The invention discloses a method and a device for displaying an interface, wherein the method comprises the following steps: displaying the quantum program in a first area of a first interface; receiving an editing operation of a user for the quantum program; and responding to the editing operation, displaying the edited quantum program in the first area, and simultaneously displaying a graphical display form of the quantum operation in the edited quantum program in the second area of the first interface. By utilizing the embodiment of the invention, a user can check the graphical representation form of the quantum program while writing the quantum program, the user experience is improved, and the blank in the prior art is filled.

Description

Interface display method and device and interface switching method and device
Technical Field
The invention belongs to the technical field of quantum computing, and particularly relates to an interface display method and device and an interface switching method and device.
Background
Quantum computers are physical devices that perform high-speed mathematical and logical operations, store and process quantum information in compliance with the laws of quantum mechanics. When a device processes and calculates quantum information and runs quantum algorithms, the device is a quantum computer.
The quantum computation simulation is a simulation computation which simulates and follows the law of quantum mechanics by means of numerical computation and computer science, and is used as a simulation program which describes the space-time evolution of quantum states by utilizing the high-speed computing capability of a computer according to the basic law of quantum bits of the quantum mechanics.
With the increasing development of modern technology, the quantum technology enables the digital computing capability to be exponentially improved. The more the quantum bit number is, the calculation speed is multiplied, and the more powerful the function is. However, in the aspect of providing online demonstration of quantum computing and popularization simulation services in education departments, when a user writes a quantum program in a computer interface, the user cannot synchronously view graphical display of quantum operations in the quantum program in the same interface, which is a problem to be solved urgently.
Disclosure of Invention
The invention aims to provide an interface display method and device and an interface switching method and device, which are used for solving the defects in the prior art and enabling a user to view the graphical representation form of a quantum program while writing the quantum program.
The technical scheme adopted by the invention is as follows:
a display method of an interface comprises the following steps:
displaying the quantum program in a first area of a first interface;
receiving an editing operation of a user for the quantum program;
and responding to the editing operation, displaying the edited quantum program in the first area, and simultaneously displaying a graphical display form of the quantum operation in the edited quantum program in the second area of the first interface.
Optionally, the method further includes:
detecting whether the edited quantum program has errors;
and if the error occurs, displaying error prompt information.
Optionally, the displaying the error prompt information includes:
and displaying an error prompt icon at the error position of the edited quantum program.
Optionally, the graphical display form includes:
the edited quantum program comprises quantum operation, operated quantum bit information and execution time sequence information of the quantum operation.
Optionally, the method further includes:
receiving switching operation of a user for a second interface;
and responding to the switching operation, switching the first interface into the second interface, and displaying the graphical display form in an editable state on the second interface.
A display device of an interface, comprising:
the first display module is used for displaying the quantum program in a first area of a first interface;
the first receiving module is used for receiving the editing operation of a user for the quantum program;
and the second display module is used for responding to the editing operation, displaying the edited quantum program in the first area, and simultaneously displaying the graphical display form of the quantum operation in the edited quantum program in the second area of the first interface.
Optionally, the method further includes:
the detection module is used for detecting whether the edited quantum program has errors or not;
and the prompting module is used for displaying error prompting information under the condition that the edited quantum program is in error.
Optionally, the prompt module is specifically configured to:
and displaying an error prompt icon at the error position of the edited quantum program.
Optionally, the graphical display form includes:
the edited quantum program comprises quantum operation, operated quantum bit information and execution time sequence information of the quantum operation.
Optionally, the method further includes:
the receiving switching module is used for receiving switching operation of a user for the second interface;
and the switching display module is used for responding to the switching operation, switching the first interface into the second interface and displaying the graphical display form in an editable state on the second interface.
A storage medium having a computer program stored thereon, wherein the computer program is arranged to perform the method of any of the above when run.
An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program and the processor is arranged to execute the computer program to perform the method of any of the above.
An interface switching method comprises the following steps:
displaying a graphical display form of the quantum operation on a second interface;
receiving switching operation of a user for a first interface;
and responding to the switching operation aiming at the first interface, switching the second interface into the first interface, displaying the graphical display form in the second area of the first interface, and simultaneously displaying the quantum program corresponding to the graphical display form in the first area of the first interface.
Optionally, the method further includes:
after the graphical display form of the quantum operation is displayed on the second interface, receiving the editing operation of a user aiming at the graphical display form;
and responding to the editing operation aiming at the graphical display form, and displaying the edited graphical display form on the second interface.
Optionally, the displaying the graphical presentation form in the second area of the first interface, and simultaneously displaying the quantum program corresponding to the graphical presentation form in the first area of the first interface, includes:
and displaying the edited graphical display form in the second area of the first interface, and simultaneously displaying the quantum program corresponding to the edited graphical display form in the first area of the first interface.
Optionally, the method further includes:
and receiving the operation of the user aiming at the edited graphical display form, and displaying the operation result.
A switching device of an interface, comprising:
the third display module is used for displaying the graphical display form of the quantum operation on the second interface;
the second receiving module is used for receiving the switching operation of the user for the first interface;
and the fourth display module is used for responding to the switching operation aiming at the first interface, switching the second interface into the first interface, displaying the graphical display form in the second area of the first interface, and simultaneously displaying the quantum program corresponding to the graphical display form in the first area of the first interface.
Optionally, the method further includes:
the receiving and editing module is used for receiving the editing operation of a user aiming at the graphical display form after the graphical display form of the quantum operation is displayed on a second interface;
and the editing display module is used for responding to the editing operation aiming at the graphical display form and displaying the edited graphical display form on the second interface.
Optionally, the fourth display module is specifically configured to:
and displaying the edited graphical display form in the second area of the first interface, and simultaneously displaying the quantum program corresponding to the edited graphical display form in the first area of the first interface.
Optionally, the method further includes:
and the operation display module is used for receiving the operation of the user aiming at the edited graphical display form and displaying the operation result.
Compared with the prior art, the method and the device have the advantages that the quantum program is firstly displayed in the first area of the first interface, the editing operation of a user for the quantum program is received, then the editing operation is responded, the edited quantum program is displayed in the first area, and meanwhile the graphical display form of the quantum operation in the edited quantum program is displayed in the second area of the first interface, so that the user can check the graphical display form of the quantum program while writing the quantum program, the user experience is improved, and the blank in the prior art is filled.
Drawings
Fig. 1 is a schematic flowchart of a method for displaying an interface according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a graphical display format of quantum operations in a quantum program according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an interface switching method according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating an interface display apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an interface switching device according to an embodiment of the present invention.
Detailed Description
The embodiments described below with reference to the drawings are illustrative only and should not be construed as limiting the invention.
At present, quantum computing tends to be high-level expression, and primary learning of users with little knowledge of quantum computing is not enough to clearly show the whole simple to complex computing process of quantum computing. Therefore, the embodiment of the invention provides an interface display method and device, an interface switching method and device, a storage medium and an electronic device.
First, a method for displaying an interface, which is preferably applied to a terminal such as a computer, a smart phone, etc., will be described in detail.
It should be noted that a true quantum computer is a hybrid structure, which includes two major components: one part is a classic computer which is responsible for executing classic calculation and control; the other part is a quantum device, responsible for performing quantum computations. In fact, a real quantum program is a string of instruction sequences written by a quantum language such as the QRunes language and capable of running on a quantum computer (the aforementioned quantum device), and supports the operation of a quantum logic gate, and finally realizes the simulation of quantum computation. In particular, a quantum program is a sequence of instructions that operate quantum logic gates in a time sequence.
In practical applications, in order to simulate quantum computing to verify quantum applications and the like, the simulation may be implemented by a quantum virtual machine running on a general computer. The quantum program referred to in the embodiments of the present invention is a program written in a classical language and representing a qubit and its evolution, which is run on a quantum virtual machine, wherein the qubit, a quantum logic gate, and the like related to quantum computation are represented by corresponding classical codes.
Referring to fig. 1, fig. 1 is a schematic flow chart of an interface display method according to an embodiment of the present invention, which may include the following steps:
s101, displaying a quantum program in a first area of a first interface;
specifically, the first interface is a terminal interface, for example, a web interface of a computer, and the first area is a display area in the terminal interface, and can be determined according to an actual layout, and is used for displaying a quantum program written by a user. The first area may actually be an editable input box in which the user can edit the quantum program directly. In the event that the input box area is insufficient to display the entire quantum program, the user may operate a pull-up or pull-down to view the complete quantum program. When the first interface is opened for the first time, a section of configuration code of the quantum program is displayed by default, and a user only needs to directly write (fill) related code of the quantum operation, and the related code can also be a null quantum program, a historical quantum program and the like.
S102, receiving the editing operation of a user for the quantum program;
specifically, the editing operation directly input by the user in the first area may be received, and actually, the editing operation mainly based on the quantum language, such as adding, deleting, modifying, copying, pasting, and the like, is used for the user to learn the quantum programming, design the quantum program including the quantum bit and the quantum operation, and implement the simulation of the quantum computation. Quantum operations, mainly referred to as quantum logic gate operations and quantum measurement operations, are performed on qubits.
It should be noted that in the classical calculation, 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 through the combination of the logic gates. Similarly, the way qubits are handled is quantum logic gates. The quantum logic gate is used to enable the quantum state of the quantum bit to evolve, and the quantum logic gate is the basis for forming a quantum circuit, just like the relationship between the traditional logic gate and a common digital circuit. The quantum logic gate comprises a single quantum logic gate, a double quantum logic gate and a multiple quantum logic gate. Quantum logic gates are typically represented using unitary matrices, which are not only matrix-form but also an operation and transformation. The function of a general quantum logic gate on a quantum state is calculated by multiplying a unitary matrix by a matrix corresponding to a quantum state right vector.
For example, a quantum state right vector |0>Corresponding matrix isAnd quantum state right vector |1>Corresponding matrix is
Figure BDA0002262135910000062
S103, responding to the editing operation, displaying the edited quantum program in the first area, and simultaneously displaying the graphical display form of the quantum operation in the edited quantum program in the second area of the first interface.
Specifically, the second area is another display area for distinguishing the first area, and is used for displaying a graphical display form of the quantum program. The user writes the quantum program in the first area, the second area can display the graphical form of the quantum operation in the quantum program in real time, a thermal linkage mechanism is formed, the quantum operation is visually and visually displayed, the understanding of the user on the quantum calculation is deepened, the user can conveniently correct the deficiency, and the quantum program which the user wants is designed.
In one implementation, the graphical presentation form may include the following information:
the quantum operation and the operated qubit information included in the edited quantum program, and the execution timing information of the quantum operation may be understood to be a quantum wire and a measurement operation added to the quantum wire in a certain sense.
Quantum wires, also called quantum logic circuits, are the most common general quantum computation models, representing wires operating on qubits under an abstract concept, which comprise qubits, wires (time lines), and various quantum logic gates, and finally the result is often read out by quantum measurement operations.
Unlike conventional circuits that are connected by metal lines to pass either voltage or current signals, in quantum circuits, the lines can be viewed as being connected by time, i.e., the state of a qubit evolves naturally over time, in the process being operated on as indicated by the hamiltonian until a logic gate is encountered.
A quantum program as a whole has a total quantum wire, and the total number of qubits in the total quantum wire is the same as the total number of qubits in the quantum program. It can be understood that: a quantum program is mainly composed of quantum wires, measurement operations for quantum bits in the quantum wires, registers for storing measurement results, and control flow nodes (jump instructions), and a quantum wire may contain tens to hundreds or even thousands of quantum logic gate operations. The execution process of the quantum program is a process executed for all the quantum logic gates according to a certain time sequence. It should be noted that the timing is a time sequence in which each quantum logic gate is executed.
Illustratively, the partial quantum program containing quantum operations edited by the existing QRunes language is:
H(q[0]);
X(q[1]);
Y(q[2]);
Measure(q[0],c[0]);
as will be appreciated by those skilled in the art, H, X, Y represents a quantum logic gate operation, Measure represents a measurement operation, q [0], q [1], q [2] represent qubits, respectively at bit 0, bit 1 and bit 2, and c [0] represents a register holding the measurement for q [0 ]. Wherein H represents the Aldamard gate (Hadamard), X represents the Pauli-X gate, and Y represents the Pauli-Y gate.
The graphical representation of the quantum operations in the partial quantum program may be as shown in fig. 2. Wherein q 0-q 5 represent a total of 6 qubits; i0 is the quantum state right vector, which represents that the initial quantum state of each quantum bit is 0 state; the horizontal line on the right side of each qubit represents a time line, and the numbers 1-7 above the time line represent the markers of each time sequence; the icons containing H, X, Y represent the quantum logic gates H, X and Y gates, respectively, and the icon to the right of the H gate containing the pointer and the arc represents the measurement node. In fact, the measurement node is removed, and the remaining part represents the quantum wire corresponding to the part of the quantum program.
Because the H gate, the X gate and the Y gate are single quantum logic gates, the H gate is only arranged on a time line corresponding to the q [0], which means that the H gate only operates a single quantum bit q [0], and the X gate and the Y gate are the same. For a double-quantum logic gate or a multiple-quantum logic gate, the corresponding logic gate icon needs to be simultaneously placed on the time line corresponding to two or more quantum bits operated by the logic gate icon, so as to intuitively embody which quantum bits are specifically operated.
Looking longitudinally, the H, X, and Y gates are in sequence 1, and the quantum operations within sequence 1 are performed first, followed by sequence 2, through sequence 7. The 3 quantum logic gates can be simultaneously executed in actual calculation, which is the embodiment of quantum calculation characteristics (the quantum logic gate operations respectively executed by different qubits can be simultaneously executed, but only one quantum logic gate operation can be simultaneously executed by one qubit).
Viewed from the horizontal direction, each qubit sequentially performs the quantum operations on the timeline according to the respective timelines, for example, q [0] performs the measurement operation after performing the H gate according to the timeline, provided that the quantum operations in the time sequence 1 are all performed.
In addition, the process of editing the partial quantum program and displaying the graphical display form of the quantum operation in real time comprises the following steps:
first inputting 'H (q 0)' in the first area; ", the second area synchronously displays the H gate icon at the position shown in FIG. 2;
inputting "X (q 1)"; ", the second region displays the X gate icon synchronously;
inputting "Y (q 2)"; ", the second region displays the Y gate icon synchronously;
inputting "Measure (q 0, c 0 ]); ", the second region displays the measurement icon in synchronization.
It can be understood that the editing of the graphical presentation form is indirectly realized by editing the quantum program.
If, at this point, "Y (q 2)" in the quantum program is deleted; ", the Y gate icon of the second area disappears in synchronization. If the quantum operation is so many that the second area is not enough to be displayed completely, the user can view completely through the left-pull or right-pull operation. In this example, the remaining contents, except for the icon of the quantum operation, may be fixedly displayed in the second area, remaining unchanged.
It should be emphasized that the partial quantum program is only a core part (quantum operation part) of a complete program, and the graphical representation of the quantum program shown in fig. 2 is also only an example and is not limited thereto.
In practical applications, the content input by the user in the first area may be an error code affecting the logic correctness of the quantum program or even irrelevant content. Therefore, during editing, whether the edited quantum program has errors can be detected; and if the error occurs, displaying error prompt information, and specifically displaying an error prompt icon at the error position of the edited quantum program. For example, a red cross icon is displayed on one side of the error code line to indicate that the code of the line or the related line has an error, and further, a specific error description is displayed by hovering or clicking the icon with a mouse pointer.
In practical application, the switching operation of the user for the second interface can be received; and responding to the switching operation, switching the first interface into the second interface, and displaying the graphical display form in an editable state on the second interface.
Specifically, the second interface is a terminal display interface different from the first interface, and a user can click a switching function item corresponding to the second interface, so that the terminal receives the click operation, that is, the switching operation, and switches the first interface into the second interface for display, and the second interface highlights a graphical display form of the quantum operation in the quantum program.
In order to implement the user's hands-on strategy of learning while exercising', the graphical presentation form displayed on the second interface is set to be in an editable state. Taking the quantum line with the measurement operation in the form of graphical display as an example, a user can directly design and learn to construct the quantum line and deeply understand the physical implementation significance reflected behind the quantum line.
Continuing with the example of fig. 2, assuming that the quantum logic gate icons and the measurement icons do not exist, the process of editing at the second interface to construct the quantum wires shown in fig. 2 may be as follows:
the user can directly click the time line q [0] right below the time sequence 1, a suspension frame containing the quantum logic gate and the measurement operation appears, the quantum logic gate H gate which is to be added is selected and clicked, the H gate icon shown in the figure 2 is added at the time line, and the other icons are the same, so that the quantum circuit with the measurement operation shown in the figure 2 is finally obtained.
Furthermore, the icon of the logic gate is clicked twice, so that the icon can be deleted quickly; the icon is pressed, and the icon can be dragged to other positions; hovering over a quantum operation in the floating frame displays a description for the quantum operation.
For better explaining the interaction between the second interface and the first interface, referring to fig. 3, an embodiment of the present invention further provides an interface switching method, which may include the following steps:
s301, displaying a graphical display form of the quantum operation on a second interface;
the graphical display form of the second interface and the quantum operation is as described above.
S302, receiving switching operation of a user for a first interface;
and S303, responding to the switching operation aiming at the first interface, switching the second interface into the first interface, displaying the graphical display form in the second area of the first interface, and simultaneously displaying the quantum program corresponding to the graphical display form in the first area of the first interface.
Specifically, a user can click a switching function item corresponding to the first interface, so that the terminal receives the click operation, namely the switching operation, and switches the second interface into the first interface for display, wherein the first interface displays a graphical display form of the quantum operation and a quantum program corresponding to the graphical display form.
In practical application, the editing operation of a user for the graphical display form can be received; and responding to the editing operation aiming at the graphical display form, and displaying the edited graphical display form on the second interface.
It can be understood that the second interface emphasizes the editing of the graphical display form of the quantum operation, which is convenient for a user to directly construct, while the first interface emphasizes the quantum program corresponding to the graphical display form of the quantum operation, which reflects the high-level expression of the quantum computation, and simultaneously the same graphical representation form of the quantum operation which cannot be directly edited is also displayed on the first interface, so that the user can directly view the graphical representation form, and inconvenience caused by interface switching is reduced.
It should be noted that, the graphical display form of the quantum operation is edited on the second interface and the edited graphical display form is displayed in real time, when the interface is switched to the first interface, the edited graphical display form is also displayed in the second area of the first interface, and the quantum program corresponding to the edited graphical display form is displayed in the first area, so that the uniformity and accuracy of the display of the two pages are realized.
In addition, after the graphical display form is edited, the operation function item set in the first interface can be selected and clicked, so that the terminal receives the click operation of the user on the edited graphical display form, namely the operation, and displays the operation result.
It should be emphasized that the graphical illustration of the quantum operation in the above embodiments is illustrated by taking the quantum wire with measurement operation as an example, and the operation result is the measurement result, such as the quantum state probability of the measured quantum bit. When the first interface and the second interface are combined, a user selects to write a quantum program on the second interface or to establish a graphical display form of quantum operation on the first interface firstly, and the method can be determined according to actual needs.
Therefore, the quantum program is firstly displayed in the first area of the first interface, the editing operation of a user for the quantum program is received, then the editing operation is responded, the edited quantum program is displayed in the first area, and the graphical display form of the quantum operation in the edited quantum program is displayed in the second area of the first interface, so that the user can check the graphical representation form of the quantum program while writing the quantum program, the user experience is improved, and the blank in the prior art is filled.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a display device of an interface according to an embodiment of the present invention, which corresponds to the flow shown in fig. 1, and may include:
a first display module 401, configured to display a quantum program in a first area of a first interface;
a first receiving module 402, configured to receive an editing operation of a user on the quantum program;
a second display module 403, configured to, in response to the editing operation, display the edited quantum program in the first area, and simultaneously display a graphical display form of the quantum operation in the edited quantum program in the second area of the first interface.
Specifically, still include:
the detection module is used for detecting whether the edited quantum program has errors or not;
and the prompting module is used for displaying error prompting information under the condition that the edited quantum program is in error.
Specifically, the prompt module is specifically configured to:
and displaying an error prompt icon at the error position of the edited quantum program.
Specifically, the graphical display form includes:
the edited quantum program comprises quantum operation, operated quantum bit information and execution time sequence information of the quantum operation.
Specifically, still include:
the receiving switching module is used for receiving switching operation of a user for the second interface;
and the switching display module is used for responding to the switching operation, switching the first interface into the second interface and displaying the graphical display form in an editable state on the second interface.
Therefore, the quantum program is firstly displayed in the first area of the first interface, the editing operation of a user for the quantum program is received, then the editing operation is responded, the edited quantum program is displayed in the first area, and the graphical display form of the quantum operation in the edited quantum program is displayed in the second area of the first interface, so that the user can check the graphical representation form of the quantum program while writing the quantum program, the user experience is improved, and the blank in the prior art is filled.
Referring to fig. 5, fig. 5 is a schematic structural diagram of an interface switching device according to an embodiment of the present invention, which corresponds to the flow shown in fig. 3, and may include:
a third display module 501, configured to display a graphical display form of the quantum operation on a second interface;
a second receiving module 502, configured to receive a switching operation of a user for a first interface;
a fourth display module 503, configured to respond to the switching operation for the first interface, switch the second interface to the first interface, display the graphical display form in the second area of the first interface, and display a quantum program corresponding to the graphical display form in the first area of the first interface at the same time.
Specifically, still include:
the receiving and editing module is used for receiving the editing operation of a user aiming at the graphical display form after the graphical display form of the quantum operation is displayed on a second interface;
and the editing display module is used for responding to the editing operation aiming at the graphical display form and displaying the edited graphical display form on the second interface.
Specifically, the fourth display module is specifically configured to:
and displaying the edited graphical display form in the second area of the first interface, and simultaneously displaying the quantum program corresponding to the edited graphical display form in the first area of the first interface.
Specifically, still include:
and the operation display module is used for receiving the operation of the user aiming at the edited graphical display form and displaying the operation result.
Therefore, the quantum program is firstly displayed in the first area of the first interface, the editing operation of a user for the quantum program is received, then the editing operation is responded, the edited quantum program is displayed in the first area, and the graphical display form of the quantum operation in the edited quantum program is displayed in the second area of the first interface, so that the user can check the graphical representation form of the quantum program while writing the quantum program, the user experience is improved, and the blank in the prior art is filled.
The present invention also provides a storage medium, in which a computer program is stored, where the computer program is configured to execute the steps in any of the above method embodiments when running.
Specifically, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, displaying the quantum program in the first area of the first interface;
s2, receiving the editing operation of the user for the quantum program;
and S3, responding to the editing operation, displaying the edited quantum program in the first area, and simultaneously displaying the graphical display form of the quantum operation in the edited quantum program in the second area of the first interface.
Specifically, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Therefore, the quantum program is firstly displayed in the first area of the first interface, the editing operation of a user for the quantum program is received, then the editing operation is responded, the edited quantum program is displayed in the first area, and the graphical display form of the quantum operation in the edited quantum program is displayed in the second area of the first interface, so that the user can check the graphical representation form of the quantum program while writing the quantum program, the user experience is improved, and the blank in the prior art is filled.
An embodiment of the present invention further provides an electronic apparatus, which includes a memory and a processor, where the memory stores a computer program, and the processor is configured to execute the computer program to perform the steps in any of the above method embodiments.
Specifically, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Specifically, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, displaying the quantum program in the first area of the first interface;
s2, receiving the editing operation of the user for the quantum program;
and S3, responding to the editing operation, displaying the edited quantum program in the first area, and simultaneously displaying the graphical display form of the quantum operation in the edited quantum program in the second area of the first interface.
Therefore, the quantum program is firstly displayed in the first area of the first interface, the editing operation of a user for the quantum program is received, then the editing operation is responded, the edited quantum program is displayed in the first area, and the graphical display form of the quantum operation in the edited quantum program is displayed in the second area of the first interface, so that the user can check the graphical representation form of the quantum program while writing the quantum program, the user experience is improved, and the blank in the prior art is filled.
The construction, features and functions of the present invention are described in detail in the embodiments illustrated in the drawings, which are only preferred embodiments of the present invention, but the present invention is not limited by the drawings, and all equivalent embodiments modified or changed according to the idea of the present invention should fall within the protection scope of the present invention without departing from the spirit of the present invention covered by the description and the drawings.

Claims (13)

1. A method for displaying an interface, comprising:
displaying the quantum program in a first area of a first interface;
receiving an editing operation of a user for the quantum program;
and responding to the editing operation, displaying the edited quantum program in the first area, and simultaneously displaying a graphical display form of the quantum operation in the edited quantum program in the second area of the first interface.
2. The method of claim 1, further comprising:
detecting whether the edited quantum program has errors;
and if the error occurs, displaying error prompt information.
3. The method of claim 2, wherein displaying the error prompt comprises:
and displaying an error prompt icon at the error position of the edited quantum program.
4. The method of claim 3, wherein the graphical presentation comprises:
the edited quantum program comprises quantum operation, operated quantum bit information and execution time sequence information of the quantum operation.
5. The method of claim 4, further comprising:
receiving switching operation of a user for a second interface;
and responding to the switching operation, switching the first interface into the second interface, and displaying the graphical display form in an editable state on the second interface.
6. A display device for an interface, comprising:
the first display module is used for displaying the quantum program in a first area of a first interface;
the first receiving module is used for receiving the editing operation of a user for the quantum program;
and the second display module is used for responding to the editing operation, displaying the edited quantum program in the first area, and simultaneously displaying the graphical display form of the quantum operation in the edited quantum program in the second area of the first interface.
7. A storage medium, in which a computer program is stored, wherein the computer program is arranged to perform the method of any of claims 1 to 5 when executed.
8. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 5.
9. An interface switching method is characterized by comprising the following steps:
displaying a graphical display form of the quantum operation on a second interface;
receiving switching operation of a user for a first interface;
and responding to the switching operation aiming at the first interface, switching the second interface into the first interface, displaying the graphical display form in the second area of the first interface, and simultaneously displaying the quantum program corresponding to the graphical display form in the first area of the first interface.
10. The method of claim 9, further comprising:
after the graphical display form of the quantum operation is displayed on the second interface, receiving the editing operation of a user aiming at the graphical display form;
and responding to the editing operation aiming at the graphical display form, and displaying the edited graphical display form on the second interface.
11. The method of claim 10, wherein displaying the graphical presentation in the second area of the first interface and simultaneously displaying the quantum program corresponding to the graphical presentation in the first area of the first interface comprises:
and displaying the edited graphical display form in the second area of the first interface, and simultaneously displaying the quantum program corresponding to the edited graphical display form in the first area of the first interface.
12. The method of claim 10, further comprising:
and receiving the operation of the user aiming at the edited graphical display form, and displaying the operation result.
13. An interface switching device, comprising:
the third display module is used for displaying the graphical display form of the quantum operation on the second interface;
the second receiving module is used for receiving the switching operation of the user for the first interface;
and the fourth display module is used for responding to the switching operation aiming at the first interface, switching the second interface into the first interface, displaying the graphical display form in the second area of the first interface, and simultaneously displaying the quantum program corresponding to the graphical display form in the first area of the first interface.
CN201911074902.9A 2019-11-06 2019-11-06 Interface display method and device and interface switching method and device Active CN110826720B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911074902.9A CN110826720B (en) 2019-11-06 2019-11-06 Interface display method and device and interface switching method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911074902.9A CN110826720B (en) 2019-11-06 2019-11-06 Interface display method and device and interface switching method and device

Publications (2)

Publication Number Publication Date
CN110826720A true CN110826720A (en) 2020-02-21
CN110826720B CN110826720B (en) 2023-04-07

Family

ID=69552846

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911074902.9A Active CN110826720B (en) 2019-11-06 2019-11-06 Interface display method and device and interface switching method and device

Country Status (1)

Country Link
CN (1) CN110826720B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111401562A (en) * 2020-03-11 2020-07-10 合肥本源量子计算科技有限责任公司 Method and device for operating quantum circuit in terminal interface
CN111738449A (en) * 2020-07-03 2020-10-02 合肥本源量子计算科技有限责任公司 Quantum bit regulation and control method and device
CN111766990A (en) * 2020-07-03 2020-10-13 合肥本源量子计算科技有限责任公司 Display method and device of semiconductor quantum chip structure
CN112527283A (en) * 2020-12-18 2021-03-19 四川大学 Quantum computation simulation tool set
WO2024009292A1 (en) * 2022-07-05 2024-01-11 Classiq Technologies LTD. Generating a graphical representation of a quantum circuit

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090282369A1 (en) * 2003-12-15 2009-11-12 Quantum Matrix Holding, Llc System and Method for Muulti-Dimensional Organization, Management, and Manipulation of Remote Data
WO2013133895A1 (en) * 2012-03-06 2013-09-12 Apple Inc. Fanning user interface controls for a media editing application
CN105528158A (en) * 2015-12-25 2016-04-27 北京嘉和美康信息技术有限公司 Image display method and image display device
WO2018119905A1 (en) * 2016-12-29 2018-07-05 深圳前海达闼云端智能科技有限公司 Control method and control device for multisystem mobile terminal, and electronic device
CN109213603A (en) * 2018-05-31 2019-01-15 合肥本源量子计算科技有限责任公司 A kind of cloud platform and platform operation method for docking quantum computer and user
CN109471622A (en) * 2018-11-02 2019-03-15 成都娄外科技有限公司 A kind of program editing method and device
US20190102496A1 (en) * 2017-09-29 2019-04-04 International Business Machines Corporation Interactive user interface for composing quantum circuits
CN109634592A (en) * 2018-12-29 2019-04-16 深圳点猫科技有限公司 Graphical Python programming exchange method, system and electronic equipment
CN110286896A (en) * 2019-06-28 2019-09-27 百度在线网络技术(北京)有限公司 Visualizing editing method, device, equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090282369A1 (en) * 2003-12-15 2009-11-12 Quantum Matrix Holding, Llc System and Method for Muulti-Dimensional Organization, Management, and Manipulation of Remote Data
WO2013133895A1 (en) * 2012-03-06 2013-09-12 Apple Inc. Fanning user interface controls for a media editing application
CN105528158A (en) * 2015-12-25 2016-04-27 北京嘉和美康信息技术有限公司 Image display method and image display device
WO2018119905A1 (en) * 2016-12-29 2018-07-05 深圳前海达闼云端智能科技有限公司 Control method and control device for multisystem mobile terminal, and electronic device
US20190102496A1 (en) * 2017-09-29 2019-04-04 International Business Machines Corporation Interactive user interface for composing quantum circuits
CN109213603A (en) * 2018-05-31 2019-01-15 合肥本源量子计算科技有限责任公司 A kind of cloud platform and platform operation method for docking quantum computer and user
CN109471622A (en) * 2018-11-02 2019-03-15 成都娄外科技有限公司 A kind of program editing method and device
CN109634592A (en) * 2018-12-29 2019-04-16 深圳点猫科技有限公司 Graphical Python programming exchange method, system and electronic equipment
CN110286896A (en) * 2019-06-28 2019-09-27 百度在线网络技术(北京)有限公司 Visualizing editing method, device, equipment and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
YU ZHANG 等: "Optimizing Quantum Programs against Decoherence Delaying Qubits into Quantum Superposition" *
李煜卉;彭勇刚;: "工业机器人通用图形化编程软件的研究" *
赵林;张令涛;王赞;田国辉;张亮;: "调度自动化系统多视图人机交互界面设计" *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111401562A (en) * 2020-03-11 2020-07-10 合肥本源量子计算科技有限责任公司 Method and device for operating quantum circuit in terminal interface
CN111401562B (en) * 2020-03-11 2023-12-15 本源量子计算科技(合肥)股份有限公司 Method and device for operating quantum circuit in terminal interface
CN111738449A (en) * 2020-07-03 2020-10-02 合肥本源量子计算科技有限责任公司 Quantum bit regulation and control method and device
CN111766990A (en) * 2020-07-03 2020-10-13 合肥本源量子计算科技有限责任公司 Display method and device of semiconductor quantum chip structure
CN111738449B (en) * 2020-07-03 2024-01-09 本源量子计算科技(合肥)股份有限公司 Quantum bit regulation and control method and device
CN112527283A (en) * 2020-12-18 2021-03-19 四川大学 Quantum computation simulation tool set
WO2024009292A1 (en) * 2022-07-05 2024-01-11 Classiq Technologies LTD. Generating a graphical representation of a quantum circuit

Also Published As

Publication number Publication date
CN110826720B (en) 2023-04-07

Similar Documents

Publication Publication Date Title
CN110826720B (en) Interface display method and device and interface switching method and device
CN110968943B (en) Terminal interface display method and device
Fox et al. An R companion to applied regression
CN109739855B (en) Method and system for realizing data sheet splicing and automatically training machine learning model
JP7439242B2 (en) Visual creation and monitoring of machine learning models
CN111401562B (en) Method and device for operating quantum circuit in terminal interface
CN1716264B (en) Methods, systems for annotating system traces with control program information and presenting annotated system traces
CN104823158B (en) Method and system for simplified knowledge engineering
CN112230818A (en) Method and device for editing quantum logic gate on terminal interface
WO2011156192A2 (en) Calculator with dynamic computation environment
Hoffswell et al. Visual debugging techniques for reactive data visualization
CN106843663B (en) Method, device, equipment and medium for positioning pre-jump position in page
WO2023173631A1 (en) Programming method and apparatus, and device, storage medium and computer program product
Dalpiaz Applied statistics with R
CN111325348A (en) Quantum line display method and device, storage medium and electronic device
Lehka et al. Hardware and software tools for teaching the basics of quantum informatics to students of specialized (high) schools
CN111079933A (en) Quantum line graphical display method, system, storage medium and electronic device
Devi et al. Performance analysis of deterministic finite automata and Turing machine using JFLAP tool
CN107491311A (en) Method and system for generating page file and computer equipment
CN111930636A (en) Graphic programming product checking method, device, system, equipment and storage medium
Ahlersten An introduction to MATLAB
US20190066533A1 (en) Methods for facilitating shortcut and hot key learning via computer application gamification and devices thereof
Ross et al. Symbulate: Simulation in the language of probability
CN106557312A (en) Program development support device and program development support software
JPH1011116A (en) Data processor, simulation method, and recording medium

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
GR01 Patent grant
GR01 Patent grant