A method and system for constructing a prediction model of quantum circuit fidelity, and a prediction method

By predicting the fidelity of quantum circuits using a fully connected neural network and combining quantum circuit and device parameters, the trade-off between accuracy and cost in existing technologies is resolved, achieving high-accuracy and low-cost fidelity prediction.

CN119067228BActive Publication Date: 2026-01-06INST OF COMPUTING TECH CHINESE ACAD OF SCI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411164568.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-23
Publication Date
2026-01-06
Estimated Expiration
2044-08-23

AI Technical Summary

Technical Problem

Existing methods for predicting the fidelity of electronic circuits present a trade-off between accuracy and computational cost. Simple formula methods are not accurate enough, while complex machine learning models have high computational efficiency and resource consumption, making them difficult to meet the needs of complex environments.

Method used

A fully connected neural network is used to predict the fidelity of quantum circuits. Feature vectors are constructed by encoding the application relationship between quantum gates and qubits, the fidelity of quantum gates and the readout fidelity of qubits, and the decoherence time. Combined with the parameters of a specified quantum computing device, an initial quantum circuit fidelity prediction model is constructed.

Benefits of technology

It achieves high-accuracy and low-computational-cost fidelity predictions on specified quantum computing devices, suitable for resource-constrained environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119067228B_ABST
    Figure CN119067228B_ABST
Patent Text Reader

Abstract

The application provides a quantum circuit fidelity prediction model construction method and system and a prediction method, which comprises the following steps: obtaining configuration information of a specified quantum computing device, randomly generating a plurality of quantum circuits and executing them on the specified quantum computing device to obtain a parameter list and an actual fidelity of each randomly generated quantum circuit on the specified quantum computing device; counting the number of single-bit gates applied to each quantum bit of each randomly generated quantum circuit and the number of two-bit gates applied to each quantum bit pair, and splicing the parameter list of the specified quantum computing device to encode the final feature vector of the quantum circuit; based on the actual fidelity of each quantum circuit, configuring a label for the final feature vector of the quantum circuit to form a training set; using the training set to iteratively train an initial quantum circuit fidelity prediction model to obtain a quantum circuit fidelity prediction model, and using the model to predict the fidelity of the quantum circuit on the specified quantum computing device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of quantum computing technology, and more specifically, to a method and system for constructing a prediction model for quantum circuit fidelity, and a prediction method. Background Technology

[0002] Quantum computing, with its potential to surpass classical computing, is becoming an important branch of modern science. Quantum circuits, as the core of quantum computing, are the basic structure for implementing quantum algorithms using qubits. These quantum circuits are designed to utilize the principles of quantum mechanics, such as superposition and entanglement, to perform specific computational tasks, thus showing potential for significant advantages in fields such as cryptography and drug discovery. However, current quantum computing devices are still in the NI SQ (medium-scale noisy quantum computing) era. Quantum circuits are inevitably affected by external environmental interferences, such as temperature fluctuations and electromagnetic noise; these factors are collectively referred to as quantum noise. Furthermore, internal defects in the quantum system, such as inaccurate qubit fabrication and imperfect implementation of quantum gate operations, also introduce errors. These noises and errors are collectively called quantum errors, which accumulate and propagate, severely disrupting the execution process of the quantum circuit and affecting the final computational results. Fidelity is a key indicator for measuring the accuracy of quantum circuit execution; it quantifies the degree of closeness between the actual output quantum state and the theoretically expected quantum state. A high-fidelity quantum circuit means that its output closely matches theoretical predictions, while low fidelity suggests the presence of significant errors. Therefore, fidelity is not only an important parameter for evaluating the performance of quantum computing devices, but also a prerequisite for the successful implementation of quantum algorithms.

