CN116384497B - Reading and writing system, related method, device and equipment for quantum computing experimental result - Google Patents

Reading and writing system, related method, device and equipment for quantum computing experimental result Download PDF

Info

Publication number
CN116384497B
CN116384497B CN202310527708.1A CN202310527708A CN116384497B CN 116384497 B CN116384497 B CN 116384497B CN 202310527708 A CN202310527708 A CN 202310527708A CN 116384497 B CN116384497 B CN 116384497B
Authority
CN
China
Prior art keywords
result
experiment
server
bit
preset threshold
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310527708.1A
Other languages
Chinese (zh)
Other versions
CN116384497A (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.)
NATIONAL SUPERCOMPUTING CENTER IN SHENZHEN (SHENZHEN CLOUD COMPUTING CENTER)
Shenzhen Liangxuan Technology Co ltd
Original Assignee
NATIONAL SUPERCOMPUTING CENTER IN SHENZHEN (SHENZHEN CLOUD COMPUTING CENTER)
Shenzhen Liangxuan 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 NATIONAL SUPERCOMPUTING CENTER IN SHENZHEN (SHENZHEN CLOUD COMPUTING CENTER), Shenzhen Liangxuan Technology Co ltd filed Critical NATIONAL SUPERCOMPUTING CENTER IN SHENZHEN (SHENZHEN CLOUD COMPUTING CENTER)
Priority to CN202310527708.1A priority Critical patent/CN116384497B/en
Publication of CN116384497A publication Critical patent/CN116384497A/en
Application granted granted Critical
Publication of CN116384497B publication Critical patent/CN116384497B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • G06N10/40Physical realisations or architectures of quantum processors or components for manipulating qubits, e.g. qubit coupling or qubit control
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application relates to a reading and writing system, a related method, a device and equipment for quantum computing experimental results. The system comprises: the server is used for sending quantum computing experiment instructions; the quantum real client is used for acquiring an experimental result of executing the quantum computing experiment according to the received quantum computing experimental command; if the bit number of the quantum computing experiment is smaller than a first preset threshold value, returning an experiment result to the server, and storing the experiment result in a storage database by the server; if the bit number of the quantum computing experiment is larger than or equal to a first preset threshold value, encoding and compressing the experiment result, uploading the experiment result to the cloud object storage, returning the second preset threshold value number of bit results with the probability of being ranked in front in the storage path of the experiment result in the cloud object storage and the experiment result to the server, and storing the second preset threshold value number of bit results in the storage database by the server. And classifying and storing the experimental result according to the bit number of the quantum computing experiment, and shortening the time consumption of file reading and writing by compression coding, thereby reducing the space required by storage.

Description

