Quantum circuit simulation method, device, computer device, and program

By applying vector parallelization to quantum circuit simulation, the method converts the original function into an objective function, combining parallelized tensors to achieve efficient quantum circuit simulation, reducing computation time and improving efficiency.

JP7589884B2Active Publication Date: 2024-11-26TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2023538707
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2022-01-24
Filing Date
2022-11-22
Publication Date
2024-11-26
Estimated Expiration
2042-11-22

AI Technical Summary

Technical Problem

The efficiency of quantum circuit simulation using classical computers is not high due to the lack of effective parallelization methods, leading to prolonged computation times for large-scale simulations.

Method used

Introduce vector parallelization into quantum circuit simulation by converting the original function into an objective function, where the input parameter requires parallelization, and combining multiple parallelized tensors to achieve a single calculation process, utilizing vector instruction sets on hardware like GPUs and TPUs.

Benefits of technology

This approach significantly reduces computation time, allowing large-scale quantum circuit simulations to be completed in the same time as a single calculation, thereby enhancing the efficiency of quantum circuit simulation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007589884000024
    Figure 0007589884000024
  • Figure 0007589884000025
    Figure 0007589884000025
  • Figure 0007589884000026
    Figure 0007589884000026
Patent Text Reader

Abstract

A quantum circuit simulation method, device, equipment, storage medium, and program product relating to the quantum technology field are provided. The method includes a step (110) of acquiring an original function for quantum circuit simulation, and determining a first input parameter that requires parallelization in the original function, a step (120) of converting the original function into an objective function based on the original function and the first input parameter, the input parameter of the objective function including a converted first input parameter corresponding to the first input parameter, and a tensor corresponding to the converted first input parameter being a result obtained by combining a plurality of parallelized tensors corresponding to the first input parameter, a step (130) of acquiring an execution result corresponding to the objective function based on the input parameter of the objective function, and a step (140) of executing a quantum circuit simulation based on the execution result corresponding to the objective function. The efficiency of the simulation can be improved by introducing the idea of ​​vector parallelization into the quantum circuit simulation.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention claims priority to a Chinese patent application filed on January 24, 2022, bearing application number 202210077584.7 and entitled "Quantum circuit simulation method, apparatus, device, storage medium and program product," the entire contents of which are incorporated herein by reference.

[0002] FIELD OF THE DISCLOSURE The present invention relates to the field of quantum technology, and more particularly to a quantum circuit simulation method, apparatus, device, storage medium, and program product. [Background technology]

[0003] Quantum circuit simulation uses classical and numerical computation techniques to simulate or approximate the operation of a quantum computer.

[0004] Currently, quantum circuit simulation is not very efficient. Summary of the Invention

[0005] The embodiments of the present invention provide a quantum circuit simulation method, device, equipment, storage medium and program product, the technical means of which are as follows:

[0006] In one aspect of an embodiment of the present invention, a quantum circuit simulation method executed by a computing device is provided, the method including the steps of: obtaining an original function for quantum circuit simulation, and determining a first input parameter that requires parallelization in the original function; converting the original function into an objective function based on the original function and the first input parameter, wherein the input parameters of the objective function include a converted first input parameter corresponding to the first input parameter, and a tensor corresponding to the converted first input parameter is a result obtained by combining a plurality of parallelized tensors corresponding to the first input parameters; obtaining an execution result corresponding to the objective function based on the input parameters of the objective function; and executing the quantum circuit simulation based on the execution result corresponding to the objective function.

[0007] In another aspect of an embodiment of the present invention, a quantum circuit simulation device is provided, comprising: a function acquisition module that acquires an original function for quantum circuit simulation and determines a first input parameter that requires parallelization in the original function; a function transformation module that converts the original function into an objective function based on the original function and the first input parameter, wherein the input parameter of the objective function includes a converted first input parameter corresponding to the first input parameter, and a tensor corresponding to the converted first input parameter is a result obtained by combining a plurality of parallelized tensors corresponding to the first input parameter; a function execution module that acquires an execution result corresponding to the objective function based on the input parameter of the objective function; and a circuit simulation module that executes the quantum circuit simulation based on the execution result corresponding to the objective function.

[0008] Another aspect of an embodiment of the present invention provides a computer device including a processor and a memory having a computer program stored therein, the computer program being loaded and executed by the processor to realize the above-mentioned quantum circuit simulation method.

[0009] Another aspect of an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, the computer program being loaded and executed by a processor to realize the quantum circuit simulation method described above.

[0010] Another aspect of an embodiment of the present invention provides a computer program product including a computer program stored in a computer-readable storage medium, wherein a processor reads and executes the computer program from the computer-readable storage medium so as to realize the above-mentioned quantum circuit simulation method.

[0011] The technical solutions according to the embodiments of the present invention have at least the following advantageous effects.

[0012] The idea of ​​vector parallelization is introduced into quantum circuit simulation, i.e., an original function is converted into an objective function, the input parameters of the objective function include a converted first input parameter corresponding to the first input parameter requiring parallelization, and the tensor corresponding to the converted first input parameter is the result obtained by combining a plurality of parallelized tensors corresponding to the first input parameters. By executing the objective function, a computational process that would normally require multiple executions can be parallelized and executed into a single computational process, so that it can be completed in the same amount of time as a single calculation, and the efficiency of quantum circuit simulation can be significantly improved. [Brief description of the drawings]

[0013] [Figure 1] 1 is a flowchart of a quantum circuit simulation method according to one embodiment of the present invention. [Diagram 2] A schematic diagram of the functionality of a vmap interface in one embodiment of the present invention. [Diagram 3] 10 is a flowchart of a quantum circuit simulation method according to another embodiment of the present invention. [Figure 4] FIG. 2 is a schematic diagram of a numerical simulation of a target quantum circuit according to one embodiment of the present invention. [Diagram 5] FIG. 2 is a schematic diagram of parallel processing of input wave functions according to one embodiment of the present invention. [Figure 6] FIG. 2 is a schematic diagram of parallel optimization of circuit variation parameters according to one embodiment of the present invention. [Figure 7] FIG. 2 is a schematic diagram of parameterized structural information contained in a tensor network according to one embodiment of the present invention. [Figure 8] FIG. 2 is a schematic diagram of parallel generation of circuit structures according to one embodiment of the present invention. [Figure 9] FIG. 2 is a schematic diagram of experimental results according to one embodiment of the present invention. [Figure 10] 1 is a block diagram of a quantum circuit simulation device according to one embodiment of the present invention. [Figure 11] 1 is a schematic diagram of a computing device according to one embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0014] In order to make the objectives, solutions and advantages of the present invention clearer, the following describes the embodiments of the present invention in more detail with reference to the drawings.

[0015] Before describing the technical scheme of the present invention, some important terms related to the present invention will be explained.

[0016] 1. Quantum computing: A computing method based on quantum logic, in which the basic unit for storing data is a quantum bit (qubit).

[0017] 2. Quantum bit: The basic unit of quantum computing. Conventional computers use 0 and 1 as the basic binary units. Quantum computing, unlike conventional computers, can process 0 and 1 simultaneously, and the system is in a linear superposition of 0 and 1 states. (outside 1) TIFF0007589884000001.tif7130, where α, β represent the complex probability range between 0 and 1, modulo squared |α| 2 , |β| 2 represent the probabilities of 0 and 1, respectively.

[0018] 3. Quantum Circuit: A representation of a quantum general-purpose computer, which represents the hardware realization of the quantum gate model of the corresponding quantum algorithm / program. If the quantum circuit contains variable parameters that control the quantum gates, it is called a Parameterized Quantum Circuit (PQC) or Variational Quantum Circuit (VQC), and both are the same concept.

[0019] 4. Hamiltonian: A matrix that represents the Hermitian conjugate of the total energy of a quantum system. Hamiltonian is a physics term that represents the total energy of a system, usually denoted by H.

[0020] 5. Eigenstate: For the Hamiltonian matrix H, the equation (outside 2) The solution that satisfies TIFF0007589884000002.tif8130 is the eigenstate of H (Outside 3) TIFF0007589884000003.tif6130 and has eigenenergy E. The ground state corresponds to the lowest energy eigenstate of a quantum system.

[0021] 6. Quantum-classical hybrid computing: A computing paradigm in which the inner layer uses a quantum circuit (e.g., PQC) to calculate the corresponding physical quantity or loss function, and the outer layer uses a conventional classical optimizer to adjust the quantum circuit variation parameters, which is believed to maximize the advantages of quantum computing and is one of the important directions for proving quantum superiority with potential. In general, such a quantum-classical hybrid computing paradigm is sometimes called a variational quantum algorithm.

[0022] 7. NISQ (Noisy Intermediate-Scale Quantum): This is the latest medium-scale noisy quantum hardware, which is the current stage and research focus of the development of quantum computing. Quantum computing at this stage cannot be applied as a general-purpose computing engine due to the limitations of scale and noise, but in some problems it can achieve results that exceed those of the most powerful classical computers, which is usually referred to as quantum supremacy or quantum advantage.

[0023] 8. Variational Quantum Eigensolver (VQE): This method uses a variational circuit (i.e., PQC / VQC) to estimate the ground state energy of a specific quantum system. It is a typical quantum-classical hybrid computing paradigm and has been widely applied in the quantum chemistry field.

[0024] 9. Pauli string: For terms consisting of a direct product of multiple Pauli matrices at different lattice points, a general Hamiltonian can usually be decomposed into a sum of a set of Pauli strings. Measurements of VQE are also usually measured term by term according to the Pauli string decomposition. The expectation value of each Pauli string can be estimated by averaging multiple measurements in a quantum circuit.