[0003] Existing methods for predicting the fidelity of quantum circuits are mainly divided into two types: (1) Formula calculation method: The fidelity of the entire quantum circuit is estimated by simply multiplying the fidelity of each quantum logic gate and measurement gate in the quantum circuit. This method is easy to implement and has low computational cost. However, it ignores the influence of complex interactions and accumulated errors that may exist between quantum gates, resulting in a large deviation between the predicted result and the actual fidelity. This deviation is particularly obvious when the scale of quantum circuits increases, which limits the application of the formula method in predicting the fidelity of complex quantum circuits. (2) Machine learning model prediction method, such as using graph neural networks to predict the fidelity of circuits. Although this type of method is accurate, it usually requires a large amount of training data and computational resources. In addition, the training and inference process of the model is time-consuming and has high hardware requirements, which limits their application in real-time or resource-constrained environments.

[0004] In summary, existing quantum circuit fidelity prediction methods often face a trade-off between accuracy and computational cost. While simple formulaic methods have low computational cost, their prediction accuracy is insufficient to meet the prediction requirements of complex quantum circuits. Conversely, complex machine learning models, although providing high accuracy, come at the cost of increased computational efficiency and resource consumption. Therefore, there is an urgent need for a quantum circuit fidelity prediction method that offers both high accuracy and low computational cost.

[0005] It should be noted that the background information presented here is only for illustrating relevant information about the present invention to aid in understanding the technical solutions of the present invention, and does not imply that the relevant information is necessarily prior art. In the absence of evidence indicating that the relevant information was disclosed before the filing date of this invention, the relevant information should not be considered prior art. Summary of the Invention

[0006] Therefore, the purpose of this invention is to overcome the shortcomings of the prior art and provide a method and system for constructing a prediction model for quantum circuit fidelity, as well as a prediction method.

[0007] The objective of this invention is achieved through the following technical solution:

[0008] According to a first aspect of the present invention, a method for constructing a quantum circuit fidelity prediction model is proposed. The quantum circuit fidelity prediction model is used to predict the fidelity of a quantum circuit on a specified quantum computing device. The method includes: step S1, obtaining configuration information of the specified quantum computing device, randomly generating multiple quantum circuits based on the configuration information of the specified quantum computing device, and executing them on the specified quantum computing device to obtain a parameter list and actual fidelity of each randomly generated quantum circuit on the specified quantum computing device, wherein each quantum circuit includes multiple qubits and / or multiple qubit pairs; step S2, counting the number of single-qubit gates applied to each qubit of each randomly generated quantum circuit and the number of two-qubit gates applied to each qubit pair, and encoding this quantity. The initial feature vector of each quantum circuit is obtained by concatenating the initial feature vector of each quantum circuit with its parameter list on a specified quantum computing device to encode the final feature vector of the quantum circuit. A label is assigned to the final feature vector of each quantum circuit based on the actual fidelity of each quantum circuit running on the specified device. The final feature vectors of all labeled quantum circuits form a training set. Step S3: Construct an initial quantum circuit fidelity prediction model. Using the constructed training set, the initial quantum circuit fidelity prediction model is iteratively trained multiple times with the final feature vector of the quantum circuit as input and the fidelity of the quantum circuit on the specified device as output to obtain the quantum circuit fidelity prediction model. The initial quantum circuit fidelity prediction model is configured as a fully connected neural network with adjustable network layers and nodes.

[0009] Preferably, the configuration information includes all categories of single-bit quantum gates, two-bit quantum gates, qubits, and qubit pairs consisting of two topologically connected qubits supported by the specified quantum computing device.

[0010] Preferably, the parameter list includes the fidelity of each single-qubit quantum gate applied to each qubit on a specified quantum computing device, the fidelity of each two-qubit quantum gate applied to each qubit pair, the readout fidelity of each qubit, and the longitudinal relaxation time and lateral relaxation time of each qubit.

[0011] Preferably, the read fidelity of each qubit is the average of the fidelity of the quantum circuit to which the qubit belongs when reading 0 and the fidelity when reading 1 on a specified quantum computing device.

[0012] Preferably, the loss function of the fully connected neural network is configured as follows:

[0013]