Reading and writing system, related method, device and equipment for quantum computing experimental result
Technical Field
The application is suitable for the field of quantum computing, and particularly relates to a reading and writing system, a related method, a device and equipment for quantum computing experimental results.
Background
In the current quantum computing field, a quantum computer has strong quantum information processing capability, and for the current variable information, effective information needs to be extracted from the current variable information to be processed to be new and useful information, and the quantum information needs to be stored and processed firstly, and then the given information is subjected to quantum analysis. The current real quantum computer has only the capability of processing calculation tasks, does not have any storage mechanism, and the result data obtained by calculation can only be stored by a classical computer.
Disclosure of Invention
In order to reduce the read-write time overhead and the memory space overhead of the experimental result, the inventor of the application provides a read-write system, a related method, a device and equipment for quantum computing experimental result.
In a first aspect, an embodiment of the present application provides a read-write system for quantum computing experimental results, where the system includes a server, a quantum real client, a storage database, and cloud object storage;
The server is used for sending quantum computing experiment instructions;
the quantum real machine client is used for acquiring an experiment result of executing a quantum computing experiment according to the received quantum computing experiment instruction;
if the bit number of the quantum computing experiment is smaller than a first preset threshold value, returning the experiment result to the server, and storing the experiment result in a storage database by the server;
and if the bit number of the quantum computing experiment is greater than or equal to the first preset threshold, carrying out encoding compression on the experiment result, uploading the experiment result to a cloud object storage, and returning a storage path of the experiment result in the cloud object storage and bit results with the second preset threshold number with the probability of being ranked in front in the experiment result to the server, wherein the bit results are stored in the storage database by the server.
In one or some optional embodiments, the quantum real client is specifically configured to convert the experimental result data into a projection probability result using a binary encoded key value pair format or using an integer key value pair format;
if the bit number of the quantum computing experiment is more than or equal to a third preset threshold value, multiplying the projection probability result data by 10 n Obtaining a converted experimental result; n is a fourth preset threshold, and the third preset threshold is greater than or equal to the first preset threshold.
In one or some alternative embodiments, the quantum real client, prior to being configured to code compress the experimental results, is further configured to:
if the probability of each bit result in the experimental results is the same or the probability of any bit result in the experimental results is 1, determining the arrangement characteristics of the experimental results and returning the arrangement characteristics to the server, wherein the arrangement characteristics are stored in a storage database by the server.
In one or some optional embodiments, the quantum real client is further configured to determine whether an occupied storage amount of the converted experimental result is greater than a preset storage space threshold;
if yes, byte string splicing is carried out according to the arrangement sequence of the bit results in the converted experimental result until the occupied storage capacity of the spliced bit results is larger than a preset storage space threshold value, and a spliced file is obtained;
re-performing byte string splicing process from the next bit result to obtain a new spliced file;
repeating the above process until the last bit result is spliced to obtain the spliced file.
In one or some optional embodiments, the system further comprises a user client for sending a quantum computing experiment request to the server;
the server is specifically configured to generate a quantum computing experiment instruction according to the quantum computing experiment request.
In one or some alternative embodiments, the system further includes a no service function cluster;
the user client is also used for sending a request for reading the experimental result to the server;
the server is further configured to determine whether the number of bits of the quantum computation experiment corresponding to the read experiment result request is smaller than the first preset threshold;
if yes, reading experimental result data from the storage database and returning the experimental result data to the user client;
if not, judging whether the read experiment result request is a fuzzy search request or not; if not, reading the bit results with the probability sizes ranked in the first preset threshold number from the storage database; if yes, sending a request for acquiring experimental results to the non-service function cluster, and returning a bit result sent by the non-service function cluster to the user client;
and the service-free function cluster is used for generating an acquisition container according to the request for acquiring the experimental result, pulling the corresponding experimental result in the cloud object storage, and returning to the server.
In one or some optional embodiments, the server is specifically configured to determine whether the number of bits of the quantum computation experiment corresponding to the read experiment result request is greater than a fifth preset threshold;
if yes, judging whether the read experiment result request is a fuzzy search request or not; if yes, obtaining bit results which meet the fuzzy search condition and are not more than the second preset threshold number from the storage database; if not, reading the bit results with the probability sizes ranked in the first preset threshold number from the storage database;
if not, judging whether the read experiment result request is a fuzzy search request or not; if yes, obtaining a bit result meeting the fuzzy search condition from the storage database; and if not, acquiring the experimental result.
In one or some optional embodiments, when the number of bits of the quantum computation experiment corresponding to the read experiment result request is greater than the first preset threshold, the no-service function cluster is specifically configured to pull the experiment result corresponding to the cloud object storage, obtain the number of bits of the experiment result that satisfy the fuzzy search condition and are not greater than the second preset threshold, and return to the server.
In one or some optional embodiments, the no-service function cluster is specifically configured to pull at least one spliced file that satisfies the fuzzy search condition from each spliced file of the experimental result, obtain, in the at least one spliced file, a bit result that satisfies the fuzzy search condition and has a probability size ordered in front and is not greater than the second preset threshold number, and return to the server.
In a second aspect, an embodiment of the present application provides a method for storing a quantum computing experimental result, applied to a quantum real client, where the method includes:
obtaining an experimental result of quantum computation according to the received experimental request sent by the server;
if the bit number of the quantum computing experiment is smaller than a first preset threshold value, returning the experiment result to the server, and storing the experiment result in a storage database by the server;
and if the bit number of the quantum computing experiment is greater than or equal to the first preset threshold, carrying out encoding compression on the experiment result, uploading the experiment result to a cloud object storage, and returning a storage path of the experiment result in the cloud object storage and bit results with the second preset threshold number with the probability of being ranked in front in the experiment result to the server, wherein the bit results are stored in the storage database by the server.
In one or some alternative embodiments, the experimental results are code compressed by:
converting the experimental result data into a projection probability result using a binary coded key value pair format or an integer key value pair format;
if the bit number of the quantum computing experiment is more than or equal to a third preset threshold value, multiplying the projection probability result data by 10 n Obtaining a converted experimental result; n is a fourth preset threshold, and the third preset threshold is greater than or equal to the first preset threshold.
In one or some alternative embodiments, prior to encoding the experimental results, further comprising:
if the probability of each bit result in the experimental results is the same or the probability of any bit result in the experimental results is 1, determining the arrangement characteristics of the experimental results and returning the arrangement characteristics to the server, wherein the arrangement characteristics are stored in a storage database by the server.
In one or some alternative embodiments, after obtaining the post-conversion experimental results, the method further comprises:
judging whether the occupied storage amount of the converted experimental result is larger than a preset storage space threshold value or not;
if yes, byte string splicing is carried out according to the arrangement sequence of the bit results in the converted experimental result until the occupied storage capacity of the spliced bit results is larger than a preset storage space threshold value, and a spliced file is obtained;
Re-performing byte string splicing process from the next bit result to obtain a new spliced file;
repeating the above process until the last bit result is spliced to obtain the spliced file.
In a third aspect, an embodiment of the present application provides a storage device for a quantum computing experimental result, applied to a quantum real machine client, including:
the acquisition module is used for acquiring an experimental result of executing a quantum computing experiment according to the received experimental request sent by the server;
the storage module is used for returning the experimental result to the server if the bit number of the quantum computing experiment is smaller than a first preset threshold value, and the server stores the experimental result in a storage database; the method comprises the steps of,
and if the bit number of the quantum computing experiment is greater than or equal to the first preset threshold, carrying out encoding compression on the experiment result, uploading the experiment result to a cloud object storage, and returning a storage path of the experiment result in the cloud object storage and bit results with the second preset threshold number with the probability of being ranked in front in the experiment result to the server, wherein the bit results are stored in the storage database by the server.
In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, for use on a quantum real machine client, having stored thereon a computer program, which when executed by a processor, implements a method for storing results of a quantum computing experiment as described above.
In a fifth aspect, an embodiment of the present application provides a quantum real machine client, including a memory, a processor, and a computer program stored on the memory and capable of running on the processor, where the processor implements a method for storing a quantum computing experimental result as described above when executing the computer program.
In a sixth aspect, an embodiment of the present application provides a computer program product containing instructions, applied to a quantum real client, which when executed on a computer device, causes the computer device to perform a method for storing a result of a quantum computing experiment as described above.
In a seventh aspect, an embodiment of the present application provides a chip applied to a quantum real machine client, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a computer program or instructions to implement a method for storing a quantum computing experimental result as described above.
The technical scheme provided by the embodiment of the application has the beneficial effects that at least:
according to the reading and writing system for the quantum computing experimental result, provided by the embodiment of the application, after the quantum real machine client performs the experiment, the experimental result is classified and stored according to the bit number of the quantum computing experiment, and the encoding compression is performed on the experimental result corresponding to the first preset threshold value or more through the bit number of the quantum computing experiment, so that the time consumption of writing the file is shortened, the size of the file of the experimental result is reduced, the storage space is reduced, a large amount of expenditure of writing operation is avoided, and the storage of the experimental result is facilitated; and the bit number of the quantum calculation experiment is smaller than the experiment result corresponding to the first preset threshold value, and the bit number of the quantum calculation experiment is larger than or equal to the second preset threshold value, which is in front of the probability in the experiment result corresponding to the first preset threshold value, of the experiment results, so that the bit results with the first preset threshold value are stored in the storage database, the result data needed by the user can be directly acquired in the reading process, and the data reading efficiency is improved.
According to the reading and writing system for the quantum computing experimental result, provided by the embodiment of the invention, the experimental result data is converted into the projection probability result of the binary coded key value pair format or the integer key value pair format, so that the operation cost in screening the experimental result is reduced when the subsequent experimental result is read; multiplying the projection probability result data by 10 n The method realizes coding compression, has simple operation process, saves the operation cost of data processing, and improves the efficiency of data processing.
According to the reading and writing system for the quantum computing experimental result, which is provided by the embodiment of the invention, in the instruction execution process of the user client for requesting to read the experimental result, the non-service function cluster is adopted to realize high data reading concurrency of the system, the non-service function cluster is communicated with the server and the cloud object storage, the experimental result in the cloud object storage is returned to the server, and the service flow for independently isolating and reading the experimental result is realized, so that the service flow for reading the experimental result does not influence the normal execution of other services in the system.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims thereof as well as the appended drawings.
The technical scheme of the application is further described in detail through the drawings and the embodiments.
Drawings
Fig. 1 is a schematic structural diagram of a read-write system for quantum computing experimental results according to an embodiment of the present application;
FIG. 2 is a schematic diagram of storage components in a read-write system of quantum computing experimental results according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a preservation flow of a quantum computing experimental result according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a read component in a read-write system for quantum computing experimental results according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a reading flow of a quantum computing experimental result according to an embodiment of the present application;
FIG. 6 is a flow chart of a method for storing results of quantum computing experiments according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a storage device for quantum computing experimental results according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in the present description and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
Furthermore, the terms "first," "second," "third," and the like in the description of the present specification and in the appended claims, are used for distinguishing between descriptions and not necessarily for indicating or implying a relative importance.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
It should be understood that the sequence numbers of the steps in the following embodiments do not mean the order of execution, and the execution order of the processes should be determined by the functions and the internal logic, and should not be construed as limiting the implementation process of the embodiments of the present application.
In order to illustrate the technical scheme of the application, the following description is made by specific examples.
In operation, the inventors have found that in the prior art, quantum computing experimental result data is typically represented by state vectors (e.g., [ 0.71+0.j-0.71+0.j0. +0.j ]), or projection probabilities (e.g., { '10':503, '11':521 }), which are stored in a JSON format in a computer. When the data is stored by a classical computer, the data file of the quantum computing experimental result represented by the state vector or the projection probability is larger, the data of the quantum computing experimental result is stored by using a common JSON format, and when the number of bits of the experiment is increased, the data volume can be exponentially increased, and the volume of the result data can be doubled every time one bit is increased due to the characteristic of quantum computing. For example, 24 bits of experimental data may reach over 500 MB. The write and read operations consume a long time, resulting in low read and write efficiency, and occupy a large memory space, and the write and read operations are costly. In the prior art, in actual operation, the memory occupied when viewing and processing such a large amount of data seriously hinders the normal operation of other tasks in a computer, and particularly when a use scene is that a provider provides quantum computing service for a user through a webpage or a scientific research person hopes to compare the results of a large amount of experiments, a large amount of experiment result files can hinder the parallel operation of the tasks, reduce the working efficiency and cannot meet the read-write expectation of the inventor on the quantum computing experiment result data. Based on the above, the inventor further develops and makes the application, and provides a reading and writing system, a related method, a device and equipment for quantum computing experimental results.
Example 1
Referring to fig. 1, which is a schematic structural diagram of a read-write system for quantum computing experimental results according to an embodiment of the present application, referring to fig. 1, the read-write system for quantum computing experimental results may include: the system comprises a server 1, a quantum real client 2, a storage database 3 and a cloud object storage 4; wherein:
the server 1 is used for sending quantum computing experiment instructions;
the quantum real machine client 2 is configured to obtain an experiment result of executing a quantum computing experiment according to the received quantum computing experiment instruction;
if the bit number of the quantum computing experiment is smaller than a first preset threshold value, returning the experiment result to the server 1, and storing the experiment result in a storage database 3 by the server 1;
if the number of bits of the quantum computing experiment is greater than or equal to the first preset threshold, carrying out encoding compression on the experiment result, uploading the experiment result to a cloud object storage 4, and returning a storage path of the experiment result in the cloud object storage 4 and a second preset threshold number of bit results with the earlier probability sizes in the experiment result to the server 1, wherein the bit results are stored in the storage database 3 by the server 1.
In an embodiment, the read-write system of the quantum computing experimental result further comprises a user client 5, configured to send a quantum computing experimental request to the server 1;
The server 1 is specifically configured to generate a quantum computing experiment instruction according to the quantum computing experiment request.
It should be appreciated that the number of servers 1, quantum real clients 2, storage databases 3, cloud object stores 4, and user clients 5 in fig. 1 are merely illustrative. There may be any number of servers 1, quantum real clients 2, storage databases 3, cloud object stores 4, and user clients 5, as desired for implementation.
In the embodiment of the invention, the specific functions of each component part of the reading and writing system of the quantum computing experimental result are realized as follows:
user client 5: the user client 5 may be a web page client, and the user accesses a web page of the server 1 through a browser, so as to receive a quantum computing experiment request of the user, send the request to the server 1, and receive a corresponding result returned by the server 1. In the embodiment of the present invention, the communication between the user client 5 and the server 1 may be HTTP protocol, and the data format is JSON. In some embodiments, the user client 5 may further receive a result of adding, deleting, modifying or querying the quantum experiment by the server 1 based on a received request initiated by the user to add, delete, modify or query the quantum experiment, and send the corresponding request to the server 1. The user client 5 can display the results corresponding to different requests through various built-in applications.
Server 1: and receiving a quantum computing experiment request sent by the user client 5, generating a quantum computing experiment instruction, and sending the quantum computing experiment instruction to the quantum real client 2. And receiving a request of the user client 5 for adding, deleting, modifying or inquiring the quantum experiment, and returning a corresponding result to the user client 5. Scheduling quantum physics machines to accomplish experimental tasks based on the requests of user clients 5 is also an important part of their work.
Quantum real client 2: for desktop programs, the quantum real machine client 2 is connected with the quantum physical real machine, for example, through a USB connection, and when the quantum real machine client receives a generated quantum calculation experiment instruction sent by the server 1, the quantum real machine client is responsible for sending the quantum calculation experiment instruction to the quantum physical real machine and monitoring the state of the quantum physical real machine. And the quantum physical machine is operated by the quantum machine client 2 to complete the experiment, and the quantum calculation experiment result returned by the quantum physical machine is received. The quantum real client 2 judges the quantum computing experimental bit number, stores experimental results according to whether the quantum computing experimental bit number is smaller than a first preset threshold value, and specifically comprises the following steps: if the bit number of the quantum computing experiment is smaller than a first preset threshold value, returning the experiment result to the server 1, and storing the experiment result in a storage database 3 by the server 1; if the number of bits of the quantum computing experiment is greater than or equal to the first preset threshold, carrying out encoding compression on the experiment result, uploading the experiment result to a cloud object storage 4, and returning a storage path of the experiment result in the cloud object storage 4 and a second preset threshold number of bit results with the earlier probability sizes in the experiment result to the server 1, wherein the bit results are stored in the storage database 3 by the server 1. In the embodiment of the present invention, the communication between the quantum real client 2 and the server 1 may be WebSocket protocol, and the data format is JSON.
Storage database 3: is a relational database, such as mysql database, for storing small-volume business data that needs to be read and written quickly. In this embodiment, the method is used to store a quantum computing experiment result that the number of bits of the quantum computing experiment is smaller than a first preset threshold, and store a second preset threshold number of bit results that the probability size is ordered before in the quantum computing experiment result when the number of bits of the quantum computing experiment is greater than or equal to the first preset threshold. In the embodiment of the invention, when the bit number of the quantum computing experiment is greater than or equal to a first preset threshold value, the bit result with the second preset threshold value number, the probability of which is sequenced in the front, in the quantum computing experiment result is the default display result in the quantum computing experiment result.
Cloud object store 4: and when the bit number of the quantum computing experiment is larger than or equal to a first preset threshold value, the cloud object storage system is used for storing result data obtained after encoding and compressing the experiment result. Of course, during specific use, it may also store large data files that other storage databases 3 cannot store.
In this embodiment, after receiving an experiment instruction sent from the server 1, the quantum real machine client 2 sends the experiment instruction to a quantum physical real machine connected through a USB, the quantum physical real machine executes an experiment, and after the quantum real machine client 2 obtains an experiment result obtained by calculation of the quantum physical real machine, the quantum real machine client stores and processes an implementation result. Since the quantum real client 2 can perform only one experiment at a time, there is no concurrency problem in executing the experiment instruction from the server 1.
After analyzing the specific use scene of quantum computation, the inventor finds that under the use scene of the mainstream quantum algorithm such as Grover, the user only concerns the final measurement results with the maximum probability after measurement or with larger probability; the number of large-bit experimental results is far greater than the number that can be browsed by naked eyes at one time, and a user generally only selects an interested part to view. At the user client 5 we therefore decide to take results data which is only presented to the user once in an amount of the second preset threshold. In order to ensure the response speed of the user when reading the default second preset threshold number of results, the quantum real machine client side 2 also returns the second preset threshold number of bit results with the probability of being ranked in front in the experimental results with the bit number exceeding the first preset threshold to the server 1, and the bit results are stored in the storage database 3 by the server 1, so that the quick query is convenient. The second preset threshold is customized according to actual use requirements, and 256 pieces of data are displayed by default if the second preset threshold is defined, so that the user can browse the data at one time. The total amount of experimental results, i.e., the total amount of experimental results data, may be generally referred to as experimental results data or experimental results in this embodiment.
In this embodiment, referring to fig. 2, taking a first preset threshold value of 15bits, a second preset threshold value of 256, and a storage database of mysql as an example, the storage procedure of the quantum computation experiment result in the embodiment of the present invention is described in detail as follows:
in the process of storing the quantum computing experimental result, a user client 5 (may be a web page client) submits an experimental request to a server 1, the server 1 sends the experiment to a quantum real client 2 for execution, and then the quantum real client processes the result. Uploading data with the probability of more than or equal to 15bits to the cloud object storage 4, and returning the storage path of the experimental result in the cloud object storage 4 and 256 results with the highest probability in the experimental result to the server 1 to be stored in a mysql database; data smaller than 15bits are returned directly to the server 1 and stored in the mysql database.
In an embodiment, the quantum real client 2 is specifically configured to convert the experimental result data into a projection probability result in a binary coded key value pair format;
if the number of bits of the quantum computing experiment is greater than or equal to the third preset threshold value, multiplying the projection probability result data by 10 n Obtaining a converted experimental result; n is a fourth preset threshold, and the third preset threshold is greater than or equal to the first preset threshold.
In this embodiment, the inventors have found that, in general, the result of the quantum computation experiment is represented by a state vector or a projection probability in the form of a floating point number list or a dictionary. In this embodiment, the result of the quantum computation experiment is represented by using the projection probability of the binary-coded key value to the format, and the specific format is as follows:
the keys in the key-value pair are one possible final measurement, and when one bit is finally measured, the result is possibly 0 or 1, so the keys are represented by a binary string of length c, where c is the total number of bits for performing the quantum computation experiment. Here we use a low set expression, i.e. 0001, to mean that finally 4 bits are measured, the measurement result of the first three bits is 0, the measurement result of the last bit is 1 (a high set expression, i.e. 0001, means that the measurement result of the first bit is 1 and the measurement result of the last three bits is 0), in reverse order. When measuring 4 bits, since there are two possibilities of 0 and 1 for each bit measurement, there are 16 possibilities of the final measurement, i.e. 0000 for the key and 16 for the 0001 … 1111 total. The value corresponding to each key is the probability of this final measurement. The sum of all probabilities is 1. The measurement results of e.g. a 4-bit experiment may be as follows:
{0000: 0, 0001: 0.5, 0010: 0, 0011: 0,0100: 0, 0101: 0.5, 0110: 0, 0111: 0,1000: 0, 1001: 0, 1010: 0, 1011: 0,1100: 0, 1101: 0, 1110: 0, 1111: 0};
From the above measurement results, it can be seen that the final results were each 50% in probability of 0001 and 0101, and the remaining results were 0 in probability.
In another embodiment, the inventors have found that in computer coding, when binary storage is involved, it is often more efficient to store integer types (including short integer, long integer) than string types. In the case of C++, a short integer (short) of 2 bytes can satisfy the expression-2 15 To 2 15 All integers between-1, while one character (char) requires 1 byte, so the string "0000" requires 4 bytes. Thus, if 0000 to 1111 are used to express a key of 4-bit result, 4×16=64 bytes are required.
Based on this, in order to save storage space, in this embodiment, the experimental result data may be converted into a projection probability result using an integer type key value pair format, and the measurement result of the 4-bit experiment represented by the stored integer type is as follows:
{0: 0, 1: 0.5, 2: 0, 3: 0, 4: 0, 5: 0.5, 6: 0, 7: 0, 8: 0, 9: 0, 10: 0, 11: 0, 12: 0, 13: 0, 14: 0, 15: 0};
as can be seen from the above measurement results, the storage format of the binary string is replaced by the short integer, and only 2×16=32 bytes are needed to represent all keys, so that the storage space of the experimental result is saved to a great extent.
For another example, when using a key value pair format to express an experimental result of 15 bits, using a character string as a key would require 15 x 2 15 Bytes, while using short integer as key only requires 2 x 2 15 And a number of bytes.
In this embodiment, the integer type is the integer type, and the integer variable may include a short integer, a basic integer, and a long integer. The implementation of the different types of integer variables may be referred to in the art as detailed description and is not specifically limited herein.
Based on the above experimental result data format, the inventors propose that the quantum computing experimental result with the number of bits greater than the first preset threshold can be compressed by the quantum real client 2 by:
and replacing a projection probability result of the JSON mode by using the msgpack serialization mode to obtain a projection probability result of the msgpack code. The projection probability result of msgpack coding can effectively achieve the effects of reducing file volume and accelerating the serialization and deserialization speeds. For example, the inventors found that the JSON serialization file of the experimental result of the 24-bit quantum computation experiment has 587MB, and the writing object storage time is 42s, and the reading time is 1min30s; and the msgpack is used for serializing the file with the size of only 235MB, the writing time is only 1.5s, and the reading time is only 7s. It should be noted that in the specific implementation of the quantum computing experimental result storage process, the msgpack data is only used for storing the result file, and the JSON is still used for the communication data format of each part of the system, because the data volume finally returned to the user is not required to be so large, the user can not look over the data, and under the condition of a small amount of data, the JSON is easier to analyze and understand, so that low delay can be ensured when the experimental result is displayed on the webpage.
As the number of experimental bits increases, the 0 of the leading bit increases with a smaller probability, for example, when the probability that all bits are finally measured is the same, the probability that each bit is measured in a 4-bit experiment is 0.0625, and the probability that each bit is measured in a 20-bit experiment is 0.000000953674. Therefore, for experiments with a number of bits greater than or equal to the third preset threshold, all probability results can be multiplied by 10 n Where n is a fourth preset threshold and this n is noted in the msgpack serialization result, the redundant 0 storage can be reduced. Results that would otherwise require a double-precision floating-point representation of 8 bytes can also be represented using an integer of 4 bytes or a single-precision floating-point representation after using this operation, further reducing the space required for storage. The third preset threshold value is greater than or equal toAnd at a first preset threshold value.
In this embodiment, the third preset threshold and the fourth preset threshold may be set according to actual requirements, and the description is given below taking the third preset threshold as 20 and the fourth preset threshold as 7 as an example:
the experimental results of the 20-bit raw projection probability format are as follows:
{0:0.000000953674, 1:0.000000953674…1048575:0.000000953674, 1048576:0.000000953674};
here, we set the fourth preset threshold to 7 according to the experimental result of the original projection probability format, if we multiply all probabilities by 10 7 The obtained experimental result after conversion becomes:
{ multi:7, 0: 9.53674, 1:9.53674…1048575:9.53674, 1048576:9.53674}
compared with the original experimental result in the projection probability format, the obtained experimental result after conversion reduces redundant 0 storage, and the byte length is shortened a lot.
In an alternative embodiment, the quantum real client 2, before being used for encoding and compressing the experimental result, is further used for:
if the probability of each bit result in the experimental results is the same or the probability of any bit result in the experimental results is 1, determining the arrangement characteristics of the experimental results and returning to the server 1, and storing the arrangement characteristics in the storage database 3 by the server 1.
In this embodiment, for a specific circuit diagram operation or result arrangement, for example, the probability of each bit in the experimental result is the same, or only a single bit probability is 1. In this case, only the ranking features may be recorded and returned to the server 1, and when the user reads, the server 1 only transmits specific ranking features to the user client 5, and the specific result is calculated by the user client 5 according to the ranking features and the experimental bit number. If the result of the quantum calculation is found to be 1/2 m Where m is the number of experimental bits, only the label [ all equivalent ] can be saved without saving long key-value pair data, the user guest After the client 5 obtains the label of all equivalent, it knows that the probability of each result is 1/2 m . This avoids a significant overhead for writing and reading operations. It should be noted that, the inventors found that this situation occurs relatively rarely under the current quantum real computing conditions, because the probability that the noise of the computing result is easy to be equal in theory is slightly different in practical experiments, but the quantum computing error correction technology may have a greater effect in the future after being greatly developed.
In this embodiment, the quantum real client 2 is further configured to determine whether an occupied storage amount of the converted experimental result is greater than a preset storage space threshold;
if yes, byte string splicing is carried out according to the arrangement sequence of the bit results in the converted experimental result until the occupied storage capacity of the spliced bit results is larger than a preset storage space threshold value, and a spliced file is obtained;
re-performing byte string splicing process from the next bit result to obtain a new spliced file;
repeating the above process until the last bit result is spliced to obtain the spliced file.
In this embodiment, after encoding and compressing the large-bit quantum computing experimental result data in the above manner, the quantum real client 2 may further store the data file occupying the storage space exceeding the preset space threshold in a blocking manner when uploading the data file to the cloud object storage 4. The preset space threshold is customized according to the actual use requirement, and the specific operation process of partitioning the data file is as follows:
Byte string splicing is carried out according to the experimental result after encoding compression, namely the arrangement sequence of bit results in the experimental result after conversion until the occupied storage capacity of a plurality of spliced bit results is larger than a preset storage space threshold value, so as to obtain a spliced file;
re-performing byte string splicing process from the next bit result to obtain a new spliced file;
repeating the above process until the last bit result is spliced to obtain the spliced file. The spliced file is a file stored in a blocking mode.
And converting the experimental result data into a plurality of different spliced files, namely carrying out block serialization on the experimental result to obtain the compressed and block serialized experimental result.
Taking a 4-bit quantum computing experiment as an example, if a preset storage space threshold is set to be 200MB, continuously splicing the results of '0:0, 1:0.25', and the like from the key equal to 0 to the msgpack byte string, if the size of the byte string exceeds 200MB by 7 (in practical cases, the 4-bit result is far smaller than 200MB, which is an example, the byte string is taken as a file to be uploaded to the cloud object storage 4, and from the next bit result, which is an example, the next byte string is spliced from the next 8. In general, the user only views the data in a specific section, so that after the above processing, when the user reads according to the condition, the user can not load irrelevant files. By means of the storage mode, the number of pulled data files can be reduced when an experiment result is read, for example, when a 4-bit quantum computing experiment is carried out, one spliced file is stored for the result with keys equal to 0 to 7, and another spliced file is stored for the result with keys equal to 8 to 15, and at the moment, if a user only wants to check the probability that the last state is 0001, namely, the corresponding value of the key is equal to 1, only the first spliced file is needed to be read, and the second spliced file is not needed to be read.
Of course, if the quantum real client 2 determines that the storage amount occupied by the converted experimental result data does not exceed the preset space threshold, the above-mentioned blocking operation is not needed, and the converted experimental result is directly uploaded to the cloud object storage 4.
In this embodiment, referring to fig. 3, taking an example that a first preset threshold is 15bits, a second preset threshold is 256, and a preset storage space threshold is 200MB, a detailed description is given of a process of storing a quantum computing experimental result in the embodiment of the present invention as follows:
the quantum real client 2 judges the number of experimental bits of quantum calculation;
if the bit number of the quantum calculation experiment is smaller than a first preset threshold value, directly returning the obtained quantum calculation experiment result to the server 1, and then storing all results of the quantum calculation experiment result in a storage database 3, namely a mysql database by the server 1;
if the number of the quantum calculation experimental bits is greater than a first preset threshold, encoding and compressing the experimental result, storing the block serialization and compression total result, namely the compressed and block serialization experimental result, into a cloud object storage 4, and returning the second preset threshold number of bit results with the highest probability of the experimental result in the storage path of the cloud object storage 4 and the experimental result, namely the 256 final measurement results with the highest probability of extraction, to the server 1, wherein the server 1 stores the storage database 3, namely a mysql database.
In this embodiment, when the number of the quantum computing experimental bits is large, the quantum real clients 2 transmit the total quantum computing experimental results to the server 1 at the same time, which may cause the memory overflow of the server 1, so the inventors propose to put the part of the written experimental results on the quantum real clients 2 as the final step of executing the quantum computing experiment, so as to avoid the memory overflow of the server 1.
In a specific embodiment, if the number of bits of the quantum computation experiment is greater than or equal to the first preset threshold, the experiment result is converted into a projection probability result using an integer key value to the format, and if the number of bits of the quantum computation experiment is less than the first preset threshold, the experiment result is converted into a projection probability result using a binary coded key value to the format. Namely, the cloud object storage 4 stores therein the post-conversion experimental result obtained by converting the projection probability result of the format using the integer key value pair, and the storage database 3 stores therein the post-conversion experimental result obtained by converting the projection probability result of the format using the binary coded key value pair.
The inventors have found that with the increase of bits, a full amount of result data of less than 30 bits reaches the GB level, and the read-write speed reaches the second level. The tasks are complicated and can severely occupy resources to cause other service paralysis, based on the fact that the inventor proposes that when the quantum computing experiment result is read, the business processes of reading and writing the big-bit experiment result are isolated independently, other businesses (such as creating experiments) are not influenced by the business processes, the business functions of reading the big-bit experiment result are placed in a non-service function cluster, and each time of calling is carried out by an independent container, so that resources are not preempted. Specifically, referring to fig. 4, a schematic structural diagram of a read-write system for quantum computing experimental results in combination with fig. 1 is shown, where the read-write system for quantum computing experimental results further includes a no-service function cluster 6;
The user client 5 is further configured to send a request for reading the experimental result to the server 1;
the server 1 is further configured to determine whether the number of bits of the quantum computation experiment corresponding to the read experiment result request is smaller than the first preset threshold, so as to implement a case-by-case read experiment result:
if yes, reading experimental result data from the storage database 3 and returning to the user client 5;
if not, judging whether the read experiment result request is a fuzzy search request or not; if not, reading the bit results with the probability sizes ranked in the first second preset threshold number in the experimental results from the storage database 3; if yes, sending a request for acquiring experimental results to the non-service function cluster 6, and returning a bit result sent by the non-service function cluster 6 to the user client 5;
and the service-free function cluster 6 is used for generating an acquisition container according to the request for acquiring the experimental result, pulling the corresponding experimental result in the cloud object storage 4, and returning to the server 1.
In a specific implementation, the server 1 is specifically configured to determine whether the number of bits of the quantum computation experiment corresponding to the read experiment result request is greater than a fifth preset threshold;
If yes, judging whether the read experiment result request is a fuzzy search request or not; if yes, obtaining bit results which meet the fuzzy search condition and are not more than the second preset threshold number from the storage database 3; if not, reading the bit results with the probability sizes ranked in the first second preset threshold number in the experimental results from the storage database 3;
if not, judging whether the read experiment result request is a fuzzy search request or not; if yes, obtaining a bit result meeting the fuzzy search condition from the storage database 3; and if not, acquiring the experimental result.
Correspondingly, when the number of bits of the quantum computing experiment corresponding to the read experiment result request is greater than the first preset threshold, the service-free function cluster 6 is specifically configured to pull the experiment result corresponding to the cloud object storage 4, obtain the bit result which meets the fuzzy search condition and is not greater than the second preset threshold in the experiment result, and return to the server 1.
In a specific embodiment, the no-service function cluster 6 is specifically configured to pull at least one spliced file that satisfies the fuzzy search condition from each spliced file of the experimental result, obtain, from the at least one spliced file, bit results that satisfy the fuzzy search condition and have probability sizes ordered in front and are not greater than the second preset threshold number, and return the bit results to the server 1.
In this embodiment, the reading request sent by the user client 5 may be a part of the experimental results of reading default, or may be an experimental result within the range of reading the fuzzy search condition by means of fuzzy search. For example, in the case of a 4-bit quantum calculation experiment, the last state (quantum state at the end of the experiment) of all the bits in the experimental result data is represented by 0000 to 1111, for example, 0001 indicates that the values obtained after the first three bits are all 0, and the value obtained after the last bit is 1. The business flow of fuzzy search is formulated as follows, for example, when a 4-bit quantum computation experiment is performed, if a user wants to see the result that the first two bits are 0, the fuzzy search request is "00", where 0 or 1 represents any last state.
In this embodiment, after receiving a request from the user client 5 to read the experimental result, the server 1 determines whether the number of bits of the corresponding quantum computation experiment is smaller than a first preset threshold, and the determination flow is as follows:
if the result is smaller than the first preset threshold value, the server 1 reads the experimental result from the storage database 3. At this time, the full amount of experimental result data is not directly returned to the user client 5, and whether the bit number of the corresponding quantum calculation experiment is smaller than or equal to a fifth preset threshold value is also required to be judged;
If the bit number of the quantum computing experiment is smaller than or equal to a fifth preset threshold value, judging whether a reading experiment result request sent by the user client 5 is a fuzzy search request or not;
if the fuzzy search request is received, the server 1 acquires all bit results meeting the fuzzy search condition from the storage database 3 and returns the bit results to the user client 5;
if the search request is not a fuzzy search request, the server 1 acquires full experimental results from the storage database 3 and returns the full experimental results to the user client 5;
if the bit number of the quantum computing experiment is larger than a fifth preset threshold value, judging whether the reading experiment result request sent by the user client 5 is a fuzzy search request or not;
if the fuzzy search request is received, the server 1 acquires bit results which meet the fuzzy search condition and are not more than a second preset threshold number from the storage database 3 and returns the bit results to the user client 5;
if the search request is not a fuzzy search request, the server 1 acquires a second preset threshold number of bit results with the earlier probability orders in the experimental results from the storage database 3, and returns the bit results to the user client 5.
In this embodiment, referring to fig. 5, taking an example that a first preset threshold is 15bits, a second preset threshold is 256, a fifth preset threshold is 8bits, and a storage database is a mysql database, a process of quantum computation experimental results of reading bits less than the first preset threshold in the embodiment of the present invention is described in detail as follows:
When the number of bits of the quantum experiment is less than 15, the server 1 reads the experimental result from the mysql database. At this time, the server 1 further judges that the number of quantum experiment bits is less than or equal to 8, if the result satisfies the fuzzy search condition if the fuzzy search request is received, if not, all the results are received; when the number of the quantum experiment bits is more than 8, the server 1 returns 256 results with the highest probability of meeting the fuzzy search condition if the fuzzy search request is made, and returns 256 results with the highest probability if the fuzzy search request is not made.
In this embodiment, the magnitudes of the second preset threshold and the fifth preset threshold may be selected according to actual situations, and the magnitude of the fifth preset threshold may be determined according to the second preset threshold. For example, if the second preset threshold Q is 2 q The fifth preset threshold may be set to q, in the above embodiment, the second preset threshold is set to 256, and the fifth preset threshold is set to 8bits, so that the experimental results corresponding to the quantum test bit less than or equal to 8bits do not need to be filtered, a full amount of experimental results are shown to the user, and when the quantum test bit is greater than 8bits, 256 results with highest probability or 256 results with highest probability of meeting the fuzzy search condition in the full amount of experimental results are shown to the user. For another example, if the second preset threshold Q is greater than 2 q And less than 2 q+1 When the fifth preset threshold is determined, a round-down function ceil (log (Q, 2)) may be used, where ceil () represents a round-down function, log () is a logarithmic function, and thus the fifth preset threshold is determined to be Q, for example, the second preset threshold is set to 300, and then the fifth preset threshold may be determined to be 8 based on the round-down function, so that when the quantum test bit is less than or equal to 8bits, the experimental result corresponding to 8bits does not need to be screened, a full amount of experimental results are displayed to the user, and when the quantum test bit is greater than 8bits, 300 results with highest probability or 300 results with highest probability that the fuzzy search condition is satisfied in the full amount of experimental results are displayed to the user.
In this embodiment, when the server 1 determines that the number of bits in the corresponding quantum computation experiment is greater than or equal to the first preset threshold, it further determines whether the request for reading the experiment result is a fuzzy search request, if not, the server 1 directly obtains the number of bits in the second preset threshold with the probability of being ranked in the front in the experiment result in the storage database 3, and returns the number of bits to the client 5; if yes, the server 1 sends a request for acquiring the experimental result to the no-service function cluster 6, and returns the bit result sent by the no-service function cluster 6 to the user client 5. Referring to fig. 4, the service-free function cluster 6 schedules each working node (i.e., each container generated) through the control node and/or gateway to concurrently read the experimental result, and includes 3 working nodes, i.e., working node 1, working node 2 and working node 3 in fig. 4.
Here, the service-free function cluster 6 is an elastic function service cluster independent of the server 1, and is responsible for screening out the part needed to be presented to the user from the big-bit experimental result. This implementation can isolate this function from other functions on the server 1, so that it does not rob computing resources of other functions, thereby implementing concurrent file reading. The communication between the no service function cluster 6 and the server 1 is the HTTP protocol, and the data format is JSON.
Because the storage path of the experimental result in the cloud object storage 4 is included in the experimental result obtaining request sent by the server 1, after receiving the experimental result obtaining request sent by the server 1, the serverless function cluster 6 generates a new container, and is used for pulling the corresponding experimental result in the cloud object storage 4 through the network request according to the storage path of the experimental result in the cloud object storage 4, obtaining bit results which are not more than the second preset threshold number and meet the fuzzy search condition in the experimental result, and returning the bit results to the server. The screening algorithm in this container was optimized from tens of seconds to 6-7 seconds by concurrent searching. The method comprises the following specific steps:
Assuming that the user wishes to find the first and third 6-bit experimental results with bits 0, his input is "0*0", the specific algorithm implementation is as follows:
a. finding the number of "+" in the fuzzy search string, here 4;
b. traversing to generate all permutation combinations of 0000 through 1111;
c. c, the result of the step b is embedded back into the original fuzzy search character string to obtain a plurality of character strings such as 000000, 010000 and the like;
d. retrieving key-value pairs from stored experimental results that match the result in c, e.g., { 000000:0, 010000:0.25 … }
Before executing step d, if the cloud object storage 4 stores the converted experimental result obtained by converting the projection probability result using the integer key value pair format, the integer of each character string obtained in the step can be obtained first, then step d is executed, that is, a plurality of character strings such as 000000, 010000 are converted into a plurality of integer types such as 0, 16, and then the key value pair of which the key corresponds to the result in c is taken out from the stored experimental result, for example { 0:0, 16:0.25 … }.
Step d may change the complexity of obtaining values satisfying the screening condition to O (1), so the inventors propose to store the projection probability result in key-value pairs instead of a list, since the complexity required to search the list for a eligible result is O (2 m ) M is the experimental bit number, so that the bit result which the user wants to screen is inconvenient to obtain.
In this embodiment, the steps c and d may be performed concurrently, for example, one thread performs the embedding and searching of 0000 to 0111, and the other thread performs the embedding and searching of 1000 to 1111, and according to the current evaluation, 19 bits start concurrency performance is better than serial traversal (serial performs better than parallel when the number of permutation and combination is small because CPU overhead is also required to recover the results of all parallel threads). In this way, the search for a eligible key can be performed faster than directly in the stored results, since the time complexity of the overall search is O (2 m ) Where m is the number of experimental bits, and the time complexity in this scheme is O (2 r ) Where r is the number of "×" in the fuzzy search.
It should be noted that, the number of containers in the above-mentioned no-service function cluster 6 may be elastically expanded according to the number of concurrent requests, for example, a default 1 container is set, and if the number of requests per second is greater than 10, 2 containers are started, where the containers do not affect the server 1 to process other service requests, so as to solve the performance dilemma in a high concurrency scenario.
When the no-service function cluster 6 receives the request for reading the experimental result sent by the server 1, screening is performed in the above manner, the spliced files meeting the conditions are pulled from the cloud object storage 4, all the spliced files are not needed to be pulled, the screened results are ordered, and finally the bit results with the probability of being ordered in the front and with the second preset threshold number in the experimental results are returned to the server 1. Furthermore, the no service function cluster 6 also provides logic to handle requests without fuzzy searches, but in the case of practical applications this part of the logic is not expected to be invoked. Since the second preset threshold number of bit results with the earlier probability sizes among the experimental results should have been returned to the server 1 already in the storage phase, the stored by the server 1 in the storage database 3.
In this embodiment, referring to fig. 5, a detailed description is given of a process of quantum computing experimental results of the number of read bits greater than or equal to a first preset threshold according to an embodiment of the present invention, as follows:
when the server 1 judges that the quantum experiment bit number is more than or equal to 15bits, continuously judging whether the fuzzy search is performed, if not, directly acquiring 256 results with highest probability in the experiment results in the storage database 3 by the server 1, and returning the 256 results to the client 5; if yes, the service-free function cluster 6 is requested to read, the service-free function cluster 6 pulls all spliced files meeting the fuzzy search condition according to the storage path of the experimental result in the cloud object storage 4 to screen, and 256 results with highest probability of meeting the fuzzy search condition are returned.
Example two
Based on the same inventive concept, the embodiment of the invention also provides a method for storing the quantum computing experimental result, which is applied to the quantum real machine client 2, and is shown with reference to fig. 6, and the method comprises the following steps:
s601: according to the received experiment request sent by the server 1, obtaining an experiment result for executing quantum computation;
s602: if the bit number of the quantum computing experiment is smaller than a first preset threshold value, returning the experiment result to the server 1, and storing the experiment result in a storage database 3 by the server 1;
S603: if the number of bits of the quantum computing experiment is greater than or equal to the first preset threshold, carrying out encoding compression on the experiment result, uploading the experiment result to a cloud object storage 4, and returning a storage path of the experiment result in the cloud object storage 4 and a second preset threshold number of bit results with the earlier probability sizes in the experiment result to the server 1, wherein the bit results are stored in the storage database 3 by the server 1.
In one embodiment, the experimental results are code compressed by:
converting the experimental result data into a projection probability result in a binary coded key value pair format;
if the number of bits in the quantum computing experiment is greater than or equal to the third preset threshold value, multiplying the projection probability result data of the key value pair format using binary coding by 10 n Obtaining a converted experimental result; n is a fourth preset threshold, and the third preset threshold is greater than or equal to the first preset threshold.
In an embodiment, before the encoding compression is performed on the experimental result, the method for storing the quantum computing experimental result further includes:
if the probability of each bit result in the experimental results is the same or the probability of any bit result in the experimental results is 1, determining the arrangement characteristics of the experimental results and returning to the server 1, and storing the arrangement characteristics in the storage database 3 by the server 1.
In an embodiment, after the post-conversion experimental result is obtained, the method for storing the quantum computing experimental result further includes:
judging whether the occupied storage amount of the converted experimental result is larger than a preset storage space threshold value or not;
if yes, byte string splicing is carried out according to the arrangement sequence of the bit results in the converted experimental result until the occupied storage capacity of the spliced bit results is larger than a preset storage space threshold value, and a spliced file is obtained;
re-performing byte string splicing process from the next bit result to obtain a new spliced file;
repeating the above process until the last bit result is spliced to obtain the spliced file.
In the second embodiment, the detailed description about the quantum real client 2 in the read-write system of the quantum computing experimental result in the first embodiment can be referred to for the specific implementation process of the storage method of the quantum computing experimental result, and the details are repeated, and are not repeated here.
Example III
Based on the same inventive concept, the embodiment of the present invention further provides a storage device for quantum computing experimental results, applied to the quantum real machine client 2, as shown in fig. 7, where the device includes:
an obtaining module 701, configured to obtain an experimental result of performing a quantum computation experiment according to the received experiment request sent by the server 1;
A storage module 702, configured to return the experimental result to the server 1 if the number of bits in the quantum computation experiment is less than a first preset threshold, where the experimental result is stored in a storage database by the server 1; the method comprises the steps of,
if the number of bits of the quantum computing experiment is greater than or equal to the first preset threshold, carrying out encoding compression on the experiment result, uploading the experiment result to a cloud object storage 4, and returning a storage path of the experiment result in the cloud object storage 4 and a second preset threshold number of bit results with the earlier probability sizes in the experiment result to the server 1, wherein the bit results are stored in the storage database by the server 1.
It should be noted that, because the content of information interaction and execution process between the modules and the embodiment of the method of the present application are based on the same concept, specific functions and technical effects thereof may be referred to in the method embodiment section, and details thereof are not repeated herein.
Example IV
Based on the same inventive concept, the embodiments of the present application also provide a computer readable storage medium applied to a quantum real client, on which a computer program is stored, which when executed by a processor, implements a method for storing a quantum computing experimental result as described in the second embodiment above.
Example five
Based on the same inventive concept, the embodiment of the application also provides a quantum real machine client, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the storage method of the quantum computing experimental result described in the second embodiment is realized when the processor executes the computer program.
Example six
Based on the same inventive concept, the embodiments of the present application also provide a computer program product containing instructions, applied to a quantum real computer client, which when executed on a computer device, causes the computer device to execute the method for storing the quantum computing experimental result as described in the second embodiment.
Example seven
Based on the same inventive concept, the embodiment of the application also provides a chip applied to the quantum real machine client, the chip comprises a processor and a communication interface, the communication interface is coupled with the processor, and the processor is used for running a computer program or instructions to realize the storage method of the quantum computing experimental result as described in the second embodiment.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, the specific names of the functional units and modules are only for distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above device may refer to the corresponding process in the foregoing method embodiment, which is not described herein again. The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application may implement all or part of the flow of the method of the above-described embodiment, and may be implemented by a computer program to instruct related hardware, and the computer program may be stored in a computer readable storage medium, where the computer program, when executed by a processor, may implement the steps of the method embodiment described above. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, executable files or in some intermediate form, etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code, a recording medium, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RandomAccess Memory, RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium. Such as a U-disk, removable hard disk, magnetic or optical disk, etc. In some jurisdictions, computer readable media may not be electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The present application may also be implemented as a computer program product for implementing all or part of the steps of the method embodiments described above, when the computer program product is run on a computer device, causing the computer device to execute the steps of the method embodiments described above.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided by the present application, it should be understood that the disclosed apparatus/computer device and method may be implemented in other manners. For example, the apparatus/computer device embodiments described above are merely illustrative, e.g., the division of modules or units is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (15)

1. The reading and writing system of the quantum computing experimental result is characterized by comprising a server, a quantum real machine client, a storage database and cloud object storage;
the server is used for sending quantum computing experiment instructions;
The quantum real machine client is used for acquiring an experiment result of executing a quantum computing experiment according to the received quantum computing experiment instruction;
if the bit number of the quantum computing experiment is smaller than a first preset threshold value, returning the experiment result to the server, and storing the experiment result in a storage database by the server;
if the bit number of the quantum computing experiment is greater than or equal to the first preset threshold, carrying out encoding compression on the experiment result, uploading the experiment result to a cloud object storage, and returning a storage path of the experiment result in the cloud object storage and bit results with a second preset threshold number with the probability of being ranked in front in the experiment result to the server, wherein the bit results are stored in the storage database by the server;
the method also comprises a no-service function cluster;
the user client is used for sending a request for reading the experimental result to the server;
the server is further configured to determine whether the number of bits of the quantum computation experiment corresponding to the read experiment result request is smaller than the first preset threshold;
if yes, reading experimental result data from the storage database and returning the experimental result data to the user client;
if not, judging whether the read experiment result request is a fuzzy search request or not; if not, reading the bit results with the probability sizes ranked in the first preset threshold number from the storage database; if yes, sending a request for acquiring experimental results to the non-service function cluster, and returning a bit result sent by the non-service function cluster to the user client;
And the service-free function cluster is used for generating an acquisition container according to the request for acquiring the experimental result, pulling the corresponding experimental result in the cloud object storage, and returning to the server.
2. The system of claim 1, wherein the quantum-wells client is specifically configured to convert the experimental result data into a projected probability result using a binary-coded key-value pair format or an integer-type key-value pair format;
if the bit number of the quantum computing experiment is more than or equal to a third preset threshold value, multiplying the projection probability result data by 10 n ObtainingObtaining a converted experimental result; n is a fourth preset threshold, and the third preset threshold is greater than or equal to the first preset threshold.
3. The system of claim 2, wherein the quantum-real client, prior to being configured to code compress the experimental results, is further configured to:
if the probability of each bit result in the experimental results is the same or the probability of any bit result in the experimental results is 1, determining the arrangement characteristics of the experimental results and returning the arrangement characteristics to the server, wherein the arrangement characteristics are stored in a storage database by the server.
4. The system of claim 3, wherein the quantum-real client is further configured to determine whether an occupied storage amount of the converted experimental result is greater than a preset storage space threshold;
if yes, byte string splicing is carried out according to the arrangement sequence of the bit results in the converted experimental result until the occupied storage capacity of the spliced bit results is larger than a preset storage space threshold value, and a spliced file is obtained;
re-performing byte string splicing process from the next bit result to obtain a new spliced file;
repeating the above process until the last bit result is spliced to obtain the spliced file.
5. The system of any of claims 1-4, wherein the user client is configured to send a quantum computing experiment request to the server;
the server is specifically configured to generate a quantum computing experiment instruction according to the quantum computing experiment request.
6. The system of claim 1, wherein the server is specifically configured to determine whether a number of bits of the quantum computation experiment corresponding to the read experiment result request is greater than a fifth preset threshold;
if yes, judging whether the read experiment result request is a fuzzy search request or not; if yes, obtaining bit results which meet the fuzzy search condition and are not more than the second preset threshold number from the storage database; if not, reading the bit results with the probability sizes ranked in the first preset threshold number from the storage database;
If not, judging whether the read experiment result request is a fuzzy search request or not; if yes, obtaining a bit result meeting the fuzzy search condition from the storage database; and if not, acquiring the experimental result.
7. The system of claim 1, wherein when the number of bits of the quantum computation experiment corresponding to the read experiment result request is greater than the first preset threshold, the no-service function cluster is specifically configured to pull the corresponding experiment result in the cloud object storage, obtain the number of bits of the experiment result that satisfy the fuzzy search condition and are not greater than the second preset threshold, and return to the server.
8. The system of claim 7, wherein the no-service function cluster is specifically configured to pull at least one spliced file that satisfies the fuzzy search condition from each spliced file of the experimental result, obtain bit results that satisfy the fuzzy search condition and have probability sizes ordered before and are not greater than the second preset threshold number in the at least one spliced file, and return to the server.
9. The storage method of the quantum computing experimental result is characterized by being applied to a quantum real machine client, and comprises the following steps:
Obtaining an experimental result of quantum computation according to the received experimental request sent by the server;
if the bit number of the quantum computing experiment is smaller than a first preset threshold value, returning the experiment result to the server, and storing the experiment result in a storage database by the server;
if the bit number of the quantum computing experiment is greater than or equal to the first preset threshold, carrying out encoding compression on the experiment result, uploading the experiment result to a cloud object storage, and returning a storage path of the experiment result in the cloud object storage and bit results with a second preset threshold number with the probability of being ranked in front in the experiment result to the server, wherein the bit results are stored in the storage database by the server;
the experimental results were code compressed by:
converting the experimental result data into a projection probability result using a binary coded key value pair format or an integer key value pair format;
if the bit number of the quantum computing experiment is more than or equal to a third preset threshold value, multiplying the projection probability result data by 10 n Obtaining a converted experimental result; n is a fourth preset threshold, and the third preset threshold is greater than or equal to the first preset threshold;
The method also comprises a no-service function cluster;
the user client is used for sending a request for reading the experimental result to the server;
the server is further configured to determine whether the number of bits of the quantum computation experiment corresponding to the read experiment result request is smaller than the first preset threshold;
if yes, reading experimental result data from the storage database and returning the experimental result data to the user client;
if not, judging whether the read experiment result request is a fuzzy search request or not; if not, reading the bit results with the probability sizes ranked in the first preset threshold number from the storage database; if yes, sending a request for acquiring experimental results to the non-service function cluster, and returning a bit result sent by the non-service function cluster to the user client;
and the service-free function cluster is used for generating an acquisition container according to the request for acquiring the experimental result, pulling the corresponding experimental result in the cloud object storage, and returning to the server.
10. The method of claim 9, further comprising, prior to encoding the experimental results:
if the probability of each bit result in the experimental results is the same or the probability of any bit result in the experimental results is 1, determining the arrangement characteristics of the experimental results and returning the arrangement characteristics to the server, wherein the arrangement characteristics are stored in a storage database by the server.
11. The method of claim 9, further comprising, after obtaining the post-conversion test result:
judging whether the occupied storage amount of the converted experimental result is larger than a preset storage space threshold value or not;
if yes, byte string splicing is carried out according to the arrangement sequence of the bit results in the converted experimental result until the occupied storage capacity of the spliced bit results is larger than a preset storage space threshold value, and a spliced file is obtained;
re-performing byte string splicing process from the next bit result to obtain a new spliced file;
repeating the above process until the last bit result is spliced to obtain the spliced file.
12. A computer readable storage medium for use in a quantum real machine client, having stored thereon a computer program which when executed by a processor implements a method of storing quantum computing experimental results according to any of claims 9-11.
13. A quantum real client comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing a method of storing quantum computing experimental results according to any one of claims 9-11 when the computer program is executed.
14. A computer program product comprising instructions for use on a quantum real computer client, which when run on a computer device causes the computer device to perform the method of storing quantum computing experimental results according to any of claims 9-11.
15. A chip for use in a quantum real machine client, the chip comprising a processor and a communications interface, the communications interface being coupled to the processor, the processor being for running a computer program or instructions to implement a method of storing quantum computing experimental results as claimed in any one of claims 9 to 11.
CN202310527708.1A 2023-05-11 2023-05-11 Reading and writing system, related method, device and equipment for quantum computing experimental result Active CN116384497B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310527708.1A CN116384497B (en) 2023-05-11 2023-05-11 Reading and writing system, related method, device and equipment for quantum computing experimental result

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310527708.1A CN116384497B (en) 2023-05-11 2023-05-11 Reading and writing system, related method, device and equipment for quantum computing experimental result

Publications (2)

Publication Number Publication Date
CN116384497A CN116384497A (en) 2023-07-04
CN116384497B true CN116384497B (en) 2023-08-25

Family

ID=86978975

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310527708.1A Active CN116384497B (en) 2023-05-11 2023-05-11 Reading and writing system, related method, device and equipment for quantum computing experimental result

Country Status (1)

Country Link
CN (1) CN116384497B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109981702A (en) * 2017-12-27 2019-07-05 深圳市优必选科技有限公司 A kind of file memory method and system
CN110008173A (en) * 2019-03-07 2019-07-12 深圳市买买提信息科技有限公司 A kind of method and device of data storage
CN110930251A (en) * 2019-10-18 2020-03-27 如般量子科技有限公司 Anti-quantum computing cloud storage method and system based on alliance chain and implicit certificate
CN113961374A (en) * 2021-10-29 2022-01-21 中国人民解放军战略支援部队信息工程大学 Data transmitting and receiving method and system, storage medium and electronic equipment
CN114218267A (en) * 2021-11-24 2022-03-22 建信金融科技有限责任公司 Query request asynchronous processing method and device, computer equipment and storage medium
CN114780250A (en) * 2022-05-27 2022-07-22 中国工商银行股份有限公司 Method, device, computer equipment, storage medium and product for allocating function memory

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8891878B2 (en) * 2012-06-15 2014-11-18 Mitsubishi Electric Research Laboratories, Inc. Method for representing images using quantized embeddings of scale-invariant image features
US20220405132A1 (en) * 2021-06-17 2022-12-22 Multiverse Computing S.L. Method and system for quantum computing

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109981702A (en) * 2017-12-27 2019-07-05 深圳市优必选科技有限公司 A kind of file memory method and system
CN110008173A (en) * 2019-03-07 2019-07-12 深圳市买买提信息科技有限公司 A kind of method and device of data storage
CN110930251A (en) * 2019-10-18 2020-03-27 如般量子科技有限公司 Anti-quantum computing cloud storage method and system based on alliance chain and implicit certificate
CN113961374A (en) * 2021-10-29 2022-01-21 中国人民解放军战略支援部队信息工程大学 Data transmitting and receiving method and system, storage medium and electronic equipment
CN114218267A (en) * 2021-11-24 2022-03-22 建信金融科技有限责任公司 Query request asynchronous processing method and device, computer equipment and storage medium
CN114780250A (en) * 2022-05-27 2022-07-22 中国工商银行股份有限公司 Method, device, computer equipment, storage medium and product for allocating function memory

Also Published As

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

Similar Documents

Publication Publication Date Title
US9514147B2 (en) Hierarchical data compression and computation
US10901948B2 (en) Query predicate evaluation and computation for hierarchically compressed data
US8344916B2 (en) System and method for simplifying transmission in parallel computing system
EP3251031B1 (en) Techniques for compact data storage of network traffic and efficient search thereof
US9235651B2 (en) Data retrieval apparatus, data storage method and data retrieval method
US9628107B2 (en) Compression of floating-point data by identifying a previous loss of precision
CN106407201B (en) Data processing method and device and computer readable storage medium
US20080098001A1 (en) Techniques for efficient loading of binary xml data
JP2011530119A (en) Efficient large-scale processing of column-based data coding structures
EP3848815B1 (en) Efficient shared bulk loading into optimized storage
CN112307369A (en) Short link processing method, device, terminal and storage medium
CN107562804B (en) Data caching service system and method and terminal
CN114529741A (en) Picture duplicate removal method and device and electronic equipment
US20080235201A1 (en) Consistent weighted sampling of multisets and distributions
JP7108784B2 (en) DATA STORAGE METHOD, DATA ACQUISITION METHOD, AND DEVICE
CN116384497B (en) Reading and writing system, related method, device and equipment for quantum computing experimental result
US7970801B1 (en) Data packaging system and method
CN112580805A (en) Method and device for quantizing neural network model
CN115905168B (en) Self-adaptive compression method and device based on database, equipment and storage medium
US20220400253A1 (en) Lossless image compression using block based prediction and optimized context adaptive entropy coding
US20210157485A1 (en) Pattern-based cache block compression
US11966597B1 (en) Multi-domain configurable data compressor/de-compressor
US20240111439A1 (en) Multi-domain configurable data compressor/de-compressor
US7953769B1 (en) XML data packaging system and method
KR20210119907A (en) Compression and decompression of weight values

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