[0025] 10. Bitstring (also called classical bit string): A string of numbers consisting of 0s and 1s. The classical result obtained from each measurement of a quantum circuit can be expressed as 0s or 1s depending on the up or down spin configuration in the measurement basis, so the result of one measurement corresponds to one bit string. The measurement value obtained by measuring each Pauli string is given by the calculation of the bit string.

[0026] 11. Software simulation of quantum circuits: Using classical computers and numerical calculation methods, the operation of a quantum computer is simulated or approximated. Software simulation of quantum circuits is abbreviated as "quantum circuit simulation."

[0027] 12. Vector Parallelism: Vector parallelism is achieved by vectorization, which supports each operator of the original function one by one in hardware. This allows high-speed parallelization of upper layer functions. This implementation is usually performed together with static map compilation. For example, for a function f(x)=2×x, if 1 is input, 2 is returned, i.e., f(1)=2. The vector parallel version fv(x) can achieve fv([1,2])=[2,4]. This process can be calculated simultaneously using a vector instruction set (also called a vectorization instruction set) in hardware, rather than sequential calculation, so the time to calculate fv([1,2]) is almost the same as f(1), which is about half the time to calculate f(1) and f(2) sequentially. The acceleration becomes more noticeable as the vector dimension (parallel dimension / batch dimension) becomes larger. In this example, f(x) is the original function, multiplication is the only occurring operator, and the support for vectorization of this calculation depends on the vector instruction set in the hardware, such as a CPU (Central Processing Unit) or a GPU (Graphics Processing Unit). The upper layer function here means f, and its vector parallelization can be realized by utilizing the interface encapsulated in the recent machine learning framework without considering the details of the hardware or the implementation of the lower layer of f. The static map compilation process is a process of fusing the compilation of the upper layer calculation API (Application Programming Interface) provided by the recent machine learning framework with the lower layer operation of the hardware, which can realize the acceleration of numerical calculation.

[0028] 13. Pauli Operators: Also called Pauli matrices, they are three 2x2 unitary Hermitian complex matrices (also called unitary matrices) and are usually denoted by the Greek letter σ (sigma). Here, the Pauli X operator is (outside 4) TIFF0007589884000004.tif19130, and the Pauli Y operator is (outside 5) TIFF0007589884000005.tif18130 and the Bubble Z operator is (outside 6) The file is TIFF0007589884000006.tif19130.

[0029] 14. Differentiable Architecture Search (DARTS): One of the commonly used NAS (Neural Architecture Search) schemes, DARTS performs end-to-end differential calculation and gradient descent search in a super network by adding multiple layers of operations between different nodes with weights, which can significantly improve the speed of neural network structure search. DARTS makes the search space continuous instead of searching discrete candidate structures, and can optimize the network structure according to the performance of the validation set by gradient descent. Compared with inefficient black-box search, the gradient-based optimization algorithm allows DARTS to match the current best-in-class performance and requires an order of magnitude less computation.

[0030] 15. Quantum Architecture Search (QAS): A general term for a set of tasks and schemes that attempt automated and programmatic searches for quantum circuit structures, modes, and layouts. Traditional quantum architecture search tasks typically use greedy algorithms, reinforcement learning, or genetic algorithms as their core technologies. A relatively new differentiable architecture search technique can iteratively evaluate the merits and demerits of quantum circuit structures on a batch-by-batch basis with high throughput.

[0031] 16. Tensor network: A set of tensors and the connections between them. It allows high-dimensional tensors to be represented with less information. Also, each quantum circuit can be mapped to a single tensor circuit network, so quantum circuits can be simulated by contracting the tensor circuit network.

[0032] In application scenarios of quantum circuit simulation, for some dimensions that require parallelization, a simple serial loop calculation is usually performed to realize multiple corresponding calculations, i.e., a simple for loop is performed. The parallelism of this method is 0. Therefore, if the size of the dimension to be parallelized is 1000, it will take 1000 times longer to realize the software simulation than a single calculation.

[0033] One of the slightly optimized schemes is to accelerate the computational parts to be parallelized using multi-processing or multi-threading techniques so that different computations that require dimensional parallelization are distributed to different processes and calculated simultaneously. However, this scheme is usually limited by the hardware architecture and operating system and needs to be implemented separately for various hardware. This is because the upper layer program interface realized by multi-processing and multi-threading is highly dependent on the details of the hardware and the operating system, so when it is executed on different hardware and software, the code needs to be rewritten and the code reusability is low. Therefore, the cost of development and use increases significantly, and the support for multi-processing and multi-threading is not sufficient on heterogeneous hardware such as GPUs and TPUs (Tensor Processing Units). In the case of multi-processing, each task is only calculated in a single process, and the vector operation set (i.e., the support of the original vector operation set of the hardware) cannot be fully utilized, which also adversely affects the time per calculation. In addition, such multi-process parallelization is limited by the number of CPU cores, and a single CPU usually only allows the simultaneous execution of a few or a few tens of computational modules. If the dimension to be parallelized is 1000, it will require tens of times more time to complete than a single calculation.

[0034] The present invention proposes to introduce the idea of ​​vector parallelization into quantum circuit simulation. The vector parallelization in the present invention essentially regards the parallel dimension as an extra dimension of linear algebra, and directly realizes batch parallelism from the bottom-layer operators, which can fully utilize the advantages of hardware such as GPUs. For example, when the parallel dimension size is 1000, it usually takes the same time as a single calculation. Therefore, the efficiency of large-scale quantum simulation is much higher than that of traditional methods. In addition, the scheme has a good design interface regardless of the details of the back-end hardware and system, making it extremely convenient to use and develop.

[0035] In the quantum circuit simulation method according to the embodiment of the present invention, the execution subject of each step may be a classical computer such as a PC (Personal Computer), and the method may be realized by executing a corresponding computer program by a classical computer. In the following embodiment of the method, for convenience of explanation, the execution subject of each step is described as a computer device.

[0036] 1 is a flowchart of a quantum circuit simulation method according to one embodiment of the present invention. Each step of the method is performed by a computer device, for example, a classical computer. The method may include the following steps (110 to 140).

[0037] In step 110, an original function for quantum circuit simulation is obtained, and a first input parameter that requires parallelization in the original function is determined.

[0038] The process of quantum circuit simulation may include one or more of the steps of processing an input wave function, optimizing a circuit variation parameter, generating a circuit noise, generating a circuit structure, and performing a circuit measurement. In some aspects, the original function is used to realize a target step in the quantum circuit simulation, including, but not limited to, any of processing an input wave function, optimizing a circuit variation parameter, generating a circuit noise, generating a circuit structure, and performing a circuit measurement. When the original function processes an input wave function, the original function calculates the input wave function of the target quantum circuit to obtain a corresponding calculation result. When the original function optimizes a circuit variation parameter, the original function optimizes the circuit variation parameter of the target quantum circuit to obtain an optimized circuit variation parameter.

[0039] The number of input parameters of the original function may be one or more. The above-mentioned first input parameter means an input parameter in the original function that needs to be parallelized. The number of the first input parameters may be one or more. As an example, the original function f is expressed as an original function f(x, y, w) having three input parameters, and includes three input parameters x, y, and w. If the input variable that needs to be parallelized among the three input variables of this original function f is x, the above-mentioned first input parameter is x, and the other two parameters y and w do not need to be parallelized. Alternatively, if the input variables that need to be parallelized among the three input variables of this original function f are x and y, the above-mentioned first input parameters are x and y, and the other variable w does not need to be parallelized.

[0040] According to different original functions, the input parameters are different, and the first input parameters that need to be parallelized are also different. In practical applications, after the original function is determined, its input parameters are determined, and one or more input parameters suitable for parallelization processing can be selected as the first input parameters according to the actual situation.

[0041] In step 120, the original function is transformed into an objective function based on the original function and the first input parameter, where the input parameters of the objective function include a transformed first input parameter corresponding to the first input parameter, and the tensor corresponding to the transformed first input parameter is a result of combining multiple parallelized tensors corresponding to the first input parameter. The input parameters of the objective function include a transformed first input parameter corresponding to the first input parameter that requires parallelization. In some aspects, when the input parameters of the original function include a target input parameter that does not require parallelization in addition to the first input parameter that requires parallelization, the objective function may be obtained in the following manner. That is, the objective function is obtained by modifying the first input parameter in the original function to the transformed first input parameter and maintaining the target input parameter. That is, the input parameters of the objective function include the above-mentioned target input parameter that does not require parallelization in addition to the transformed first input parameter that corresponds to the first input parameter. As an example, if the original function f is represented as f(x, y, w), and among the three input variables of the original function f, x and y require parallelization and w does not require parallelization, the objective function f' may be represented as f'(xs, ys, w), where xs represents the transformed x corresponding to the input variable x, ys represents the transformed y corresponding to the input variable y, and the input variable w does not require parallelization and therefore does not need to be transformed.

[0042] In some aspects, when the input parameters of the original function do not include a target input parameter that does not require parallelization, the objective function may be obtained in the following manner: the first input parameter in the original function is modified to the first input parameter after transformation to obtain the objective function. As an example, the original function f is denoted as f(x, y, w), and assuming that all three input variables of the original function f are parallelized, the objective function f' can be denoted as f'(xs, ys, ws), where xs represents the transformed x corresponding to the input variable x, ys represents the transformed y corresponding to the input variable y, and ws represents the transformed w corresponding to the input variable w.