[0014] Where MSE represents the mean squared loss, n represents the number of samples in the training set, and x i y represents the prediction fidelity on the quantum computing device specified by the i-th quantum circuit. i This represents the actual fidelity of the i-th quantum circuit on a given quantum computing device.

[0015] According to a second aspect of the present invention, the present invention proposes a prediction model construction system for implementing any of the methods described in the first aspect of the present invention, for constructing a quantum circuit fidelity prediction model. The system comprises: a parameter list construction module, configured to randomly generate multiple quantum circuits based on the configuration parameters of a specified quantum computing device and run them on the specified quantum circuits to obtain a parameter list and actual fidelity of each quantum circuit on the specified quantum computing device; a feature vector encoding module, configured to obtain an initial feature vector of each randomly generated quantum circuit and concatenate it with the parameters of the quantum circuit on the specified quantum computing device to encode a final feature vector, and configure a label for the final feature vector of each quantum circuit based on the actual fidelity of each quantum circuit running on the specified device, and form a training set of the final feature vectors of all labeled quantum circuits; and a fidelity prediction model construction module, configured to perform multiple iterative training on the initial quantum circuit fidelity prediction model based on the constructed training set, using the final feature vector of the quantum circuit as input and the fidelity of the quantum circuit on the specified device as output, to obtain a quantum circuit fidelity prediction model.

[0016] According to a third aspect of the present invention, a quantum circuit fidelity prediction method is proposed for predicting the fidelity of a target quantum circuit on a specified quantum computing device. The method includes: step T1, obtaining configuration information of the specified quantum computing device; step T2, obtaining a parameter list of the target quantum circuit executed on the specified quantum computing device based on the configuration information; step T3, obtaining an initial feature vector of the target quantum circuit and concatenating it with the parameter list of the target quantum circuit executed on the specified quantum computing device to construct a final feature vector of the target quantum circuit; and step T4, processing the final feature vector of the target quantum circuit constructed in step T3 using a quantum circuit fidelity prediction model constructed as described in any of the methods in the first aspect of the present invention to obtain the predicted fidelity of the target quantum circuit.

[0017] Preferably, in step T2, it is determined whether the constructed quantum circuit fidelity prediction model can predict the target quantum circuit, and a parameter list of the target quantum circuit that can be predicted is obtained. The determination is made in the following way: it is determined whether the configuration information of the specified quantum computing device contains all types of single-qubit quantum gates, two-qubit quantum gates, and qubit pairs in the target quantum circuit. If it does, the quantum circuit fidelity prediction model can predict the fidelity of the target quantum circuit when it is executed on the specified quantum computing device; otherwise, it cannot predict the fidelity of the target quantum circuit when it is executed on the specified quantum computing device.

[0018] According to a fourth aspect of the present invention, a computer-readable storage medium is provided thereon storing a computer program that can be executed by a processor to implement the steps of the method described in any one of the first or third aspects of the present invention.

[0019] According to a fifth aspect of the present invention, an electronic device is provided, comprising: one or more processors; and a memory for storing executable instructions; wherein the one or more processors are configured to implement the steps of the method described in any one of the first or third aspects of the present invention by executing the executable instructions.

[0020] Compared with the prior art, the advantages of the present invention are as follows:

[0021] This invention employs a fully connected neural network to predict the fidelity of quantum circuits on a specified quantum computing device. Compared to existing quantum circuit prediction models, this neural network is computationally simpler and less costly. Furthermore, this invention constructs a feature vector of the quantum circuit based on the application relationship between quantum gates and qubits, the fidelity of quantum gates, the readout fidelity of qubits, and the decoherence time. This feature encoding method considers both the information of the quantum circuit and the specific parameters of the quantum computing device, resulting in better prediction performance. Attached Figure Description

[0022] The embodiments of the present invention will be further described below with reference to the accompanying drawings, wherein:

[0023] Figure 1 A flowchart illustrating a method for constructing a prediction model for quantum circuit fidelity according to an embodiment of the present invention;

[0024] Figure 2 A flowchart illustrating the feature vector construction process according to an embodiment of the present invention;

