Quantum computing visual debugging method and system, computer device and storage medium
By using a quantum computing visualization debugging method, the running data of quantum experimental tasks can be obtained to generate search instructions, find the same experimental tasks in the historical database, and provide debugging reminders. This solves the problem of not being able to obtain intermediate results in quantum computing, improves the error detection rate and development efficiency, and reduces repeated experiments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN SPINQ TECHNOLOGY CO LTD
- Filing Date
- 2022-05-18
- Publication Date
- 2026-07-21
AI Technical Summary
In quantum computing software development, the inability to obtain intermediate stage results leads to low error checking efficiency and slows down the development progress. Existing technologies cannot effectively query intermediate stage experiments.
This paper provides a visualization debugging method for quantum computing. By acquiring the running data of quantum experimental tasks, a search command is generated to find the same historical experimental tasks in the historical database. Debugging reminders are provided on the front-end display platform. The visualization debugging process is used to optimize experimental tasks and reduce repeated experiments.
It improves the error detection rate and efficiency of quantum algorithm development, reduces the waste of quantum computer computing resources, and optimizes the development process.
Smart Images

Figure CN114969443B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of quantum computing technology, and in particular to a quantum computing visualization debugging method, system, computer device and storage medium. Background Technology
[0002] Currently, quantum computing algorithms and applications are still in the exploratory stage, and there is no mature quantum computing storage technology at present. As chip computing power and overall machine performance improve, the algorithms that can be supported are becoming increasingly complex. However, when developing quantum computing software, because there is no way to obtain intermediate stage results, debugging requires starting an experiment again, re-entering the algorithm, and repeating the experiment. This leads to low error checking efficiency and slows down the overall quantum algorithm development progress. Therefore, there is a need for a method that can easily query intermediate stage experimental results. Summary of the Invention
[0003] The purpose of this application is to propose a visual debugging method for quantum computing platforms, which addresses the problem of low error detection rate when intermediate experimental results cannot be obtained during the development of quantum computer software algorithms.
[0004] To address the aforementioned technical problems, this application provides a visual debugging method for quantum computers, employing the following technical solution:
[0005] A visual debugging method for quantum computing, the method comprising:
[0006] Acquire quantum experimental tasks, analyze the operational data of the quantum experimental tasks, and generate search instructions;
[0007] According to the search instructions, search the historical database to see if there is a historical experimental task that is the same as the quantum experimental task described.
[0008] If it exists, a debugging signal will be generated and returned to the front-end display platform to provide debugging reminders;
[0009] If it does not exist, then execute the quantum experiment task and return the task result to the front-end display platform.
[0010] Furthermore, the method also includes:
[0011] The operational data of the quantum experiment task is analyzed to obtain the corresponding task characterization parameters, which include quantum gate circuit parameters and encoding field parameters.
[0012] The quantum experiment task is displayed in a first area and a second area of the front-end display platform according to the task characterization parameters, wherein the first area represents the quantum gate circuit parameters and the second area represents the encoding field parameters.
[0013] Furthermore, the method also includes:
[0014] Extract the quantum state measurement parameters of the quantum experimental task from the back-end computing platform, and analyze the quantum state measurement parameters to obtain the corresponding density matrix and quantum state measurement values;
[0015] The density matrix of the quantum state measurement parameters is characterized using the third region of the front-end display platform;
[0016] The quantum state measurement value of the quantum state measurement parameter is characterized by the fourth region of the front-end display platform.
[0017] Furthermore, the method also includes:
[0018] Extract historical experimental results from the historical experimental task that is identical to the quantum experimental task described above;
[0019] Verify that the data fields in the quantum experimental task are identical to the quantum gate circuit parameters and encoding field parameters in the historical experimental task, so as to generate breakpoint prompt data;
[0020] The breakpoint prompt data and the historical experimental results are converted into data to generate a debugging signal that is returned to the first region and the second region.
[0021] When using the first region to characterize the quantum experimental task using the quantum gate circuit, the breakpoint prompts and the experimental results are highlighted and rendered to be characterized on the quantum gate circuit;
[0022] When the second region is used to characterize the quantum experimental task using the encoded field, the breakpoint prompts and the experimental results are highlighted and rendered to represent them on the encoded field.
[0023] Furthermore, the method also includes:
[0024] Analyze the call values of qubits in the operation data of the quantum experiment task;
[0025] If the call value is less than a preset threshold, the quantum experiment task is simulated and the simulation results of the quantum experiment task are returned to the front-end display platform.
[0026] If the called value is greater than a preset threshold, a search instruction is generated.
[0027] Furthermore, the method also includes:
[0028] Extract the corresponding task characterization parameters, task results, and task names of the quantum experiment task to construct a database index;
[0029] The experimental results of the quantum experiment are stored in the historical database, wherein historical experimental results of the historical experiment are retrieved according to the database index.
[0030] To address the aforementioned technical problems, this application also provides a quantum computing visualization and debugging system, which employs the following technical solution:
[0031] A quantum computing visualization and debugging system, the quantum computing visualization and debugging system comprising:
[0032] The parsing module is used to acquire quantum experimental tasks, parse the running data of the quantum experimental tasks, and generate retrieval instructions;
[0033] The search module is used to construct a database index according to the search instructions, and to search the storage unit for whether there is a historical experimental task that is the same as the quantum experimental task;
[0034] The reminder module is used to generate a debugging signal and return it to the front-end display platform to remind users when there is a historical experimental task that is the same as the quantum experimental task.
[0035] A storage unit for storing the experimental results of the quantum experiment task;
[0036] The execution module is used to determine if there is no historical experimental task identical to the quantum experimental task, execute the quantum experimental task, and return the task result to the front-end display platform.
[0037] Furthermore, the quantum computing visualization and debugging system also includes:
[0038] An extraction submodule is used to extract the task characterization parameters of the quantum experiment task, including quantum gate circuit parameters and encoded field parameters.
[0039] The simulation submodule is used to determine when the number of qubit calls in the running data of the quantum experiment task reaches a threshold, so as to simulate the quantum experiment task.
[0040] The display submodule is used to run and display the quantum experiment task in a first area and a second area in the front-end display platform according to the task characterization parameters, wherein the first area represents the quantum gate circuit parameters and the second area represents the encoding field parameters.
[0041] To address the aforementioned technical problems, this application also provides a computer device that employs the following technical solution:
[0042] A computer device includes a memory and a processor, the memory storing computer-readable instructions, the processor executing the computer-readable instructions to implement the steps of the visualization debugging method described above.
[0043] To address the aforementioned technical problems, this application also provides a computer-readable storage medium, employing the technical solutions described below.
[0044] A computer-readable storage medium is characterized in that it stores computer-readable instructions, which, when executed by a processor, implement the steps of the visualization debugging method described above.
[0045] Compared with the prior art, the embodiments of this application have the following advantages: First, the present invention acquires a quantum experimental task, analyzes the running data of the quantum experimental task, and generates a search instruction; according to the search instruction, it searches the historical database to see if there is a historical experimental task that is the same as the quantum experimental task; based on the same historical experimental task, it provides task debugging reminders on the front-end display platform, and users can optimize the quantum experimental task according to the visualized debugging process, improve the development efficiency of algorithm engineers, reduce repeated experiments by utilizing the constructed historical task index, and avoid wasting the computing power resources of quantum computers. Attached Figure Description
[0046] To more clearly illustrate the solutions in this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0047] Figure 1 This is an exemplary system architecture diagram to which this application can be applied;
[0048] Figure 2 This is a flowchart of one implementation of the visual debugging method according to this application;
[0049] Figure 3 This is a flowchart of one embodiment of step S200 in this application;
[0050] Figure 4 This is a schematic diagram of an embodiment of the debugging operation in the first area of the front-end display platform according to step S210 of this application;
[0051] Figure 5 This is a structural diagram of an embodiment of the visual debugging system according to this application.
[0052] Figure 6This is a schematic diagram of the structure of one embodiment of the computer device according to this application. Implementation
[0053] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein in the specification of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having," and any variations thereof, in the specification, claims, and foregoing drawings of this application, are intended to cover non-exclusive inclusion. The terms "first," "second," etc., in the specification, claims, or foregoing drawings of this application are used to distinguish different objects, not to describe a particular order.
[0054] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0055] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
[0056] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. Network 104 serves as the medium for providing communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0057] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social media platform software, etc.
[0058] Terminal devices 101, 102, and 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 players (Moving Picture Experts Group Audio Layer IV), laptops, and desktop computers, etc.
[0059] Server 105 can be a server that provides various services, such as a backend server that supports the pages displayed on terminal devices 101, 102, and 103.
[0060] It should be noted that the visual debugging method provided in the embodiments of this application is generally provided by Server / Terminal Device Execution, accordingly, visual debugging devices are generally set up in Server / Terminal Device middle.
[0061] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0062] Continue to refer to Figure 2 The diagram illustrates a flowchart of an embodiment of a quantum computing visualization debugging method according to this application. The quantum computing visualization debugging method includes the following steps:
[0063] Step 200: Obtain the quantum experimental task, parse the running data of the quantum experimental task, and generate a search instruction.
[0064] In this embodiment, it should be noted that the quantum experimental task is an algorithm development experimental task based on a quantum computing platform. Currently, due to the limitations of quantum devices, the quantum experimental task needs to be verified by building a virtual quantum computing system using classical commercial computers. The programming of the development task is carried out using the language of classical commercial computers to characterize the quantum experimental task. The quantum experimental task is generally represented by quantum gate circuits. Quantum logic gates are arranged in a certain time sequence to form quantum gate circuits, and they are executed according to their timing information to realize quantum computing.
[0065] In this embodiment, after obtaining the quantum experimental task parsing, the task name, quantum gate circuit data, and encoding field data of the quantum experimental task are obtained. Then, using the task name, quantum gate circuit data, and encoding field data of the quantum experimental task, a search instruction is generated and sent to the historical database for task retrieval.
[0066] For example, when acquiring quantum experimental tasks on a front-end display platform, it should be noted that the extraction of experimental features from the quantum experimental tasks to generate search instructions is multi-dimensional. This includes extracting the task name, quantum logic gate data and corresponding timing data from the quantum gate circuit data, and the encoded data of the quantum gate circuit data to generate search instructions. For instance, the order of quantum logic gates arranged in standard timing sequence is extracted from the quantum gate circuit data. After the quantum logic gates are numerically converted, a hash function is used to obtain the corresponding index value. The search instruction containing the index value is then sent to the historical database. Upon receiving the search instruction, the historical database parses the search instruction, performs an authentication operation on the search instruction using a hash function to determine the current user's access rights, divides search permissions according to the corresponding authentication value, extracts the index value of the corresponding permission in the current user's search instruction, iterates through the historical database based on the index value to see if there is corresponding historical task data, and returns the same historical task data to the front-end display platform. The front-end display platform performs data transformation on the historical task data and then performs corresponding task representation for the historical experimental tasks.
[0067] Specifically, in this embodiment, the rendering component introduced by the front-end display platform is the Echarts component. The Echarts component is used to pre-construct a first region and a second region. The first region initializes and sets the attributes of the quantum circuits, the number of qubits, and the corresponding quantum logic gates. The quantum logic gates can be added to the quantum circuits according to a custom time sequence based on operation instructions, thus representing the quantum gate circuits. The second region pre-adds encoding input boxes corresponding to the initialization state of the first region. When quantum logic gates are arranged in the first region, the second region displays the corresponding encoding fields based on the quantum gate circuits in the first region. Conversely, when encoding fields are input in the second region, the quantum logic gates in the first region generate the corresponding quantum gate circuit arrangement order based on the encoding fields.
[0068] For example, during initialization, the front-end display platform clears the quantum logic gates on the timing lines in the first area and the encoded data in the encoding input box in the second area. After receiving a quantum experiment task, it fills the first and second areas with the extracted task name, quantum logic gate data and corresponding timing data from the quantum gate circuit data, as well as the encoded data of the quantum gate circuit data. After the data is filled, the user can click to select preset operations to add quantum logic gates. It also includes operations such as selectively replacing, deleting, modifying encoding fields, and dragging quantum logic gates.
[0069] In this embodiment, the front-end display platform further includes extracting quantum state measurement parameters of ongoing or completed quantum experimental tasks from the back-end computing platform. The front-end display platform also includes a pre-constructed third region and a fourth region. The third region of the front-end display platform is used to characterize the density matrix of the quantum state measurement parameters, and the fourth region of the front-end display platform is used to characterize the quantum state measurement values of the quantum state measurement parameters.
[0070] In this embodiment, the front-end display platform initializes the third and fourth regions and assigns initial values to the bar chart or curve. When it receives quantum state measurement parameters sent by the back-end computing platform, it performs data conversion for display. It should be noted that the quantum state measurement values are the observations of the quantum state by the back-end computing platform. After receiving the observations of the quantum state from the back-end computing platform, the fourth region projects these observations to display the corresponding quantum state rendering effect.
[0071] Furthermore, in another preferred embodiment, after extracting the experimental task features of the quantum experimental task, the front-end display platform performs a qubit call count determination operation on the quantum experimental task. If the number of qubits used in this quantum experimental task is small, a simulation command is generated and sent to the quantum experimental task simulator to directly simulate the task, and the corresponding task result is directly returned to the front-end display platform. For example, after obtaining the running data of any quantum experimental task from the front-end display platform, the running data is parsed to determine whether the call value of the qubits used in this quantum experimental task is less than 3. If so, a simulation command is generated using the running data of the quantum experimental task, sent to an external computer simulator for task simulation, and the task result simulated by the external computer simulator is returned to the front-end display platform for task result display. If the call value of the qubits used in this quantum experimental task is greater than 3, the step S200 of generating a retrieval command is executed normally.
[0072] Step 210, refer to Figure 3The system searches the historical database to determine if there is a historical experimental task identical to the quantum experimental task described above.
[0073] Specifically, after obtaining the quantum experiment task through the front-end display platform, a search instruction is generated based on the quantum experiment task. The search instruction then checks the historical database for identical historical task data based on the quantum gate circuit parameters and encoding field parameters. If identical historical task data is found, it is returned to the front-end display platform. It should be noted that multiple historical task data sets may be returned during the traversal of the historical database, corresponding to different time-series portions of the quantum experiment task.
[0074] When the front-end display platform receives historical experimental tasks from the back-end computing platform, it extracts the quantum gate circuit parameters and encoding parameters of the historical experimental tasks. At the same points in the quantum gate circuits of the first region and the encoding fields of the second region, it assigns and renders the parameters of the same parts, using different colors to distinguish them, and adds floating window annotations to the corresponding historical experimental results. Based on the historical experimental results displayed in the first and second regions, the user inserts corresponding breakpoint data in the first and / or second regions. When the user clicks the send command in the first and / or second region, the front-end display platform generates a new quantum experimental task based on the position of the breakpoint data and sends it to the back-end computing platform for experimental computation.
[0075] For example, when the first and second regions of the front-end display platform represent and render the same historical experimental task, the user can, based on the prompts of the same historical experimental task, perform preset replacement, deletion, or modification of the encoding fields of the quantum logic gates in the first and / or second regions to add preset debugging data to the quantum experimental task.
[0076] Specifically, in this embodiment, the timeline in the front-end display platform is a horizontal line, and its third and fourth regions are still in the initialization state. The first region of the front-end display platform displays any acquired quantum experimental task, such as... Figure 4 As shown, any quantum experimental task obtained through analysis is displayed using two quantum gate circuits Q[0] and Q[1] in the first area of the front-end display platform; after the debugging signal is converted, it is highlighted in any form to cover the timing numbers on the quantum gate circuit, providing debugging reminders. The user inserts breakpoints according to the debugging reminders to debug the quantum experimental task; such as Figure 4As shown, the quantum experimental task has an H gate and an X gate in the first time sequence, an H gate in the second time sequence, a CNOT gate inserted by the user according to the debugging reminder in the third time sequence, and an H gate in the fourth time sequence. In the first time sequence, Q[0] executes the H gate and Q[1] executes the X gate; in the second time sequence, Q[1] executes the H gate; in the third time sequence, Q[1] executes the CNOT gate; in the fourth time sequence, Q[1] executes the H gate. When the task can be executed, when the CNOT gate is reached, the task result before the CNOT gate is output. The third region and the fourth region are represented by the projection of the density matrix and the quantum state measurement value according to the corresponding task result.
[0077] Furthermore, in this embodiment, when there are no identical historical experimental tasks, the first and second regions are not overlaid with each other during rendering. After inserting breakpoints in the first region, the user can send a run command directly to the backend computing platform for task execution. Once the backend computing platform has completed the execution, the experimental results of the quantum experiment task are stored in the historical database.
[0078] Specifically, after the front-end display platform debugs the quantum experiment task, the user clicks to execute the task and sends it to the back-end computing platform to perform the quantum experiment task calculation. The measurement values and probability distribution of the quantum bit states in the calculation results are then returned to the third and fourth areas of the front-end display platform, and the task storage operation is triggered to store it in the historical database.
[0079] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, optical disk, or read-only memory (ROM), or random access memory (RAM).
[0080] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0081] Further reference Figure 4 As a response to the above Figure 2 The implementation of the method shown in this application provides an embodiment of a debugging device for quantum computing, which is similar to... Figure 2 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.
[0082] like Figure 4 As shown, the quantum computing visualization and debugging system 300 described in this embodiment includes: a parsing module 301, a searching module 302, a reminder module 303, and a running module 304, wherein:
[0083] The parsing module 301 is used to acquire quantum experimental tasks, parse the running data of the quantum experimental tasks, and generate retrieval instructions.
[0084] In this embodiment, the parsing module further includes an extraction submodule, a simulation submodule, and a display submodule.
[0085] The extraction submodule is used to extract the task characterization parameters of the quantum experiment task, which include quantum gate circuit parameters and encoded field parameters.
[0086] In this embodiment, the extraction submodule includes: a quantum state measurement unit, used to extract quantum state measurement parameters of the back-end computing platform for quantum experimental tasks, and to analyze the quantum state measurement parameters to obtain the corresponding density matrix and quantum state measurement values; the first area of the front-end display platform is used to assign data values and set attributes for the bar chart, and to render the quantum gate circuit data and quantum logic gates; the second area of the front-end display platform is used to display the encoding input box corresponding to the quantum gate circuit data.
[0087] The simulation submodule is used to determine whether the call value of qubits in the running data of the quantum experiment task has reached a threshold in order to simulate the quantum experiment task.
[0088] In this embodiment, after the simulation submodule obtains the running data of any quantum experiment task, it parses the running data of the quantum experiment task and determines whether the calling value of the calling qubit of this quantum experiment task is less than 3. If so, it uses the running data of the quantum experiment task to perform task simulation and returns the task result after the simulation to the display submodule for task result display. If the calling value of the calling qubit of this quantum experiment task is greater than 3, the simulation operation is not performed.
[0089] The display submodule is used to display the quantum experimental task in a first area and a second area in the front-end display platform according to the task characterization parameters. The first area represents the quantum gate circuit parameters, and the second area represents the encoded field parameters.
[0090] In this embodiment, the display submodule further includes a density display unit, used to characterize the density matrix of quantum state measurement parameters using the third region of the front-end display platform; and a measurement display unit, used to characterize the quantum state measurement value of the quantum state measurement parameters using the fourth region of the front-end display platform.
[0091] Furthermore, in this embodiment, the parsing module extracts the quantum state measurement parameters of the quantum experimental task from the back-end computing platform, and parses the quantum state measurement parameters to obtain the corresponding density matrix and quantum state measurement values; the density matrix of the quantum state measurement parameters is represented by the third region of the front-end display platform; and the quantum state measurement values of the quantum state measurement parameters are represented by the fourth region of the front-end display platform.
[0092] For example, the third and fourth areas of the front-end display platform are used to render the density matrix and quantum state measurement values using bar charts after reading the quantum experimental task.
[0093] This embodiment analyzes the data from the quantum experiment to visualize the real-time changes in the probability, density matrix, and amplitude of the expected projection.
[0094] In this embodiment, the search module 302 is used to construct a database index according to the search instruction, and search the storage unit for whether there is a historical experimental task that is the same as the quantum experimental task.
[0095] Specifically, the search module verifies data fields in the quantum experimental task that have the same quantum gate circuit parameters and encoding field parameters as those in the historical experimental task, in order to generate breakpoint prompt data; the breakpoint prompt data and the historical experimental results are converted into data to generate debugging signals that are returned to the first region and the second region; when the quantum experimental task is characterized by quantum gate circuits in the first region, the breakpoint prompts and experimental results are highlighted to represent them on the quantum gate circuits; when the quantum experimental task is characterized by encoding fields in the second region, the breakpoint prompts and experimental results are highlighted to represent them on the encoding fields.
[0096] Furthermore, in this embodiment, the search module includes a storage unit for extracting historical experimental results of historical experimental tasks that are the same as the quantum experimental task, and extracting the task name and running data of the quantum experimental task to construct a database index; and storing the experimental results of the quantum experimental task into the historical database, wherein the historical experimental results of the historical experimental task are retrieved according to the database index.
[0097] The reminder module 303 is used to generate a debugging signal and return it to the front-end display platform to provide a debugging reminder when there is a historical experimental task that is the same as the quantum experimental task.
[0098] Furthermore, in this embodiment, the reminder module also includes:
[0099] The retrieval submodule is used to extract historical experimental results of the same historical experimental task as the quantum experimental task.
[0100] The verification submodule is used to verify data fields with identical quantum gate circuit parameters and encoding field parameters in quantum experimental tasks and historical experimental tasks, in order to generate breakpoint prompts.
[0101] The conversion submodule is used to convert breakpoint prompts and historical experimental results into data, and generate debugging signals to be returned to the first and second areas of the front-end display platform;
[0102] The circuit submodule is used to highlight the breakpoint prompts and experimental results when the quantum gate circuit is characterized in the first region for the quantum experimental task, so as to represent them on the quantum gate circuit of the front-end display platform.
[0103] The encoding submodule is used to highlight breakpoint prompts and experimental results when representing the encoded fields of the quantum experimental task using the second region, so as to represent them on the encoded fields of the front-end display platform.
[0104] The execution module 304 is used to execute the quantum experiment task when there is no historical experiment task identical to the quantum experiment task, and return the task results to the front-end display platform.
[0105] Furthermore, in this embodiment, the running module also includes:
[0106] Idle Time Submodule: When the running module does not execute the running task within the preset time, the historical experimental tasks in the storage unit are extracted, and the historical experimental tasks are split into idle time historical tasks in the first time sequence. The idle time historical tasks are then run, and the results of the idle time historical experiments are stored in the storage unit.
[0107] Storage unit 305 is used to store the experimental results of the quantum experiment task.
[0108] To address the aforementioned technical problems, embodiments of this application also provide a computer device. Please refer to [link / reference needed]. Figure 6 , Figure 5 This is a basic structural block diagram of the computer device in this embodiment.
[0109] The computer device 5 includes a memory 51, a processor 52, and a network interface 53 that are interconnected via a system bus. It should be noted that only the computer device 5 with components 51-53 is shown in the figure; however, it should be understood that it is not required to implement all the shown components, and more or fewer components can be implemented alternatively. Those skilled in the art will understand that the computer device described here is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0110] The computer device can be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device can interact with the user via a keyboard, mouse, remote control, touchpad, or voice control.
[0111] The memory 51 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 51 may be an internal storage unit of the computer device 5, such as the hard disk or memory of the computer device 5. In other embodiments, the memory 51 may also be an external storage device of the computer device 5, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 5. Of course, the memory 51 may include both the internal storage unit and its external storage device of the computer device 5. In this embodiment, the memory 51 is typically used to store the operating system and various application software installed on the computer device 5, such as the program code of method X. In addition, the memory 51 can also be used to temporarily store various types of data that have been output or will be output.
[0112] In some embodiments, the processor 52 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. The processor 52 is typically used to control the overall operation of the computer device 5. In this embodiment, the processor 52 is used to run program code stored in the memory 51 or process data, for example, to run the program code for the X method.
[0113] The network interface 53 may include a wireless network interface or a wired network interface, which is typically used to establish communication connections between the computer device 5 and other electronic devices.
[0114] This application also provides another embodiment, namely, providing a computer-readable storage medium storing a visualization debugging program for quantum computing, which can be executed by at least one processor to cause the at least one processor to perform the steps of the visualization debugging method for quantum computing as described above.
[0115] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0116] Obviously, the embodiments described above are only some embodiments of this application, not all embodiments. The accompanying drawings show preferred embodiments of this application, but do not limit the patent scope of this application. This application can be implemented in many different forms; rather, the purpose of providing these embodiments is to provide a more thorough and comprehensive understanding of the disclosure of this application. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing specific embodiments, or make equivalent substitutions for some of the technical features. Any equivalent structures made using the content of this application's specification and drawings, directly or indirectly applied to other related technical fields, are similarly within the scope of patent protection of this application.
Claims
1. A visual debugging method for quantum computing, characterized in that, Includes the following steps: Acquire quantum experimental tasks, analyze the operational data of the quantum experimental tasks, and generate search instructions; According to the search instructions, search the historical database to see if there is a historical experimental task that is the same as the quantum experimental task described. If it exists, a debugging signal will be generated and returned to the front-end display platform to provide debugging reminders; If it does not exist, then execute the quantum experiment task and return the task result to the front-end display platform; The acquisition of the quantum experimental task and the parsing of the operational data of the quantum experimental task specifically include: The operational data of the quantum experiment task is analyzed to obtain the corresponding task characterization parameters, which include quantum gate circuit parameters and encoding field parameters. The quantum experiment task is displayed in a first area and a second area of the front-end display platform according to the task characterization parameters, wherein the first area represents the quantum gate circuit parameters and the second area represents the encoding field parameters.
2. The visualization debugging method for quantum computing as described in claim 1, characterized in that, After analyzing the operational data of the quantum experimental task to obtain the corresponding task characterization parameters, the process further includes: Extract the quantum state measurement parameters of the quantum experimental task from the back-end computing platform, and analyze the quantum state measurement parameters to obtain the corresponding density matrix and quantum state measurement values; The density matrix of the quantum state measurement parameters is characterized using the third region of the front-end display platform; The quantum state measurement value of the quantum state measurement parameter is characterized by the fourth region of the front-end display platform.
3. The visualization debugging method for quantum computing according to claim 1, characterized in that, If the condition exists, a debugging signal is generated and returned to the front-end display platform for debugging reminders, specifically including: Extract historical experimental results from the historical experimental task that is identical to the quantum experimental task described above; Verify that the data fields in the quantum experimental task are identical to the quantum gate circuit parameters and encoding field parameters in the historical experimental task, so as to generate breakpoint prompt data; The breakpoint prompt data and the historical experimental results are converted into data to generate a debugging signal that is returned to the first region and the second region. When using the first region to characterize the quantum experimental task using the quantum gate circuit, the breakpoint prompts and the experimental results are highlighted and rendered to be characterized on the quantum gate circuit; When the second region is used to characterize the quantum experimental task using the encoded field, the breakpoint prompts and the experimental results are highlighted and rendered to represent them on the encoded field.
4. The visualization and debugging method for quantum computing as described in claim 1, characterized in that, After acquiring the quantum experimental task and analyzing the operational data of the quantum experimental task, the process includes: Analyze the call values of qubits in the operation data of the quantum experiment task; If the call value is less than a preset threshold, the quantum experiment task is simulated and the simulation results of the quantum experiment task are returned to the front-end display platform. If the called value is greater than a preset threshold, a search instruction is generated.
5. The visualization debugging method for quantum computing according to claim 1, characterized in that, After the statement that if the quantum experiment task will be executed and the task result will be returned to the front-end display platform if the quantum experiment task does not exist, the statement also includes: Extract the corresponding task characterization parameters, task results, and task names of the quantum experiment task to construct a database index; The experimental results of the quantum experiment are stored in the historical database, wherein historical experimental results of the historical experiment are retrieved according to the database index.
6. A quantum computing visualization and debugging system, characterized in that, include: The parsing module is used to acquire quantum experimental tasks, parse the running data of the quantum experimental tasks, and generate retrieval instructions; The search module is used to construct a database index according to the search instructions, and to search the storage unit for whether there is a historical experimental task that is the same as the quantum experimental task; The reminder module is used to generate a debugging signal and return it to the front-end display platform to remind users when there is a historical experimental task that is the same as the quantum experimental task. A storage unit for storing the experimental results of the quantum experiment task; The execution module is used to determine that there is no historical experimental task identical to the quantum experimental task, execute the quantum experimental task, and return the task result to the front-end display platform. The parsing module includes: An extraction submodule is used to extract the task characterization parameters of the quantum experiment task, including quantum gate circuit parameters and encoded field parameters. The simulation submodule is used to determine when the number of qubit calls in the running data of the quantum experiment task reaches a threshold, so as to simulate the quantum experiment task. The display submodule is used to run and display the quantum experiment task in a first area and a second area in the front-end display platform according to the task characterization parameters, wherein the first area represents the quantum gate circuit parameters and the second area represents the encoding field parameters.
7. A computer device comprising a memory and a processor, wherein the memory stores computer-readable instructions, and the processor, when executing the computer-readable instructions, implements the steps of the visualization debugging method as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the visualization debugging method as described in any one of claims 1 to 5.