[0043] In some aspects, when the parallelization size (also called "batch size") corresponding to the first input parameter is n, where n is an integer greater than 1, that is, when parallel processing is performed on n tensors corresponding to the first input parameter, the tensor corresponding to the first input parameter after transformation is the integration result of the above n tensors (also called the "combined result"). In an embodiment of the present invention, the tensor is a high-dimensional array, n1×n2×n3...×n m tensors contain m, where m is the order of the tensor and m is a positive integer. When m=1, the tensor is a one-dimensional array, i.e., a vector. When m=2, the tensor is a two-dimensional array, i.e., a matrix. Note that m may be an integer greater than or equal to 2, i.e., the dimensions of a tensor array may be extended infinitely.

[0044] In some aspects, multiple parallelized tensors corresponding to the first input parameter are combined in a destination dimension to obtain a tensor corresponding to the transformed first input parameter, where a size in the destination dimension of the tensor corresponding to the transformed first input parameter corresponds to the number of parallelized tensors corresponding to the first input parameter.

[0045] As an example, as shown in Fig. 2, assuming that the corresponding parallelization size of the input parameter x that needs to be parallelized in the original function f(x, y, w) is n, the n tensors corresponding to the input parameter x are combined in the target dimension, and the combined tensor is a tensor corresponding to xs. In some embodiments, the value of n may be 2, 10, 50, 100, 200, 500, 1000, etc., and may be specifically set according to actual needs, and the present invention is not limited thereto.

[0046] In step 130, obtain an execution result corresponding to the objective function based on the input parameters of the objective function.

[0047] After converting the original function into an objective function, the objective function is executed to obtain a corresponding execution result. In some aspects, the objective function is executed using a vector parallelization method to obtain an execution result corresponding to the objective function. A converted first input parameter included in the input parameters of the objective function is processed using the vector parallelization method to obtain an execution result corresponding to the objective function. In an embodiment of the present invention, the idea of ​​vector parallelization is introduced into quantum circuit simulation. Since the converted first input parameter is included in the input parameters of the objective function, the vector parallelization method is adopted to process a tensor corresponding to the converted first input parameter, and the execution result corresponding to the objective function is directly obtained by single-step calculation.

[0048] If the time it takes to execute the original function is t and the parallelization size is n, then when the original function is executed n times in a simple loop, the total time is n × t. However, when the original function is converted into an objective function and then the objective function is executed using vector parallelization, the time is theoretically t, which is a significant reduction compared to n × t, and the reduction effect becomes greater as n increases.

[0049] In step 140, a quantum circuit simulation is performed based on the execution result corresponding to the objective function. After obtaining the execution result for the objective function, a quantum circuit simulation may be performed. For example, if the original function processes an input wave function, the execution result corresponding to the corresponding objective function includes processing results corresponding to each of the multiple input wave functions, and the subsequent process can perform a process such as optimizing circuit variation parameters based on the processing results corresponding to each of the multiple input wave functions. For example, if the original function optimizes circuit variation parameters, the execution result corresponding to the corresponding objective function includes optimization results corresponding to each of multiple sets of circuit variation parameters, and the subsequent process can select an optimal set of circuit variation parameters as the final target quantum circuit based on the optimization results corresponding to each of the multiple sets of circuit variation parameters.

[0050] In addition, quantum circuit simulation enables the operation of a quantum computer (or quantum circuit) to be simulated or approximated using classical computing and numerical computation methods, accelerating research and design of quantum circuits while saving costs.

[0051] The technology according to the present invention introduces the idea of ​​vector parallelization into quantum circuit simulation; that is, an original function is converted into an objective function, the input parameters of the objective function include a converted first input parameter corresponding to the first input parameter requiring parallelization, and the tensor corresponding to the converted first input parameter is the result obtained by combining a plurality of parallelized tensors corresponding to the first input parameters. By executing the objective function, a computational process that would normally require multiple executions can be parallelized and executed into a single computational process, so that it can be completed in the same amount of time as a single calculation, thereby significantly improving the efficiency of quantum circuit simulation.

[0052] 3 is a flowchart of a quantum circuit simulation method according to another embodiment of the present invention. Each step of the method is performed by a computer device, for example, a classical computer. The method may include the following steps (310 to 350).

[0053] In step 310, an original function for quantum circuit simulation is obtained, and a first input parameter that requires parallelization in the original function is determined.

[0054] Step 310 is the same as step 110 in the embodiment shown in FIG. 1. For details, the description of the embodiment in FIG. 1 may be referred to, and the description thereof will be omitted in this embodiment.

[0055] In step 320, a function transformation interface is invoked, transmitting to the function transformation interface the original function and first information, which is used to indicate a first input parameter in the original function that requires parallelization.

[0056] The function transformation interface is used to realize the function of transforming an original function into a target function. The function transformation interface may be a user-oriented interface such as an API (Application Programming Interface).

[0057] The first information is used to indicate the first input parameter that requires parallelization in the original function. In some aspects, the first information is used to indicate the position of the first input parameter that requires parallelization in the original function. For example, the position numbers of input variables x, y, and w in the original function f(x, y, w) are 0, 1, and 2, respectively, and if the input variable that requires parallelization is x, the first information is 0. Alternatively, if the input variables that require parallelization are x and y, the first information is 0 and 1. By indicating the first input parameter that requires parallelization in the original function by its position, it is possible to realize an accurate and concise instruction.

[0058] In step 330, the original function is transformed into an objective function based on the first information by a function transformation interface, where the input parameters of the objective function include transformed first input parameters corresponding to the first input parameters, and the tensor corresponding to the transformed first input parameters is a result of combining multiple parallelized tensors corresponding to the first input parameters.

[0059] The function transformation interface determines a first input parameter that requires parallelization in the original function based on the first information, and then transforms the original function into an objective function based on the first input parameter. For example, for a first input parameter that requires parallelization in the original function, combine multiple parallelized tensors corresponding to the first input parameter in the target dimension to obtain a tensor corresponding to the transformed first input parameter. For a target input parameter that does not require parallelization in the original function, keep the target input parameter as an input parameter of the objective function. In this way, the input parameters of the objective function include the transformed first input parameter, and preferably further include the target input parameter. The function transformation interface supports a vector parallelization function, and through the above-mentioned transformation of the function transformation interface, the objective function may be used to output a result of calculating multiple original functions in parallel.

[0060] In some aspects, the function transformation interface further supports an automatic differentiation function in addition to the vector parallelization function. The transformed objective function is not only used to output the result of calculating a plurality of original functions in parallel, but also used to output differential coefficient information of the original function with respect to a second input parameter, the second input parameter being an input parameter of the original function that requires a differential operation. The number of second input parameters may be one or more. The second input parameter and the first input parameter may be the same or different. For example, the input parameters in the original function f(x,y,w) are x, y, and w, the first input parameter that requires parallelization is x, and the second input parameter that requires a differential operation is also x. Alternatively, the first input parameter that requires parallelization is x and y, and the second input parameter that requires a differential operation is x. Alternatively, the first input parameter that requires parallelization is w, and the second input parameter that requires a differential operation is y.

[0061] In some aspects, when invoking the function conversion interface, the original function, the first information, and the second information are transmitted to the function conversion interface, and the second information is used to indicate a second input parameter that requires a differential operation in the original function. In some aspects, the second information is used to indicate a position of the second input parameter that requires a differential operation in the original function. For example, the position numbers of the input variables x, y, and w in the original function f(x, y, w) are 0, 1, and 2, respectively, and the first input variables that require parallelization are x and y, and the second input variable that requires a differential operation is x, the first information is 0 and 1, and the second information is 0. Accordingly, the original function is converted into an objective function based on the first information and the second information via the function conversion interface, and the objective function outputs a result of calculating a plurality of original functions in parallel, and outputs information on the derivative of the original function with respect to the second input parameter.

[0062] In some aspects, the function transformation interface includes a first interface and a second interface. The first interface transforms an original function into an objective function based on first information. The second interface transforms an original function into an objective function based on the first information and the second information. That is, the first interface is a function transformation interface that supports a vector parallelization function, in other words, the first interface is a function transformation interface that supports only the vector parallelization function. The second interface is a function transformation interface that supports the vector parallelization function and the automatic differentiation function.

[0063] As an example, the first interface is a vmap interface, and the function signature of this vmap interface is, for example, vmap(f: Callable[..., Any], vectorized_argnums: Union[int, Sequence[int]] = 0) → Callable[..., Any]. Here, f represents the original function to be parallelized, and vectorized_argnums indicates the first input parameter that needs to be parallelized, and is used, for example, to indicate the position of the first input parameter that needs to be parallelized. In the function signature of the above vmap interface, f: Callable[..., Any] represents that the original function f is a function whose input and output are tensors. vectorized_argnums: Union[int, Sequence[int]] = 0 means that vectorized_argnums is a number (e.g., 0 or 1 or 2 or 3, etc.) or a number sequence (e.g., 0, 1 or 0, 1, 2 or 1, 2, etc.), and the default value of vectorized_argnums is 0. The output is defined as Callable[..., Any].