[0025] Figure 3 This is a structural diagram of the initial quantum circuit fidelity prediction model according to an embodiment of the present invention;

[0026] Figure 4 A structural diagram of a device for constructing a quantum circuit fidelity prediction model according to an embodiment of the present invention;

[0027] Figure 5 This is a flowchart of a quantum circuit fidelity prediction method according to an embodiment of the present invention;

[0028] Figure 6 This describes the relationship between predicted fidelity and true fidelity for different datasets according to embodiments of the present invention.

[0029] Figure 7 These represent the mean squared error and coefficient of determination for different datasets according to embodiments of the present invention. Detailed Implementation

[0030] To make the objectives, technical solutions, and advantages of this invention clearer, the invention is further described in detail below through specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0031] As mentioned in the background section, existing quantum circuit fidelity prediction methods often face a trade-off between accuracy and computational cost. Simple formulaic methods, while computationally inexpensive, lack sufficient accuracy to meet the prediction requirements of complex quantum circuits. While complex machine learning models can provide high accuracy, they come at the cost of increased computational efficiency and resource consumption. Therefore, there is an urgent need for a quantum circuit fidelity prediction method that offers both high accuracy and low computational cost.

[0032] To address the aforementioned issues, this invention proposes a novel scheme for constructing a quantum circuit fidelity prediction model. This scheme employs a fully connected neural network to predict the fidelity of a quantum circuit on a specified quantum computing device. Compared to existing quantum circuit prediction models, this neural network is computationally simpler and less costly. Furthermore, this invention constructs a feature vector of the quantum circuit based on the application relationship between quantum gates and qubits in the quantum circuit, the fidelity of the quantum gates, the readout fidelity of the qubits, and the decoherence time. This feature encoding method considers both the information of the quantum circuit and the specific parameters of the quantum computing device, effectively improving the accuracy of fidelity prediction.

[0033] The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0034] In summary, this invention proposes a method for constructing a predictive model for the fidelity of quantum circuits, used to predict the fidelity of quantum circuits on a specified quantum computing device, such as... Figure 1 As shown, the method includes step S1: obtaining the configuration information of a specified quantum computing device, randomly generating multiple quantum circuits based on the configuration information of the specified quantum computing device, and executing them on the specified quantum computing device to obtain the parameter list and actual fidelity of each randomly generated quantum circuit on the specified quantum computing device, wherein each quantum circuit includes multiple qubits and / or multiple qubit pairs; step S2: counting the number of single-qubit gates applied on each qubit of each randomly generated quantum circuit and the number of two-qubit gates applied on each qubit pair, and encoding the initial feature vector of the quantum circuit accordingly, and combining the initial feature vector of each quantum circuit with its parameter list on the specified quantum computing device. The parameter list on the computing device is concatenated to encode the final feature vector of the quantum circuit. A label is assigned to the final feature vector of each quantum circuit based on the actual fidelity of each quantum circuit running on the specified device. The final feature vectors of all labeled quantum circuits form a training set. Step S3: Construct an initial quantum circuit fidelity prediction model. Using the constructed training set, the initial quantum circuit fidelity prediction model is iteratively trained multiple times with the final feature vector of the quantum circuit as input and the fidelity of the quantum circuit on the specified device as output to obtain the quantum circuit fidelity prediction model. The initial quantum circuit fidelity prediction model is configured as a fully connected neural network with adjustable number of network layers and nodes.

[0035] To better understand the present invention, each step will be described in detail below with reference to specific embodiments.

[0036] According to an embodiment of the present invention, in step S1, based on the configuration information of the specified quantum computing device M, a plurality of quantum circuits that can be executed on the quantum computing device are randomly generated. The configuration information of the quantum computing device includes all categories of single-bit quantum gates, two-bit quantum gates, qubits, and qubit pairs consisting of two topologically connected qubits supported by the quantum computing device. The randomly generated quantum circuits are quantum algorithms represented by single-bit quantum gates, two-bit quantum gates, qubits, and qubit pairs in the quantum computing device.