[0064] As shown in FIG. 2, a schematic diagram of the function of the vmap interface is shown as an example. For any original function f (for example, an original function with any input and output being tensors), another objective function f' is output after function transformation by the vmap interface. f'=vmap(f,vectorized_argnums=(0,1)), where vectorized_argnums=(0,1) is the position number 0 and 1 of the first input variable that needs to be parallelized in the original function f, that is, x and y need to be parallelized, and w does not need to be parallelized. The input format of this objective function f' (i.e., the type and shape of the input parameters) is the same as the input format of the original function f, but for the input parameters at the positions indicated by vectorized_argnums, the corresponding tensor shape has one more dimension than the corresponding input tensor of the original function f (i.e., the vertical dimension in FIG. 2 does not exist in the original function f), and the size of that dimension is n, where n is an integer greater than 1, and this n is also called the batch size. The final calculation effect of the objective function f' obtained by converting the vmap interface is equivalent to calculating the original function f of degree n, and the input of the original function f each time is a slice of the dimension one lower than the parameters at non-vectorized_argnums positions and the variables at vectorized_argnums positions. In Figure 2, tensors of the same color are one slice, as shown by the dashed frame in Figure 2. However, these n calls to the original function f can be calculated simultaneously in parallel as a unified operator by fusing the lower layers.

[0065] As an example, the second interface is a vectorized_value_and_grad interface, which can be abbreviated as vvag interface. The function signature of the vvag interface is, for example, vectorized_value_and_grad(f: Callable[..., Any], argnums: Union[int, Sequence[int]] = 0, vectorized_argnums: Union[int, vectorized[int]] = 0) → Callable[..., Tuple[Tensor, Tensor]]. Here, f represents the original function to be parallelized, vectorized_argnums is used to indicate the position of the first input parameter that needs to be parallelized, for example, the first input parameter that needs to be parallelized, and argnums is used to indicate the position of the second input parameter that needs to be differentially operated, for example, the second input parameter that needs to be differentially operated. In the above function signature of the vvag interface, f: Callable[..., Any] represents that the original function f is a function with any input and output being a tensor. vectorized_argnums: Union[int, Sequence[int]] = 0 means that vectorized_argnums is a number (e.g., 0 or 1 or 2 or 3, etc.) or a sequence of numbers (e.g., 0,1 or 0,1,2 or 1,2, etc.), and the default value of vectorized_argnums is 0. Callable: ... [int, vectorized[int]] = 0 means that argnums is a number (e.g., 0 or 1 or 2 or 3, etc.) or a sequence of numbers (0,1 or 0,1,2 or 1,2, etc.), and the default value of Union is 0. The output is defined as Callable[..., Tuple[Tensor, Tensor]], which means that the output contains two tensors, one of which is the result of calculating the original function f multiple times in parallel, and the other tensor is the derivative information of the input parameters for the position of the original function f indicated by argnums.

[0066] For any original function f (for example, an original function with any input and output being tensors), another objective function f' is output by function conversion in the vvag interface. The objective function f' is similar to the vmap interface in that the tensor shape corresponding to the input variable at the position indicated by vectorized_argnums has one more dimension than the input tensor corresponding to the original function f. In addition, the return value of the objective function f' converted via the vvag interface returns the result of calculating the original function f multiple times in parallel, as well as the differential coefficient information of the input variable for the position indicated by argnums of the original function f.

[0067] As an example, a mathematical expression corresponding to the vvag interface is an original function f, and an objective function f' obtained by transforming the original function f by the vvag interface.

[0068] f'=vvag(f,argnums=k,vectorized_argnums=p) f'(arg[0],…,arg[p],…,arg[k],…)=(v,g) vi=f(arg[0],…,arg[p][i],…,arg[k],…)

[0069]

number

[0070]

number

[0071] In the above embodiment, the first interface is a vmap interface and the second interface is a vvag interface, and the above two interfaces with different functions according to the present invention are described as an example. The embodiment of the present invention does not limit the names of the above two interfaces, and developers can set them themselves.

[0072] In some aspects, the function transformation interface is an application programming interface (API) encapsulated in a machine learning library, which provides a vector instruction set for executing the objective function. For example, the above-mentioned lower-layer machine learning library may be a machine learning library such as tensorflow, jax, etc., in which the lower-layer machine learning library is provided with a vector instruction set for executing the objective function, and the function transformation interface is encapsulated in the machine learning library. This ensures that the realization of vector parallelism is independent of the lower-layer framework, and the function of vector parallelism can be realized simply by calling the function transformation interface.

[0073] In step 340, a vector parallel processing is performed on the tensor corresponding to the transformed first input parameter using the vector instruction set to obtain an execution result corresponding to the objective function.

[0074] After converting the original function into an objective function by the function conversion interface, a vector instruction set provided by a lower-layer machine learning library is further called, and the vector instruction set is executed by hardware such as a CPU, GPU, or TPU to perform vector parallel processing on the tensor corresponding to the converted first input parameter, and obtain an execution result corresponding to the objective function. The vector instruction set includes executable instructions for a processor to perform vector parallel processing on the tensor corresponding to the converted first input parameter. The above vector instruction set provides executable instructions that can be executed by a processor such as a CPU, GPU, or TPU, and these executable instructions can realize the functions of lower-level operators such as addition and multiplication. In this embodiment, by adopting a method of executing a vector instruction set by a processor such as a CPU, GPU, or TPU to realize vector parallel processing, the bottleneck of the number of parallelizable operations can be overcome and the parallelization size can be sufficiently improved compared to the case of executing multi-processes or multi-threads in an operating system.

[0075] In step 350, a quantum circuit simulation is performed based on the execution result corresponding to the objective function.

[0076] After obtaining the execution result for the objective function, the quantum circuit simulation can be executed. Step 350 is the same as step 140 in the embodiment shown in Fig. 1, and specifically, the description of the embodiment in Fig. 1 may be referred to, and the description thereof will be omitted in this embodiment.

[0077] The technology according to the present invention can convert an original function into an objective function by calling a function transformation interface and inputting into the function transformation interface first information indicating an original function and a first input parameter that requires parallelization in the original function, thereby realizing vector parallelization processing, improving the computational efficiency of the original function, and further improving the efficiency of quantum circuit simulation.

[0078] In some embodiments, the function transformation interface supports an automatic differentiation function in addition to the vector parallelization function, so that the objective function obtained by the transformation can output the derivative information of the original function with respect to the second input parameter in addition to the result of calculating the original function multiple times in parallel. This is particularly suitable for the scenario of the variational quantum algorithm, and can facilitate the development and research of the variational quantum algorithm.

[0079] The following describes application scenarios of vector parallelism to quantum circuit simulation. In an embodiment of the present invention, vector parallelism can be applied to steps such as processing input wave functions in quantum circuit simulation, optimizing circuit variation parameters, generating circuit noise, generating circuit structures, and performing circuit measurements. Below, these application scenarios will be described through several embodiments.

[0080] FIG. 4 is a schematic diagram of a numerical simulation of a target quantum circuit according to one embodiment of the present invention. This target quantum circuit can realize a numerical simulation of a variational quantum algorithm. By using the technology according to the present invention, all the main components of the simulation can favorably support vector parallelization, and can significantly accelerate quantum simulation in various application scenarios. As shown in FIG. 4, the operation that requires simulation calculation is to input a specified quantum state (in the form of a matrix product state or vector), and then through the action of a quantum circuit that includes parameters and may include noise, measure the output state in different bases in the form of measuring a given Pauli string, and obtain the gradient with respect to the optimization function value and weight for optimization iteration.

[0081] In Figure 4, the input quantum state of the target quantum circuit is (outer 9) The circuit parameters of the target quantum circuit are represented as U θ The measurement results are expressed as (Outside 10) Represented as TIFF0007589884000012.tif14123, the optimization function (Outside 11) TIFF0007589884000013.tif14123, where: (Outside 12) TIFF0007589884000014.tif11123 is the i-th measurement result, where i is an integer, (Outside 13) TIFF0007589884000015.tif10123 is U θ Represents the conjugate transpose of .

[0082] 1. Process input wave functions in parallel In this example, the original function is used to realize a target step in a quantum circuit simulation, the target step including a step of processing an input wave function, and the first input parameter includes the input wave function of the target quantum circuit.

[0083] In some aspects, a tensor corresponding to the transformed first input parameter is obtained, the tensor corresponding to the transformed first input parameter being a result of combining a plurality of parallelized input wave functions of a target quantum circuit. A vector parallelization process is performed on the tensor corresponding to the transformed first input parameter using a vector instruction set to obtain an execution result corresponding to an objective function, where the execution result corresponding to the objective function includes a process result corresponding to each of the plurality of parallelized input wave functions.

[0084] Taking variational quantum circuit simulation as an example, variational quantum circuit simulation consists of three parts: input wave function, circuit unitary matrix, and circuit measurement. In many tasks, the input wave function of the circuit is an all-zero direct product state, in which case there is no need to specify the input wave function. However, in some tasks, the same circuit structure may be required to receive different input wave functions and perform processing and output. In such cases, it is appropriate to perform simulation by vector-parallelizing the parameter called the input wave function.

[0085] For example, a task like quantum machine learning requires batch processing of an input data set and computing the results for each batch of input data simultaneously. This batch of data is encoded as an input wave function that is input to the quantum machine learning model as an input wave function. Therefore, by processing the input wave function in parallel, it is easy to process the batch input of quantum machine learning, and it is possible to achieve acceleration at large batch sizes. Numerical experiments show that in the case of GPU, batch size=512 and batch size=1 require approximately the same computation time. This corresponds to accelerating the simulation by a factor of direct batch size due to the optimization of the underlying architecture of vector parallelism.

[0086] 5 is a schematic diagram of parallel processing of input wave functions according to one embodiment of the present invention. As an example of using the above-mentioned vvag interface, the objective function f'=vvag(f, vectorized_argnums=0, argnums=1), where f is the original function, vectorized_argnums=0 indicates that the input parameter that needs to be parallelized is the input wave function of the target quantum circuit, and argnums=1 indicates that the input parameter that needs to be differentiated is the weight of the target quantum circuit. The input parameters of the objective function f' include the weight 51 of the target quantum circuit, a result 52 obtained by combining multiple parallelized input wave functions of the target quantum circuit, the objective function f' is executed in vector parallelization, and processing results 53 corresponding to each of the multiple parallelized input wave functions, and weight differential coefficient information 54. Then, based on the processing results corresponding to each of the multiple parallelized input wave functions, steps such as optimizing circuit variation parameters may be performed. For example, the circuit variation parameters of the target quantum circuit may be adjusted based on the difference between the processing result corresponding to the input wave function and a desired result so that the processing result corresponding to the input wave function is as close as possible to the desired result.

[0087] In this example, processing the input wave functions in parallel can significantly improve the efficiency of batch processing of input wave functions in quantum circuit simulations.

[0088] 2. Optimize the circuit variation parameters in parallel In this example, the original function is used to achieve a target step in a quantum circuit simulation, the target step including optimizing circuit variational parameters, and the first input parameters include the circuit variational parameters of the target quantum circuit.

[0089] In some aspects, a tensor corresponding to the transformed first input parameter is obtained, the tensor corresponding to the transformed first input parameter being a result of combining a plurality of sets of parallelized circuit variation parameters of the target quantum circuit. A vector parallelization process is performed on the tensor corresponding to the transformed first input parameter using a vector instruction set to obtain an execution result corresponding to the objective function, where the execution result corresponding to the objective function includes an optimization result corresponding to each of the plurality of sets of parallelized circuit variation parameters.

[0090] In variational quantum optimization problems, the gradient descent parameters often get stuck in local minima. This requires performing multiple independent optimizations on the same problem with different initial parameters, and then selecting the set of parameters that optimizes the optimization function. Such multiple independent optimization attempts would double the number of time-consuming optimizations in a simple looping scheme. In this case, vector parallelization can be performed on the variables that correspond to the circuit variation parameters.

[0091] The embodiment of the present invention proposes multiple independent optimizations using parallel acceleration. In particular, for algorithms such as VQE where the optimization is very small locally, multiple parallel optimizations are performed simultaneously, and the optimal convergence parameters are finally selected. The time required for such multiple optimizations is almost exactly the same as the time required for one optimization. This optimization method is called batched VQE optimization. That is, the parallel execution of multiple independent optimizations may be realized from lower-layer operators.

[0092] FIG. 6 is a schematic diagram of the parallel optimization of circuit variation parameters according to one embodiment of the present invention. As an example of using the above-mentioned vvag interface, the objective function f'=vvag(f, vectorized_argnums=0, argnums=0), where f is the original function, vectorized_argnums=0 indicates that the input parameters that need to be parallelized are the circuit variation parameters (weights) of the target quantum circuit, and argnums=0 indicates that the input parameters that need to be differentiated are also the circuit variation parameters (weights) of the target quantum circuit. The input parameters of the objective function f' are obtained by combining multiple sets of parallelized circuit variation parameters of the target quantum circuit 61, optimization results 62 corresponding to each of the multiple sets of parallelized circuit variation parameters obtained by executing the objective function f' by vector parallelization, and differential coefficient information 63 of the circuit variation parameters. Then, based on the optimization results corresponding to each of the multiple sets of parallelized circuit variation parameters, an optimal set of circuit variation parameters can be selected as the parameters of the final target quantum circuit.

[0093] In this example, by optimizing the circuit variation parameters in parallel, the optimization efficiency for the circuit variation parameters in the quantum circuit simulation process can be significantly improved.

[0094] 3. Generate circuit noise in parallel In this example, the original function is used to achieve a target step in a quantum circuit simulation, the target step including generating circuit noise, and the first input parameter includes a random number for generating circuit noise for the target quantum circuit.

[0095] In some aspects, a tensor corresponding to the transformed first input parameter is obtained. The tensor corresponding to the transformed first input parameter is a result obtained by combining a plurality of sets of parallelized random numbers for generating circuit noise of the target quantum circuit. A vector parallelization process is performed on the tensor corresponding to the transformed first input parameter using a vector instruction set to obtain an execution result corresponding to the objective function. Here, the execution result corresponding to the objective function includes a noise simulation result corresponding to each of the plurality of parallelized random numbers. Then, the execution result of the target quantum circuit in the noise simulation result corresponding to different random numbers is observed, and the difference in the execution status and execution result of the target quantum circuit in different noise environments can be obtained.

[0096] In the Monte Carlo trajectory simulator scenario, the behavior of different probability distributions of noise is simulated with different random numbers. Since the Monte Carlo trajectory simulator needs to average a large number of different random number arrangements of observations to evaluate the observations, the random number parameter is vector-parallelized, and tens or hundreds of random number arrangements can be simulated simultaneously. Therefore, the scheme of the present invention can be used to accelerate the Monte Carlo simulation of quantum noise, parallelize different random number inputs, and vectorize and parallelize the Monte Carlo simulation of noise. Here, the operation of making random numbers the parallel dimension and the operation of making the input wave function the parallel dimension are similar, and therefore, no separate schematic diagrams are shown.

[0097] In this example, generating circuit noise in parallel can significantly improve the efficiency of generating circuit noise in the quantum circuit simulation process.

[0098] In the above three scenarios, without any special processing on the implemented functions, we can directly call the vmap or vvag interface, specify the position of the input parameters that need to be parallelized, and turn them into efficient simulations that support vector parallelism as the vectorized_argnums parameter in the API.

[0099] In the following two scenarios, it is necessary to realize some tensor parameterization summation effect based on the tensor network-based circuit simulator, so that when the input parameters are different, the corresponding simplified tensor network structure is different. As shown in Figure 7, such local tensor summation is parameterized and embedded in the entire tensor network while maintaining the same local tensor shape, thereby realizing the idea of ​​parameterization control of simulation of different tensor network structures (or quantum circuit structures). Figure 7 shows a segment of parameterized structural information contained in a tensor network, where: (Outside 14) TIFF0007589884000016.tif11121 is the structure parameter. Different one-hot vectors (Outside 15) TIFF0007589884000017.tif8121, the local thing of interest in the tensor network is the CNOT (controlled NOT) gate ( (Outside 16) TIFF0007589884000018.tif9121=(1,0,…)) or single-bit rotary gate cross product ( (Outside 17) TIFF0007589884000019.tif11121=(0,1,…)). In simulations with parameterized structures with more subblocks, (outside 18) TIFF0007589884000020.tif11121We only need to introduce the structure parameter vector. The same goes for the parameterization of the measurements, and the local tensor at the selected measurement location is (Outside 19) TIFF0007589884000021.tif16121 is sufficient. Here, λ i represents a four-dimensional vector corresponding to the i-th quantum bit, and σ0=I (the I operator is (outside 20) TIFF0007589884000022.tif18121), σ1, σ2 and σ3 correspond to the Pauli matrices X, Y and Z. In this case, the Pauli string corresponding to the last measurement can be directly controlled by inputting a set of parameter tensors with shape [qubits, 4]. All the computational processes and computational graphs created by instant compilation are completely identical and can be reused. For example, the measurement parameters [[1,0,0,0],[0,1,0,0],[0,0,0,1]] represent that the desired Pauli string to be measured is I0X1Z2, which is simplified as X1Z2. More importantly, the above scheme does not change the overall static structure of the tensor network, and therefore can fully support instant compilation and pre-optimization search of tensor degeneracy paths.

[0100] 4. Generate circuit configurations in parallel In this example, the original function is used to achieve a target step in a quantum circuit simulation, the target step including generating a circuit structure, the first input parameters include control parameters for generating the circuit structure of the target quantum circuit, and different control parameters are used to generate different circuit structures.

[0101] In some aspects, a tensor corresponding to the transformed first input parameter is obtained. The tensor corresponding to the transformed first input parameter is a result obtained by combining a plurality of sets of parallelized control parameters for generating a circuit structure of a target quantum circuit. A vector parallelization process is performed on the tensor corresponding to the transformed first input parameter using a vector instruction set to obtain an execution result corresponding to an objective function. Here, the execution result corresponding to the objective function includes a result of generating a circuit structure corresponding to each of the plurality of sets of parallelized control parameters.

[0102] In order to realize parallelization of different circuit structures, it is necessary to fully utilize the characteristics of the lower-layer simulator being a simulator based on tensor networks, and for circuit parts with different structures, a parameterized sum of tensors representing the different structures is performed, i.e., these parameters control the circuit structure and at the same time satisfy the constraints of on-the-fly compilation. This is because even if the circuit configuration changes, the supernet represented by the most generalized parameterized sum generalizes all possibilities with a fixed tensor shape, so on-the-fly compilation can be successfully realized.

[0103] The differentiable quantum structure search triggered by DARTS involves the task of evaluating a target optimization function corresponding to a large number of different circuit structures in one batch, which is perfectly suited to the scenario of parallelized circuit structures. This allows quantum software with vector parallelization to significantly improve the efficiency of differentiable quantum structure search, i.e., variational circuit automation design. This is a parallel paradigm that is inherent to tensor simulators and difficult to realize with state simulators.