[0037] According to one embodiment of the present invention, in step S1, randomly generated quantum circuits are executed on a designated quantum computing device M to obtain the parameters of each quantum circuit executed on the quantum computing device and to construct sample data of the quantum circuit based on these parameters. The sample data of the i-th randomly generated quantum circuit is represented as (C... i ,L i ,f i ), C i Let L represent the i-th quantum circuit. i f represents the list of parameters for the i-th quantum circuit to execute on the quantum computing device M. i The parameter list L represents the actual fidelity of i quantum circuits executed on a quantum computing device M. i It includes the fidelity of each single-qubit quantum gate on each qubit, the fidelity of each two-qubit quantum gate on each qubit pair, and the read fidelity of each bit, the longitudinal relaxation time T1, the transverse relaxation time T2, and the read fidelity of each qubit is the average of the fidelity of reading 0 and the fidelity of reading 1.

[0038] According to one embodiment of the present invention, in step S2, the process of obtaining the features of each quantum circuit and concatenating them with the parameter list on a specified quantum computing device to encode the final feature vector of the quantum circuit is as follows: Figure 2 As shown, the sample data is traversed one by one, and a feature vector of a quantum circuit is constructed in each round of traversal. The operation performed in each round of traversal includes: obtaining the information of all qubits q in the quantum device M in the quantum circuit C. i The number of single-bit quantum gates U applied, and the number of single-bit quantum gates N applied per quantum bit. U,q ; Obtain all qubit pairs (q1,q2) in quantum device M within quantum circuit C i The number of two-bit quantum gates U applied in the process, and the number of two-bit quantum gates applied to each quantum bit pair. All N U,q and Arranged into a vector V C Then V Cand L i The feature vector V is obtained by concatenation. i , where V C The length is the number of qubits plus the number of qubit pairs.

[0039] According to an embodiment of the present invention, in step S2, the label of each feature vector is configured as (1-f) i ), where f i To determine the fidelity of the i-th quantum circuit on a quantum computing device, this invention converts the fidelity into (1-f) / 2π. i Using these labels as feature vectors helps improve the convergence speed of model training and prediction accuracy.

[0040] According to an embodiment of the present invention, in step S3, the initial quantum circuit fidelity prediction model is iteratively trained multiple times using the constructed training set with the final feature vector of the quantum circuit as input and the fidelity of the quantum circuit on a specified device as output, to obtain the quantum circuit fidelity prediction model. The initial quantum circuit fidelity prediction model has the following structure: Figure 3 As shown, the initial quantum circuit fidelity prediction model is configured as a fully connected neural network, comprising d fully connected layers, each containing h nodes. The activation function in each layer is ReLU, and d and h are adjustable parameters. The initial quantum circuit fidelity prediction model also includes a Tanh output node, used to normalize the output to the range of -1 to 1. The Tanh output node is configured as follows:

[0041]

[0042] Where x represents the data input to the Tanh output node, and y represents the output of the quantum circuit fidelity prediction model.

[0043] According to one embodiment of the present invention, the loss function of the initial quantum circuit fidelity prediction model is configured as follows:

[0044]

[0045] Where MSE represents the mean squared loss, n represents the number of samples in the training set, and x i y represents the prediction fidelity on the quantum computing device specified by the i-th quantum circuit. i This represents the actual fidelity of the i-th quantum circuit on a given quantum computing device.

[0046] According to an embodiment of the present invention, a construction apparatus for implementing the above-described quantum circuit fidelity prediction model construction method is proposed, the structure of which is as follows: Figure 4As shown, the device comprises three modules: a parameter list construction module, a feature vector encoding module, and a fidelity prediction model construction module. The functions of each module are as follows:

[0047] 1) Parameter list construction module, used to randomly generate multiple quantum circuits based on the configuration parameters of a specified quantum device and run them on the specified quantum circuits to obtain the parameter list and actual fidelity of each quantum circuit on the specified quantum computing device;

[0048] 2) Feature vector encoding module, used to obtain the initial feature vector of each randomly generated quantum circuit and concatenate it with the parameters of the quantum circuit on the specified quantum computing device to encode the final feature vector, and to configure a label for the final feature vector of each quantum circuit based on the actual fidelity of each quantum circuit running on the specified device, and to form a training set of the final feature vectors of all labeled quantum circuits.

[0049] 3) Fidelity prediction model construction module, which is used to iteratively train the initial quantum circuit fidelity prediction model multiple times based on the constructed training set, with the final feature vector of the quantum circuit as input and the fidelity of the quantum circuit on the specified device as output, so as to obtain the quantum circuit fidelity prediction model.

[0050] According to an embodiment of the present invention, a fidelity prediction method based on a fidelity prediction model constructed by the aforementioned method is proposed. The method includes: step T1, obtaining configuration information of a specified quantum computing device; step T2, obtaining a parameter list of the target quantum circuit executed on the specified quantum computing device based on the configuration information; step T3, obtaining an initial feature vector of the target quantum circuit and concatenating it with the parameter list of the target quantum circuit executed on the specified quantum computing device to construct a final feature vector of the target quantum circuit; step T4, processing the final feature vector of the target quantum circuit constructed in step T3 using a quantum circuit fidelity prediction model constructed by the aforementioned quantum circuit fidelity prediction model construction method to obtain the predicted fidelity of the target quantum circuit.

[0051] According to one embodiment of the present invention, in step T2, it is necessary to determine whether the constructed quantum circuit fidelity prediction model can predict the target quantum circuit and obtain a parameter list of the predictable target quantum circuit. This determination is made as follows: It is determined whether the specified quantum computing device configuration information contains all types of single-qubit quantum gates, two-qubit quantum gates, and qubit pairs in the target quantum circuit. If it does, the quantum circuit fidelity prediction model can predict the fidelity of the target quantum circuit executed on the specified quantum computing device; otherwise, it cannot predict the fidelity of the target quantum circuit executed on the specified quantum computing device. Furthermore, it is determined whether the specified quantum computing device configuration information contains qubit pairs in the target quantum circuit by checking whether the two qubits in the qubit pair in the target quantum circuit are topologically connected on the specified quantum computing device. If they are connected, the specified quantum computing device is considered to contain a qubit pair consisting of these two qubits.

[0052] To more clearly describe the steps of the quantum circuit prediction method, the following will combine... Figure 5 A detailed flowchart of a quantum circuit fidelity prediction method is provided, the flowchart including:

[0053] 1) Given a quantum computing device, construct a quantum circuit fidelity prediction model using the quantum circuit fidelity prediction model construction method to predict the execution fidelity of quantum circuits on the quantum computing device.

[0054] 2) Obtain the target quantum circuit and its parameter list L executed on the specified quantum computing device.

[0055] 3) Does the quantum computing system support all quantum gates used in quantum circuits? If there are unsupported quantum gates, the fidelity of the target quantum circuit on the specified device cannot be achieved.

[0056] 4) Whether the two qubits in each qubit pair in the quantum circuit have a topological connection structure on the quantum computing device M. If not, the fidelity of the target quantum circuit on the specified device cannot be determined.

[0057] 5) Obtain the number of single-qubit quantum gates U applied in the quantum circuit C for all qubits q in the quantum device M, and the number of single-qubit quantum gates N applied on each qubit. U,q .

[0058] 6) Obtain the number of two-bit quantum gates U applied to all qubit pairs (q1,q2) in the quantum device M in the quantum circuit C, and the number of two-bit quantum gates applied to each qubit pair.

[0059]

[0060] 7) Put all N U,q and Arranged into a vector V C Then V C The final feature vector V is obtained by concatenating L with L, where V C The length is the number of qubits plus the number of qubit pairs.

[0061] 8) Input the final feature vector V of the target quantum circuit into the quantum circuit prediction model to obtain the output y of the quantum circuit prediction model.