[0104] 8 is a schematic diagram of parallel generation of a circuit structure according to one embodiment of the present invention. As an example of using the above-mentioned vvag interface, the objective function f'=vvag(f, vectorized_argnums=0, argnums=1), where f is the original function, vectorized_argnums=0 indicates that the input parameters that need to be parallelized are the control parameters of the circuit structure of the target quantum circuit, and argnums=1 indicates that the input parameters that need to be differentiated are the weights of the target quantum circuit. The input parameters of the objective function f' include the weights 81 of the target quantum circuit, a result 82 obtained by combining multiple sets of parallelized control parameters of the circuit configuration of the target quantum circuit, a plurality of sets of measurement results 83 obtained based on the generation results of the plurality of sets of circuit structures obtained by executing the objective function f' in vector parallelization, and differential coefficient information 84 of the measurement results with respect to the weights. Then, from the multiple sets of circuit structure generation results, one optimal circuit structure generation result is selected, and based on that, the target quantum circuit can be arranged in actual hardware.

[0105] In this example, the efficiency of generating a circuit structure in a quantum circuit simulation can be significantly improved by generating the circuit structure in parallel.

[0106] 5. Performing Circuit Measurements in Parallel In this example, the original function is used to perform a target step in a quantum circuit simulation, the target step including performing circuit measurements, the first input parameters include measurement parameters for performing the circuit measurements for the target quantum circuit, and different measurement parameters are used to generate different measurement results.

[0107] In some aspects, a tensor corresponding to the transformed first input parameter is obtained. The tensor corresponding to the transformed first input parameter is a result obtained by combining a plurality of sets of parallelized measurement parameters for performing circuit measurements on the target quantum circuit. A vector parallelization process is performed on the tensor corresponding to the transformed first input parameter using a vector instruction set to obtain an execution result corresponding to an objective function. Here, the execution result corresponding to the objective function includes a measurement result corresponding to each of the plurality of sets of parallelized measurement parameters. The execution result of the target quantum circuit can then be observed based on the measurement result corresponding to each of the plurality of sets of measurement parameters.

[0108] For small-sized systems, the numerical simulation can completely preserve the wave function information of the final state output of the quantum circuit. In this case, there are various schemes for the numerical simulation of the measurement results. For example, this wave function information can be reused to calculate the expectation value of different Pauli string operators at the wave function. Also, if the smaller system can completely represent the matrix form of the Hamiltonian operator in memory, the sum of the Pauli strings can be directly combined into one independent Hamiltonian matrix to calculate the expectation value, which is more efficient.

[0109] However, in large-sized systems such as those supported only by tensor network simulators, it is not possible to reuse the wave functions of the final state (for which there is not enough space in memory) to find the desired solutions for different Pauli strings. Also, when finding the expected values ​​of different operators using successively degenerate tensor circuit networks, it is necessary to search for new degenerate paths and compile on the fly, which wastes a lot of time. Therefore, following the scheme of finding the sum of parameterized circuit structures, the sum of parameterized circuit measurements can be realized, so that the Pauli strings of the corresponding measurement operators can be controlled by a one-hot vector of input parameters. In this case, only one on-the-fly compilation supports the finding of the expected solutions for all different Pauli strings. Furthermore, in combination with the vector parallelization of the structure parameters in the measurements, the expectation of efficiently calculating multiple Pauli strings simultaneously can be realized, without the need for re-compiling (on-the-fly) for each different measurement operator.

[0110] In this example, for situations where memory cannot store the complete wavefunction and therefore cannot reuse the complete wavefunction to evaluate different Pauli strings, vector parallelization of parameterized circuit measurements can be used to efficiently achieve large system circuit simulations.

[0111] The above describes the application scenarios of the technology of the present invention and the corresponding acceleration effect. Generally, in hardware such as GPU, vector parallelization realizes an acceleration that is almost equal to the parallel dimension size. In general scenarios, this can achieve an efficiency improvement of tens to hundreds of times compared with simple loop calculation, and the additional development cost required can be ignored, which is user-friendly. The following will further explain the importance of this efficiency through simple quantitative results.

[0112] 1. Accelerating quantum machine learning tasks.

[0113] As mentioned above, since the input data needs to be batch-processed in the machine learning task, the vector parallelization of the parameters of the input wave function can significantly improve the computational efficiency of quantum machine learning. Different mainstream quantum software simulate the same parameterization circuit to perform the MNIST discrimination problem, and as shown in FIG. 9, the time taken for a single step varies with the change in batch size. Here, line 91 shows the change in the execution time on the GPU with the vector parallelization scheme of the present invention with the batch size, line 92 shows the change in the execution time on the CPU with the vector parallelization scheme of the present invention with the batch size, line 93 shows the change in the execution time with the pennylane scheme with the batch size, and line 94 shows the change in the execution time with the tensorflow-quantum scheme with the batch size. As can be seen from this figure, based on the vector parallelization technique of the present invention, for larger batch sizes, the calculation on the GPU can be accelerated by more than 100 times compared to other mainstream software.

[0114] 2. Realization of highly efficient simulation of ultra-large quantum systems through measurement parallelization.

[0115] According to the vector parallelization technology, by realizing the reuse of different Pauli string measurement calculation graphs in the situation where the wave function cannot be reused, a single V100 can simulate a quantum chemical ground state simulation VQE problem of more than 100 bits. This is the first time in the world that the entire flow of the variational quantum algorithm has been exhibited and simulated in such a large system. The convergence results of the simulation of the one-dimensional transverse magnetic field Ising model phase transition point and the one-dimensional isotropic Heisenberg model at the corresponding 100 lattice points are shown in Table 1 below. For a large-scale problem such as 100 lattice point VQE, the time required for one optimization iteration is on the order of seconds, and this simulation task cannot be realized by mainstream quantum state-based simulators due to the divergence of the memory exponent.

[0116] [Table 1] The scheme of the present invention is based on the self-developed TensorCircuit quantum simulation framework. TensorCircuit is a next-generation quantum computing simulation software based on the latest machine learning framework, supporting multiple hardware platforms and multiple software backends, as well as supporting automatic differentiation, on-the-fly compilation, vector parallelization and heterogeneous hardware acceleration. It is especially suited to the design, research and development of algorithms in the NISQ era, and perfectly supports the simulation of quantum-classical hybrid computing paradigms. It is entirely compiled in simple Python, and the algorithm uses tensor nets as the core engine, while maintaining user friendliness and having execution efficiency that exceeds optimized C++ code. The scheme of the present invention is fully realized in the TensorCircuit framework, can be used as is, and achieves efficiency far exceeding that of similar software.

[0117] The scheme and TensorCircuit platform of the present invention can significantly accelerate and enhance the verification development of quantum hardware in the NISQ era and the design and testing of quantum software and algorithms. The scheme demonstrates effective quantum superiority on NISQ hardware, lays the foundation for verifying problems related to large-scale variational quantum computing, and accelerates the feasibility of the application of quantum computers and the commercialization of quantum enlightenment.

[0118] The following are examples of the apparatus of the present invention, which can be used to carry out the method embodiments of the present invention. For details not disclosed in the apparatus embodiments of the present invention, please refer to the method embodiments of the present invention.

[0119] 10 is a block diagram of a quantum circuit simulation device according to one embodiment of the present invention. The device has a function of implementing the above quantum circuit simulation method, and the function may be implemented by hardware, or may be implemented by executing corresponding software by hardware. The device may be a computer device, or may be provided in a computer device. The device 1000 may include a function acquisition module 1010, a function conversion module 1020, a function execution module 1030, and a circuit simulation module 1040.

[0120] The function acquisition module 1010 acquires an original function for quantum circuit simulation and determines a first input parameter that requires parallelization in the original function.

[0121] The function transformation module 1020 transforms the original function into an objective function based on the original function and a first input parameter, where the input parameters of the objective function include a transformed first input parameter corresponding to the first input parameter, and the tensor corresponding to the transformed first input parameter is a result of combining multiple parallelized tensors corresponding to the first input parameter.

[0122] The function execution module 1030 obtains an execution result corresponding to the objective function based on the input parameters of the objective function.

[0123] The circuit simulation module 1040 executes a quantum circuit simulation based on the execution result corresponding to the objective function.

[0124] In an exemplary embodiment, the function execution module 1030 processes the converted first input parameters included in the input parameters of the objective function in a vector parallel manner to obtain an execution result corresponding to the objective function.

[0125] In an exemplary embodiment, the function execution module 1030 performs a vector parallelization operation on a tensor corresponding to the transformed first input parameter using a vector instruction set to obtain an execution result corresponding to the objective function. The vector instruction set includes executable instructions for the processor to perform the vector parallelization operation on the tensor corresponding to the transformed first input parameter.

[0126] In some aspects, the original function is used to realize a step of processing an input wave function in a quantum circuit simulation, and the first input parameter includes an input wave function of a target quantum circuit. The function execution module 1030 obtains a tensor corresponding to the transformed first input parameter, the tensor corresponding to the transformed first input parameter being a result obtained by combining a plurality of parallelized input wave functions of the target quantum circuit, and performs vector parallelization processing on the tensor corresponding to the transformed first input parameter using a vector instruction set to obtain an execution result corresponding to an objective function, and the execution result corresponding to the objective function includes a processing result corresponding to each of the plurality of parallelized input wave functions.