[0062] 9) The prediction fidelity of the target quantum circuit on the specified quantum device is 1-max(0,y).

[0063] To more clearly illustrate the beneficial effects of this invention, the inventors designed a test experiment to verify the accuracy of the quantum circuit fidelity prediction proposed in this invention. The test experiment configuration was as follows: Experimental environment: Ubuntu 22.04 operating system, Python programming language, PyTorch framework; Initial quantum circuit prediction model parameters: 4 fully connected layers, each containing 200 neurons, using the ReLU activation function; Dataset: Datasets from 6 IBM quantum computing devices, corresponding to the following quantum computing devices: IBM simulator, IBM Geneva, IBM Hanoi, IBM Montreal, IBM Mumbai, and IBM Toronto. Each device set contained 1000 samples, of which 70% were used as training data and 30% as test data; Optimization algorithm: Adam optimizer, learning rate 0.01; Loss function: Mean squared error loss function (MSE); Number of training iterations: 20,000.

[0064] Experimental results are as follows Figure 6 , 7 As shown in the figure, the analysis of the results shows that the quantum circuit fidelity measurement method proposed in this invention can accurately predict the fidelity of quantum circuits, with an average MSE of only 0.48% on six datasets. At the same time, the prediction model constructed in this invention has a simple network structure (containing only 4 hidden layers) and low computational cost.

[0065] It should be noted that although the steps are described in a specific order above, it does not mean that the steps must be executed in the above specific order. In fact, some of these steps can be executed concurrently, or even in a different order, as long as the required function can be achieved.

[0066] This invention can be a system, method, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of the invention.

[0067] Computer-readable storage media can be tangible devices that hold and store instructions for use by an instruction execution device. Computer-readable storage media can be, for example, including but not limited to, electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination thereof.

[0068] The various embodiments of the present invention have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or technical improvements to the embodiments in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.

Claims

1. A method for constructing a quantum circuit fidelity prediction model, the quantum circuit fidelity prediction model being used for predicting fidelity of a quantum circuit on a specified quantum computing device, characterized in that, The method comprises: Step S1, obtaining configuration information of a specified quantum computing device, randomly generating a plurality of quantum circuits based on the configuration information of the specified quantum computing device and executing on the specified quantum computing device to obtain a parameter list and an actual fidelity of each randomly generated quantum circuit on the specified quantum computing device, wherein each quantum circuit comprises a plurality of quantum bits and / or a plurality of pairs of quantum bits; Step S2, counting the number of single-bit gates applied to each quantum bit and the number of two-bit gates applied to each pair of quantum bits of each randomly generated quantum circuit to encode an initial feature vector of the quantum circuit, splicing the initial feature vector of each quantum circuit with the parameter list thereof on the specified quantum computing device to encode a final feature vector of the quantum circuit, and configuring a label for the final feature vector of each quantum circuit based on the actual fidelity of each quantum circuit running on the specified device, wherein the final feature vectors of all quantum circuits configured with the label constitute a training set; Step S3, constructing an initial quantum circuit fidelity prediction model, and iteratively training the initial quantum circuit fidelity prediction model using the constructed training set with the final feature vector of the quantum circuit as the input and the fidelity of the quantum circuit on the specified device as the output to obtain a quantum circuit fidelity prediction model, wherein the initial quantum circuit fidelity prediction model is configured as a fully connected neural network with adjustable network layers and node numbers.

2. The method of claim 1, wherein, The configuration information comprises all categories of single-bit quantum gates, two-bit quantum gates, quantum bits and pairs of quantum bits composed of two topologically connected quantum bits supported by the specified quantum computing device.

3. The method of claim 1, wherein, The parameter list comprises the fidelity of each single-bit quantum gate of the quantum circuit applied to each quantum bit, the fidelity of each two-bit quantum gate applied to each pair of quantum bits, the read fidelity of each quantum bit, and the longitudinal relaxation time and transverse relaxation time of each quantum bit on the specified quantum computing device.