[0127] In some aspects, the original function is used to realize a step of optimizing a circuit variation parameter in a quantum circuit simulation, and the first input parameter includes a circuit variation parameter of a target quantum circuit. The function execution module 1030 obtains a tensor corresponding to the transformed first input parameter, the tensor corresponding to the transformed first input parameter being a result obtained by combining a plurality of sets of parallelized circuit variation parameters of the target quantum circuit, and executes a vector parallelization process on the tensor corresponding to the transformed first input parameter using a vector instruction set to obtain an execution result corresponding to an objective function, and the execution result corresponding to the objective function includes an optimization result corresponding to each of the plurality of sets of parallelized circuit variation parameters.

[0128] In some aspects, the original function is used to realize a step of generating circuit noise in a quantum circuit simulation, and the first input parameter includes a random number for generating circuit noise of a target quantum circuit. The function execution module 1030 obtains a tensor corresponding to the transformed first input parameter, the tensor corresponding to the transformed first input parameter is a result obtained by combining a plurality of sets of parallelized random numbers for generating circuit noise of the target quantum circuit, and performs a vector parallelization process on the tensor corresponding to the transformed first input parameter using a vector instruction set to obtain an execution result corresponding to an objective function, and the execution result corresponding to the objective function includes a noise simulation result corresponding to each of the plurality of parallelized random numbers.

[0129] In some aspects, the original function is used to realize a step of generating a circuit structure in a quantum circuit simulation, the first input parameters include control parameters for generating a circuit structure of a target quantum circuit, and different control parameters are used to generate different circuit structures. The function execution module 1030 obtains a tensor corresponding to the transformed first input parameters, the tensor corresponding to the transformed first input parameters being a result obtained by combining a plurality of sets of parallelized control parameters for generating a circuit structure of the target quantum circuit, and performs a vector parallelization process on the tensor corresponding to the transformed first input parameters using a vector instruction set to obtain an execution result corresponding to an objective function, and the execution result corresponding to the objective function includes a generation result of a circuit structure corresponding to each of the plurality of sets of parallelized control parameters.

[0130] In some aspects, the original function is used to realize a step of performing a circuit measurement in a quantum circuit simulation, the first input parameters include measurement parameters for performing the circuit measurement on the target quantum circuit, and different measurement parameters are used to generate different measurement results. The function execution module 1030 obtains a tensor corresponding to the transformed first input parameters, the tensor corresponding to the transformed first input parameters being a result obtained by combining multiple sets of parallelized measurement parameters for performing the circuit measurement on the target quantum circuit, and performs a vector parallelization process on the tensor corresponding to the transformed first input parameters using a vector instruction set to obtain an execution result corresponding to an objective function, and the execution result corresponding to the objective function includes measurement results corresponding to each of the multiple sets of parallelized measurement parameters.

[0131] In an exemplary aspect, when obtaining the objective function, if the input parameters of the original function include a target input parameter that does not require parallelization, a first input parameter in the original function is modified to a transformed first input parameter, the target input parameter is maintained, and the objective function is obtained; alternatively, if the input parameters of the original function do not include a target input parameter that does not require parallelization, a first input parameter in the original function is modified to a transformed first input parameter, and the objective function is obtained.

[0132] In an exemplary aspect, the function transformation module 1020 invokes a function transformation interface, transmits the original function and first information to the function transformation interface, where the first information is used to indicate a first input parameter in the original function that requires parallelization, and transforms the original function into an objective function based on the first information via the function transformation interface.

[0133] In some aspects, the function transformation module 1020 transmits second information to the function transformation interface, where the second information is used to indicate a second input parameter that requires a derivative operation in the original function, and the function transformation interface transforms the original function into an objective function based on the first information and the second information, where the objective function further outputs derivative coefficient information of the original function with respect to the second input parameter.

[0134] In some aspects, the function transformation interface includes a first interface and a second interface, where the first interface transforms the original function into the objective function based on the first information and the second interface transforms the original function into the objective function based on the first information and the second information.

[0135] In some aspects, the function transformation interface is an application programming interface (API) encapsulated in a machine learning library, where the machine learning library provides a set of vector instructions for executing the objective function.

[0136] In an exemplary embodiment, multiple parallelized tensors corresponding to the first input parameters are combined in a destination dimension to obtain a tensor corresponding to the transformed first input parameter, where the size of the tensor corresponding to the transformed first input parameter in the destination dimension corresponds to the number of parallelized tensors corresponding to the first input parameter.

[0137] The technology according to the present invention introduces the idea of ​​vector parallelization into quantum circuit simulation; that is, an original function is converted into an objective function, the input parameters of the objective function include a converted first input parameter corresponding to the first input parameter requiring parallelization, and the tensor corresponding to the converted first input parameter is the result obtained by combining a plurality of parallelized tensors corresponding to the first input parameters. By executing the objective function, a computational process that would normally require multiple executions can be parallelized and executed into a single computational process, so that it can be completed in the same amount of time as a single calculation, thereby significantly improving the efficiency of quantum circuit simulation.

[0138] In addition, the above-mentioned embodiment of the device has been described by taking only the division of each of the above-mentioned functional modules as an example for realizing the functions, but in reality, the above-mentioned function allocation may be divided into different functional modules, i.e., the internal structure of the device may be divided into different functional modules as necessary to complete all or part of the above-mentioned functions. Also, the above-mentioned embodiment of the device belongs to the same concept as the embodiment of the method, and the specific realization process thereof is described in detail in the embodiment of the method, so it will not be described here.

[0139] 11 is a schematic diagram of a computer device according to one embodiment of the present invention, which may be a classical computer, and which may be used to implement the quantum circuit simulation method according to the above embodiment.

[0140] Specifically, the computer device 1100 includes a processing unit (CPU (Central Processing Unit), GPU (Graphics Processing Unit), FPGA (Field Programmable Gate Array), etc.) 1101, a system memory 1104 including a RAM (Random-Access Memory) 1102 and a ROM (Read-Only Memory) 1103, and a system bus 1105 connecting the system memory 1104 and the central processing unit 1101. The computer device 1100 further includes a basic input / output system (I / O system) 1106 supporting the transmission of information between various devices in the server, and a mass storage device 1107 for storing an operating system 1113, application programs 1114 and other program modules 1115.

[0141] Preferably, the basic input / output system 1106 includes a display 1108 for displaying information and an input device 1109, such as a mouse or keyboard, for a user to input information. Both the display 1108 and the input device 1109 are connected to the central processing unit 1101 via an input / output controller 1110 that is connected to the system bus 1105. The basic input / output system 1106 may further include an input / output controller 1110 for accepting and processing input from a number of other devices, such as a keyboard, a mouse, or an electronic touch pen. Similarly, the input / output controller 1110 provides output to a display, a printer, or other type of output device.

[0142] Preferably, the mass storage device 1107 is connected to the central processing unit 1101 via a mass storage controller (not shown) connected to the system bus 1105. The mass storage device 1107 and associated computer readable media provide non-volatile storage for the computing device 1100. That is, the mass storage device 1107 may include a computer readable medium (not shown), such as a hard disk or a Compact Disc Read-Only Memory (CD-ROM) drive.

[0143] Without loss of generality, computer readable media may include computer storage media and communication media. Computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information such as computer readable programs, data structures, program modules, or other data. Computer storage media includes RAM, ROM, EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory or other solid state storage, CD-ROM, DVD (Digital Video Disc) or other optical storage, cartridges, magnetic tape, magnetic disk storage or other magnetic storage devices. However, as will be appreciated by those skilled in the art, the computer storage media is not limited to the above. The above-mentioned system memory 1104 and mass storage device 1107 may be collectively referred to as memory.

[0144] According to an embodiment of the present invention, the computing device 1100 may also operate with a remote computer connected to a network via a network such as the Internet, i.e., the computing device 1100 may be connected to a network 1112 via a network interface unit 1111 connected to the system bus 1105, or may use the network interface unit 1111 to connect to other types of networks or remote computer systems (not shown).

[0145] The memory further includes a computer program stored therein and configured to be executed by the one or more processors to implement the quantum circuit simulation method described above.

[0146] Exemplary embodiments further provide a computing device for implementing the quantum circuit simulation method described above. In some embodiments, the computing device is a classical computer.

[0147] An exemplary embodiment further provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor of a computing device, implements the quantum circuit simulation method described above.

[0148] In some embodiments, the computer-readable storage medium may include Read-Only Memory (ROM), Random-Access Memory (RAM), Solid State Drives (SSD), optical disks, etc. The Random-Access Memory may include Resistance Random Access Memory (ReRAM) and Dynamic Random Access Memory (DRAM).

[0149] In an exemplary embodiment, a computer program product is further provided, the computer program product including a computer program stored in a computer-readable storage medium, the computer program being read by a processor of the computer device from the computer-readable storage medium, the processor executing the computer program and causing the computer device to perform the quantum circuit simulation method described above.

[0150] In addition, "multiple" as referred to in this specification means two or more. "And / or" describes the dependency relationship of the dependent object, and indicates that there are three possible relationships, such as A and B, i.e., A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally indicates that the interrelated objects are in an "or" relationship. Furthermore, the step numbers described in this specification are merely illustrative of possible orders between steps, and in some other embodiments, the steps may not be performed in the order of the numbers, such that two differently numbered steps may be performed simultaneously, or two differently numbered steps may be performed in the reverse order from the order shown, and the embodiments of this specification are not limited thereto.

[0151] The above are merely illustrative examples of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention are intended to be included within the scope of the present invention.

Claims