4. The method of claim 3, wherein, The read fidelity of each quantum bit is the average of the fidelity of reading 0 and the fidelity of reading 1 of the quantum bit on the specified quantum computing device.

5. The method of claim 1, wherein, The loss function of the fully connected neural network is configured as: where MSE represents a mean square loss value, n represents a number of samples in a training set, x i represents a predicted fidelity on a designated quantum computing device for the i-th quantum circuit, y i represents an actual fidelity on the designated quantum computing device for the i-th quantum circuit.

6. A prediction model construction system for implementing the method according to any one of claims 1 to 5, for constructing a quantum circuit fidelity prediction model, characterized in that, The system comprises: A parameter list construction module configured to randomly generate a plurality of quantum circuits based on the configuration parameters of the specified quantum computing device and run the quantum circuits on the specified quantum computing device to obtain a parameter list and an actual fidelity of each quantum circuit on the specified quantum computing device; A feature vector encoding module configured to obtain an initial feature vector of each randomly generated quantum circuit, splice the initial feature vector with the parameters of the quantum circuit on the specified quantum computing device to encode a final feature vector, and configure a label for the final feature vector of each quantum circuit based on the actual fidelity of each quantum circuit running on the specified device, wherein the final feature vectors of all quantum circuits configured with the label constitute a training set; and A quantum circuit fidelity prediction model construction module configured to construct an initial quantum circuit fidelity prediction model, iteratively train the initial quantum circuit fidelity prediction model using the constructed training set with the final feature vector of the quantum circuit as the input and the fidelity of the quantum circuit on the specified device as the output to obtain a quantum circuit fidelity prediction model, wherein the initial quantum circuit fidelity prediction model is configured as a fully connected neural network with adjustable network layers and node numbers. The fidelity prediction model construction module is configured to perform multiple iterations of training on the initial quantum circuit fidelity prediction model based on the constructed training set, with the final feature vector of the quantum circuit as input and the fidelity of the quantum circuit on the specified device as output, to obtain the quantum circuit fidelity prediction model.

7. A method for predicting the fidelity of a quantum circuit, used to predict the fidelity of a target quantum circuit on a specified quantum computing device, characterized in that, The method comprises: Step T1, obtaining configuration information of a specified quantum computing device; Step T2, obtaining a parameter list of a target quantum circuit executed on the specified quantum computing device based on the configuration information; Step T3, obtaining an initial feature vector of the target quantum circuit and concatenating it with the parameter list of the target quantum circuit executed on the specified quantum computing device to construct a final feature vector of the target quantum circuit; Step T4, processing the final feature vector of the target quantum circuit constructed in step T3 using the quantum circuit fidelity prediction model constructed by the method of any one of claims 1-5 to obtain the predicted fidelity of the target quantum circuit.

8. The method of claim 7, wherein, In the step T2, it is determined whether the constructed quantum circuit fidelity prediction model can predict the target quantum circuit, and the parameter list of the target quantum circuit that can be predicted is obtained, wherein the determination is made in the following manner: It is determined whether the specified quantum computing device configuration information contains all types of single-bit quantum gates, two-bit quantum gates, and qubit pairs in the target quantum circuit. If yes, the quantum circuit fidelity prediction model can predict the fidelity of the target quantum circuit executed on the specified quantum computing device, otherwise it cannot predict the fidelity of the target quantum circuit executed on the specified quantum computing device.

9. A computer-readable storage medium, characterized in that, A computer program is stored thereon, and the computer program is executable by a processor to implement the steps of the method of any one of claims 1-5, 7-8.

10. An electronic device, comprising: Comprise: One or more processors; And Memory, wherein the memory is used to store executable instructions; The one or more processors are configured to implement the steps of the method of any one of claims 1-5, 7-8 by executing the executable instructions.

Citation Information

Patent Citations

  • Quantum circuit fidelity analysis method and device based on context and topological feature extraction

    CN117350393A

  • Flexible initializer for arbitrarily-sized parametrized quantum circuits

    WO2022192525A1