1. 1. A quantum circuit simulation method executed by a computing device, comprising: Obtaining an original function for quantum circuit simulation and determining a first input parameter that requires parallelization in the original function; transforming the original function into an objective function based on the original function and the first input parameters, the input parameters of the objective function including a transformed first input parameter corresponding to the first input parameter, and a tensor corresponding to the transformed first input parameter being a result of combining a plurality of parallelized tensors corresponding to the first input parameter; obtaining an execution result corresponding to the objective function based on an input parameter of the objective function; Executing the quantum circuit simulation based on an execution result corresponding to the objective function; The method, wherein the first input parameters include at least one of circuit variation parameters of a target quantum circuit, a random number for generating circuit noise of the target quantum circuit, a control parameter for generating a circuit structure of the target quantum circuit, and a measurement parameter for performing a circuit measurement on the target quantum circuit, wherein different control parameters are used to generate different circuit structures and different measurement parameters are used to generate different measurement results.

2. The step of obtaining an execution result corresponding to the objective function based on an input parameter of the objective function includes: The method of claim 1 , further comprising: processing the converted first input parameters included in input parameters of the objective function using a vector parallelization method to obtain an execution result corresponding to the objective function.

3. The step of processing the converted first input parameter included in the input parameter of the objective function by a vector parallelization method and obtaining an execution result corresponding to the objective function includes:

3. The method of claim 2, further comprising: executing a vector parallelization operation on a tensor corresponding to the transformed first input parameter using a vector instruction set to obtain an execution result corresponding to the objective function, the vector instruction set including executable instructions for a processor to execute the vector parallelization operation on a tensor corresponding to the transformed first input parameter.

4. the original function is used to implement a step of processing an input wave function in the quantum circuit simulation; the first input parameters include an input wave function of a target quantum circuit; The step of executing vector parallel processing on a tensor corresponding to the converted first input parameter using the vector instruction set and obtaining an execution result corresponding to the objective function includes: Obtaining a tensor corresponding to the transformed first input parameter, the tensor corresponding to the transformed first input parameter being a result of combining a plurality of parallelized input wavefunctions of the target quantum circuit; and executing a vector parallelization process on a tensor corresponding to the transformed first input parameter using the vector instruction set to obtain an execution result corresponding to the objective function, the execution result corresponding to the objective function including processing results corresponding to each of the plurality of parallelized input wave functions.

5. the original function is used to realize a step of optimizing a circuit variation parameter in the quantum circuit simulation; The first input parameters include circuit variation parameters of a target quantum circuit; The step of executing vector parallel processing on a tensor corresponding to the converted first input parameter using the vector instruction set and obtaining an execution result corresponding to the objective function includes: Obtaining a tensor corresponding to the transformed first input parameter, the tensor corresponding to the transformed first input parameter being a result of combining a plurality of sets of parallelized circuit variation parameters of the target quantum circuit; and executing a vector parallelization process on a tensor corresponding to the transformed first input parameter using the vector instruction set to obtain an execution result corresponding to the objective function, the execution result corresponding to the objective function including an optimization result corresponding to each of the sets of parallelized circuit variation parameters.

6. the original function is used to implement a step of generating circuit noise in the quantum circuit simulation; The first input parameter includes a random number for generating circuit noise of the target quantum circuit; The step of executing vector parallel processing on a tensor corresponding to the converted first input parameter using the vector instruction set and obtaining an execution result corresponding to the objective function includes: A step of obtaining a tensor corresponding to the transformed first input parameter, the tensor corresponding to the transformed first input parameter being a result obtained by combining a plurality of sets of parallelized random numbers for generating circuit noise of the target quantum circuit; and executing a vector parallelization process on a tensor corresponding to the transformed first input parameter using the vector instruction set to obtain an execution result corresponding to the objective function, the execution result corresponding to the objective function including a noise simulation result corresponding to each of the plurality of parallelized random numbers.

7. the original function is used to realize a step of generating a circuit structure in the quantum circuit simulation; The first input parameters include control parameters for generating a circuit structure of a target quantum circuit, and different control parameters are used to generate different circuit structures; The step of executing vector parallel processing on a tensor corresponding to the converted first input parameter using the vector instruction set and obtaining an execution result corresponding to the objective function includes: Obtaining a tensor corresponding to the transformed first input parameter, the tensor corresponding to the transformed first input parameter being a result of combining a plurality of sets of parallelized control parameters for generating a circuit structure of the target quantum circuit; and executing a vector parallelization process on a tensor corresponding to the transformed first input parameter using the vector instruction set to obtain an execution result corresponding to the objective function, the execution result corresponding to the objective function including a result of generating a circuit structure corresponding to each of the sets of parallelized control parameters.

8. the original function is used to implement the step of performing circuit measurements in the quantum circuit simulation; the first input parameters include measurement parameters for performing circuit measurements on a target quantum circuit, different measurement parameters being used to generate different measurement results; The step of executing vector parallel processing on a tensor corresponding to the converted first input parameter using the vector instruction set and obtaining an execution result corresponding to the objective function includes: Obtaining a tensor corresponding to the transformed first input parameter, the tensor corresponding to the transformed first input parameter being a result of combining sets of parallelized measurement parameters for performing circuit measurements on the target quantum circuit; and executing a vector parallelization process on a tensor corresponding to the transformed first input parameters using the vector instruction set to obtain an execution result corresponding to the objective function, the execution result corresponding to the objective function including measurement results corresponding to each of the sets of parallelized measurement parameters.

9. A quantum circuit simulation method executed by a computing device, comprising: Obtaining an original function for quantum circuit simulation and determining a first input parameter that requires parallelization in the original function; transforming the original function into an objective function based on the original function and the first input parameters, the input parameters of the objective function including a transformed first input parameter corresponding to the first input parameter, and a tensor corresponding to the transformed first input parameter being a result of combining a plurality of parallelized tensors corresponding to the first input parameter; obtaining an execution result corresponding to the objective function based on an input parameter of the objective function; Executing the quantum circuit simulation based on an execution result corresponding to the objective function; When obtaining the objective function, If the input parameters of the original function include a target input parameter that does not require parallelization, modify the first input parameter in the original function to the transformed first input parameter, maintain the target input parameter, and obtain the objective function; or If the input parameters of the original function do not include a target input parameter that does not require parallelization, the first input parameter in the original function is modified to the transformed first input parameter to obtain the objective function.

10. A quantum circuit simulation method executed by a computing device, comprising: Obtaining an original function for quantum circuit simulation and determining a first input parameter that requires parallelization in the original function; transforming the original function into an objective function based on the original function and the first input parameters, the input parameters of the objective function including a transformed first input parameter corresponding to the first input parameter, and a tensor corresponding to the transformed first input parameter being a result of combining a plurality of parallelized tensors corresponding to the first input parameter; obtaining an execution result corresponding to the objective function based on an input parameter of the objective function; Executing the quantum circuit simulation based on an execution result corresponding to the objective function; Transforming the original function into an objective function based on the original function and the first input parameter, invoking a function transformation interface and transmitting the original function and first information to the function transformation interface, the first information being used to indicate a first input parameter in the original function that requires parallelization; and converting the original function to the objective function based on the first information by the function conversion interface.

11. transmitting second information to the function transformation interface, the second information being used to indicate a second input parameter requiring a differentiation operation in the original function; The step of converting the original function into the objective function based on the first information by the function conversion interface includes: converting the original function into the objective function based on the first information and the second information by the function conversion interface; The method of claim 10 , wherein the objective function further outputs derivative information of the original function with respect to the second input parameter.

12. the function transformation interface includes a first interface and a second interface; the first interface transforms the original function into the objective function based on the first information; The method of claim 11 , wherein the second interface transforms the original function into the objective function based on the first information and the second information.

13. The function transformation interface is an application programming interface (API) encapsulated in a machine learning library; The method of claim 10 , wherein the machine learning library provides a set of vector instructions for executing the objective function.

14. Combining the parallelized tensors corresponding to the first input parameters in a destination dimension to obtain a tensor corresponding to the transformed first input parameters; 2. The method of claim 1, wherein a size in the target dimension of a tensor corresponding to the transformed first input parameter corresponds to a number of parallelized tensors corresponding to the first input parameter.

15. A quantum circuit simulation device, a function acquisition module for acquiring an original function for quantum circuit simulation and determining a first input parameter requiring parallelization in the original function; a function transformation module that transforms the original function into an objective function based on the original function and the first input parameter, the input parameters of the objective function including a transformed first input parameter corresponding to the first input parameter, and a tensor corresponding to the transformed first input parameter being a result of combining a plurality of parallelized tensors corresponding to the first input parameter; a function execution module for obtaining an execution result corresponding to the objective function based on an input parameter of the objective function; a circuit simulation module that executes the quantum circuit simulation based on an execution result corresponding to the objective function; The apparatus, wherein the first input parameters include at least one of circuit variation parameters of a target quantum circuit, a random number for generating circuit noise of the target quantum circuit, a control parameter for generating a circuit structure of the target quantum circuit, and a measurement parameter for performing a circuit measurement on the target quantum circuit, wherein different control parameters are used to generate different circuit structures and different measurement parameters are used to generate different measurement results.

16. A computing device comprising a processor and a memory having a computer program stored therein, the computer program being loaded and executed by the processor so as to implement a method according to any one of claims 1 to 14.

17. A program for causing a computer to execute the method according to any one of claims 1 to 14.

Citation Information

Patent Citations

  • Code conversion device, code conversion method, and code conversion program

    JP2019185486A

  • Information processing device and information processing system

    JP2020166802A