Program for reduced quantum circuit, information processing apparatus, and method for reducing quantum circuit
By dynamically adjusting the number of Rz gates in quantum circuits based on interatomic distance, the method enhances VQE accuracy by mitigating noise-induced errors, ensuring precise quantum chemical calculations even in molecules with longer bonds.
Patent Information
- Application Number
- JP2024033345
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-03-05
- Publication Date
- 2025-09-18
AI Technical Summary
The accuracy of Variational Quantum Eigensolver (VQE) calculations deteriorates with increasing interatomic distances due to the adverse effect of noise on quantum circuits with a large number of Rz gates, particularly in molecules with longer interatomic distances.
A quantum circuit lightweighting method that reduces the number of Rz gates and adjusts the degree of weight reduction (rz_per_param) based on interatomic distance, changing the quantum circuit to increase Rz gates when the cumulative increase in iterations exceeds a threshold, thereby maintaining accuracy.
This approach suppresses the deterioration of VQE accuracy by reducing noise-induced errors, allowing for accurate quantum chemical calculations across varying interatomic distances, especially in molecules with longer bonds.
Smart Images

Figure 2025135473000001_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to a quantum circuit weight reduction program, an information processing device, and a quantum circuit weight reduction method. [Background technology]
[0002] Quantum chemical calculation is a method for analyzing the structure and properties of molecules from their electronic states, and the basic process is to calculate the energy of the molecule being analyzed. One quantum chemical calculation algorithm is the Variational Quantum Eigensolver (VQE). VQE is also one of the candidate variational algorithms that can be run on intermediate-scale quantum devices without error correction (sometimes called NISQ (Noisy Intermediate-Scale Quantum)).
[0003] In VQE, a trial wave function representing the electronic state of a molecule is expressed using a quantum circuit (sometimes called a variational quantum circuit) with the rotation angle of a rotation gate as its angular parameter. Such a quantum circuit or trial wave function is sometimes called an ansatz. The energy of the molecule is then calculated using the quantum circuit. To minimize this energy, the angular parameter is optimized using classical processing, and the energy is calculated using the quantum circuit repeatedly. The accuracy and computational complexity of VQE depend heavily on the type of ansatz. One ansatz that allows for highly accurate calculations is the UCCSD (Unitary Coupled Cluster Singles and Doubles) ansatz.
[0004] Conventionally, in order to carry out efficient material design, a technique has been proposed in which molecular feature quantities that satisfy desired material functions are calculated and constituent materials that realize the molecular feature quantities are calculated (see, for example, Patent Document 1). [Prior art documents] [Patent documents]
[0005] [Patent Document 1] Patent Publication No. 2021-081819 Summary of the Invention [Problem to be solved by the invention]
[0006] In VQE, energy calculations are sometimes performed for each molecular structure with multiple interatomic distances between multiple atoms contained in a molecule. In this case, the longer the interatomic distance, the worse the potential accuracy of the quantum circuit becomes, and the worse the accuracy of VQE may become.
[0007] In one aspect, the present invention aims to suppress deterioration in VQE accuracy. [Means for solving the problem]
[0008] In one embodiment, a quantum circuit lightweighting program is provided that causes a computer to execute a process of: using quantum circuit information representing a lightweight second quantum circuit obtained by reducing the number of Rz gates for each angle parameter included in a first quantum circuit, calculating the energy of the molecule by VQE for each molecular structure of multiple interatomic distances between multiple atoms included in the molecule; and obtaining the number of iterations of the VQE, the process being performed in order of increasing interatomic distances; when a cumulative increase in the number of iterations from a first iteration number for a first interatomic distance among the multiple interatomic distances to a second iteration number for a second interatomic distance among the multiple interatomic distances that is longer than the first interatomic distance becomes equal to or greater than a threshold; changing the quantum circuit information to be used to quantum circuit information representing a third quantum circuit in which the number of Rz gates for each angle parameter of the second quantum circuit is increased; and calculating the energy by VQE for a molecular structure of a third interatomic distance among the multiple interatomic distances that is longer than the second interatomic distance among the multiple interatomic distances.
[0009] In one embodiment, an information processing device is provided. Also, in one embodiment, a quantum circuit lightweighting method is provided. [Effects of the Invention]
[0010] In one aspect, the present invention can suppress deterioration of VQE accuracy. [Brief explanation of the drawings]
[0011] [Figure 1] FIG. 2 is a diagram illustrating an example of a first quantum circuit. [Figure 2] FIG. 2 is a diagram illustrating an example of a second quantum circuit. [Figure 3] FIG. 10 is a diagram illustrating an example of the relationship between rz_per_param and VQE error. [Figure 4] FIG. 10 is a diagram showing an example of the relationship between interatomic distance and VQE error. [Figure 5] FIG. 1 is a diagram illustrating an information processing apparatus according to a first embodiment. [Figure 6] FIG. 10 is a diagram showing an example of the relationship between the interatomic distance and the number of iterations. [Figure 7] FIG. 10 is a block diagram illustrating an example of hardware of an information processing apparatus according to a second embodiment. [Figure 8] FIG. 2 is a block diagram illustrating an example of functions of the information processing device. [Figure 9] 10 is a flowchart illustrating an example of a processing procedure of a quantum circuit lightweighting method. [Figure 10] 10 is a flowchart showing an example of a procedure for calculating molecular energy by VQE. [Figure 11] FIG. 1 is a diagram illustrating an example of a lightweight quantum circuit. [Figure 12] FIG. 10 is a diagram showing the relationship between the VQE error and the number of iterations for the interatomic distance of a hydrogen molecule. [Figure 13] FIG. 1 is a diagram showing an example of a potential energy curve of a hydrogen molecule. DETAILED DESCRIPTION OF THE INVENTION
[0012] Hereinafter, embodiments of the invention will be described with reference to the drawings. Figure 1 is a diagram showing an example of a first quantum circuit. The example of the first quantum circuit 1a shown in Figure 1 is a UCCSD ansatz for a hydrogen (H2) molecule represented by four quantum bits q0 to q3. Quantum operations by various quantum gates on the quantum bits q0 to q3 are shown in four rows from the top left to the bottom right. The right end of each row is connected to the left end of the next row.
[0013] In the first quantum circuit 1a, "U3" is a U3 gate that rotates a quantum state on the Bloch sphere based on three angular parameters: θ, φ, and λ. "S" is an S gate that rotates a quantum state on the Bloch sphere by φ=π / 2. "S" with a superscript dagger is an S-dagger gate that rotates a quantum state on the Bloch sphere by φ=-π / 2. "H" is a Hadamard gate that rotates a quantum state on the Bloch sphere by 180° around a 45° axis between the Z and X axes. "Rz" is an Rz gate that rotates a quantum state on the Bloch sphere by θ around the Z axis. "+" is a CNOT gate that flips the value of the target qubit if the control qubit is |1>. The CNOT gate generates quantum entanglement between two qubits.
[0014] In the first quantum circuit 1a, the angle parameters of the Rz gates are represented by parameters P0, P1, and P2. In the example of Fig. 1, there are two Rz gates that perform rotation operations using parameter P0, two Rz gates that perform rotation operations using parameter P1, and eight Rz gates that perform rotation operations using parameter P2.
[0015] The Rz gates are associated with a group of CNOT gates. Two Rz gates with parameter P0 are each associated with two CNOT gates, two Rz gates with parameter P1 are each associated with two CNOT gates, and eight Rz gates with parameter P2 are each associated with six CNOT gates.
[0016] In an ideal simulation calculation without noise, the greater the number of Rz gates per angular parameter, the smaller the VQE error, since the angular parameter can be fine-tuned. However, in an actual quantum device with noise, when the number of Rz gates is large, the VQE error tends to increase due to noise. This is because when there are many Rz gates, the number of CNOT gates associated with the Rz gates also increases. Because the error rate of CNOT gates is particularly high, the increase in error due to noise increases the more CNOT gates there are in a quantum circuit.
[0017] Therefore, by reducing the number of Rz gates, the number of CNOT gates associated with the Rz gates can be reduced, thereby reducing VQE errors due to noise-induced errors. Hereinafter, the number of Rz gates for each angle parameter when the number of Rz gates is reduced from the first quantum circuit to make it lighter will be denoted as rz_per_param. The smaller the value of rz_per_param, the greater the degree of lightness of the quantum circuit.
[0018] Fig. 2 is a diagram showing an example of a second quantum circuit. In the example of Fig. 2, a second quantum circuit 1b is shown in which the first quantum circuit 1a shown in Fig. 1 has been lightened with a lightening degree of rz_per_param=1. From the second quantum circuit 1b, a plurality of CNOT gates associated with the Rz gate deleted from the first quantum circuit 1a have also been deleted.
[0019] 2, the second quantum circuit 1b has one Rz gate for each of the parameters P0 to P2. The number of CNOT gates is 56 in the first quantum circuit 1a, whereas it is 10 in the second quantum circuit 1b.
[0020] 3 is a diagram showing an example of the relationship between rz_per_param and VQE error, where the horizontal axis represents rz_per_param and the vertical axis represents VQE error. In the example shown in Figure 3, the ansatz of LiH (lithium hydride) is used. The basis set used is STO-3G. The interatomic distance between the lithium atom and the hydrogen atom used in the calculation is 1.0 Å. The error is the difference between the ground state energy of LiH obtained by the Full Configuration Interaction method and the ground state energy of LiH obtained by the VQE simulation with noise.
[0021] As shown in Figure 3, the error in VQE with noise can be reduced by reducing the value of rz_per_param. However, when energy is calculated for each interatomic distance in a molecule, the longer the interatomic distance, the worse the potential accuracy of the quantum circuit becomes, and the worse the accuracy of the VQE may become.
[0022] 4 is a diagram showing an example of the relationship between interatomic distance and VQE error, where the horizontal axis represents interatomic distance and the vertical axis represents VQE error. The example in Figure 4 also uses ansatz for LiH and STO-3G. The error is the difference between the ground state energy of LiH obtained by the Full Configuration Interaction method and the ground state energy of LiH obtained by the noise-free VQE simulation. The VQE simulation was performed for five rz_per_param values: 1, 2, 3, 4, and 5, as well as for no weight reduction (denoted as "None").
[0023] As shown in Figure 4, when the interatomic distance is around 1.3 Å or greater, the VQE error increases as the interatomic distance increases. This tendency becomes more pronounced as the value of rz_per_param decreases (i.e., the degree of weight reduction increases).
[0024] Therefore, in the embodiment described below, when calculating the energy of a molecule by VQE, the value of rz_per_param is changed depending on the interatomic distance, thereby suppressing deterioration in the accuracy of VQE.
[0025] (First embodiment) FIG. 5 is a diagram illustrating the information processing apparatus according to the first embodiment. The information processing device 10 of the first embodiment reduces the weight of the quantum circuit and adjusts the degree of weight reduction (the value of rz_per_param) through processing described below, thereby suppressing deterioration of VQE accuracy. The information processing device 10 may be a client device or a server device. The information processing device 10 may also be called a computer.
[0026] The information processing device 10 has a storage unit 11 and a processing unit 12. The storage unit 11 may be a volatile semiconductor memory such as a random access memory (RAM), or may be a non-volatile storage such as a hard disk drive (HDD) or flash memory. The processing unit 12 is, for example, a processor such as a central processing unit (CPU), a graphics processing unit (GPU), or a digital signal processor (DSP). However, the processing unit 12 may also include an electronic circuit such as an application specific integrated circuit (ASIC) or a field programmable gate array (FPGA). The processor executes a program (e.g., a quantum circuit lightweighting program) stored in a memory such as a RAM (which may be the storage unit 11). A set of processors may be called a multiprocessor or simply a "processor."
[0027] The storage unit 11 stores quantum circuit information 11a representing a second quantum circuit that is lighter in weight by reducing the number of Rz gates for each angle parameter included in the first quantum circuit. When the molecule is a hydrogen molecule, for example, quantum circuit information 11a representing a second quantum circuit 1b as shown in FIG. 2 is stored.
[0028] The storage unit 11 may store the number of iterations of the VQE. In the VQE, calculation of the energy and the energy gradient from the measurement results of the quantum circuit is repeated while updating the angle parameters until a predetermined convergence condition is satisfied. The number of iterations until the predetermined convergence condition is satisfied is the number of iterations.
[0029] The convergence condition can be, for example, that convergence is determined when the variation in the angular parameter values for obtaining the ground state energy falls within a predetermined range. The number of iterations is related to the accuracy of VQE. The worse the accuracy of VQE, the more iterations are required to converge.
[0030] The storage unit 11 may store the energy of the molecule calculated by VQE. The storage unit 11 may also store the value of rz_per_param described above. The processing unit 12 executes the quantum circuit lightweighting program to perform the following processes.
[0031] The processing unit 12 performs a process of calculating the energy of a molecule by VQE for each molecular structure having a plurality of interatomic distances between a plurality of atoms included in the molecule. In this process, the processing unit 12 uses a lightweight second quantum circuit that has a reduced number of Rz gates for each angle parameter included in the first quantum circuit. The processing unit 12 performs the process of calculating the energy and the process of obtaining the number of VQE iterations in ascending order of interatomic distances.
[0032] The number of Rz gates for each angle parameter in the second quantum circuit, i.e., the initial value of rz_per_param, is preferably 1. This is because, as shown in Fig. 3, the smaller the value of rz_per_param (the higher the degree of weight reduction), the more the deterioration of VQE accuracy due to noise can be suppressed.
[0033] In the first quantum circuit, when there are multiple Rz gates with a certain angle parameter, for example, the earlier an Rz gate acts on a quantum bit, the more prioritized the deletion target is. This is because the later an Rz gate acts, the more important it is to the calculation result. However, the processing unit 12 may specify the Rz gate to be prioritized for deletion according to another rule.
[0034] The processing unit 12 acquires a cumulative increase in the number of iterations from a first iteration number for a first interatomic distance among the plurality of interatomic distances to a second iteration number for a second interatomic distance among the plurality of interatomic distances that is longer than the first interatomic distance.
[0035] 6 is a diagram showing an example of the relationship between the interatomic distance and the number of iterations, where the horizontal axis represents the interatomic distance and the vertical axis represents the number of iterations. The LiH ansatz and STO-3G are also used in the example in Figure 6. The VQE simulation was performed for five rz_per_param values: 1, 2, 3, 4, and 5, as well as for no weight reduction (denoted as "None").
[0036] As shown in Figure 4 above, when the interatomic distance is around 1.3 Å or greater, as the interatomic distance increases, the VQE error also increases, and the number of iterations also increases, as shown in Figure 6.
[0037] When the cumulative increase number becomes equal to or greater than a threshold, the processing unit 12 changes the quantum circuit information 11a to be used to quantum circuit information 11b representing a third quantum circuit in which the value of rz_per_param of the second quantum circuit has been increased. Using the quantum circuit information 11b, the processing unit 12 calculates the molecular energy by VQE for a molecular structure in which the third interatomic distance is longer than the second interatomic distance.
[0038] For example, in the example of Figure 6, assume that rz_per_param = 1 and the cumulative increase in the number of iterations from when the interatomic distance is 1.4 Å to when the interatomic distance is 1.5 Å exceeds a threshold. At this time, processing unit 12 increases the value of rz_per_param of the second quantum circuit by, for example, 1, and calculates the molecular energy by VQE for molecular structures with interatomic distances longer than 1.5 Å. In the example of Figure 6, by repeating the same process, the value of rz_per_param is changed from 2 to 3, from 3 to 4, and from 4 to 5 as the interatomic distance increases, as indicated by the arrows.
[0039] When increasing the value of rz_per_param, the processing unit 12 prioritizes adding Rz gates that act later on quantum bits among the Rz gates deleted from the first quantum circuit, for example. This is because the later an Rz gate acts, the more important it is to the calculation result. However, the processing unit 12 may prioritize Rz gates to be added according to another rule.
[0040] If the threshold value is too small, the value of rz_per_param increases easily, and if it is too large, the value of rz_per_param increases less easily. For this reason, it is preferable to set an appropriate value taking into consideration the required accuracy (e.g., chemical accuracy, which will be described later). Furthermore, the upper limit of rz_per_param is less than the number of Rz gates for each angle parameter in the first quantum circuit.
[0041] Figure 5 shows the relationship between the interatomic distance and the VQE error shown in Figure 4. In Figure 5, the relationship between the interatomic distance and the VQE error when the value of rz_per_param is changed is shown by a thick line, as indicated by the arrows in Figure 6.
[0042] With rz_per_param=1, the VQE error increases as the interatomic distance increases. In contrast, by increasing rz_per_param as the interatomic distance increases, as in the method of this embodiment (denoted as the present method in FIG. 5), the increase in VQE error can be suppressed.
[0043] In quantum chemical calculations, it is preferable to keep the error within the chemical precision. Keeping the error within the chemical precision corresponds to making the error smaller than 1.6 mHartree. As shown in FIG. 5, when rz_per_param is fixed at 1, the VQE error exceeds the chemical precision when the interatomic distance exceeds 2.1 Å. In contrast, according to the method of this embodiment, the VQE error can be kept within the chemical precision even when the interatomic distance is increased to 2.8 Å.
[0044] As described above, the information processing device 10 performs the process of calculating the energy of a molecule using VQE, using quantum circuit information 11a representing a lightweight second quantum circuit that has a reduced number of Rz gates for each angle parameter included in the first quantum circuit. The process of calculating the energy of a molecule using VQE is performed for each molecular structure with multiple interatomic distances between multiple atoms included in the molecule. When performing the process of calculating the energy and the process of acquiring the number of VQE iterations in order of increasing interatomic distance, the information processing device 10 performs the following process. The information processing device 10 acquires a cumulative increase in the number of iterations from the first iteration number for a first interatomic distance among the multiple interatomic distances to the second iteration number for a second interatomic distance that is longer than the first interatomic distance among the multiple interatomic distances. Then, when the cumulative increase number reaches or exceeds a threshold, the information processing device 10 changes the quantum circuit information 11a used to quantum circuit information 11b representing a third quantum circuit in which the number of Rz gates for each angle parameter of the second quantum circuit has been increased. Then, the information processing device 10 uses the quantum circuit information 11b to calculate the energy by VQE for a molecular structure having a third interatomic distance that is longer than the second interatomic distance among the multiple interatomic distances.
[0045] This suppresses the increase in VQE error due to the reduction in the number of Rz gates and prevents the deterioration of VQE accuracy as the interatomic distance increases. Furthermore, in regions where the interatomic distance is relatively short, the cumulative increase is below the threshold, so the number of Rz gates for each angle parameter does not increase, reducing VQE errors due to noise.
[0046] In the above example, when the number of Rz gates for each angle parameter of the second quantum circuit is increased, the information processing device 10 calculates energy by VQE for a molecular structure with a third interatomic distance that is longer than the second interatomic distance. However, the information processing device 10 may also calculate energy by VQE again for a molecular structure with the second interatomic distance using quantum circuit information 11b that represents a third quantum circuit with an increased number of Rz gates.
[0047] (Second embodiment) Next, a second embodiment will be described. FIG. 7 is a block diagram illustrating an example of hardware of an information processing apparatus according to the second embodiment.
[0048] The information processing device 20 may be a client device or a server device, and may also be called a computer. The information processing device 20 has a processor 21, a RAM 22, an HDD 23, a GPU 24, an input interface 25, a medium reader 26, a communication interface 27, and an interface 28, all connected via a bus. The processor 21 corresponds to the processing unit 12 in the first embodiment. The RAM 22 or the HDD 23 corresponds to the storage unit 11 in the first embodiment.
[0049] The processor 21 executes program instructions. The processor 21 loads programs and data, such as a quantum circuit lightweighting program, stored in the HDD 23 into the RAM 22 and executes the programs. The processor 21 is a CPU, a GPU, a DSP, or the like. The information processing device 20 may have multiple processors.
[0050] The RAM 22 is a volatile semiconductor memory that temporarily stores programs executed by the processor 21 and data used in calculations by the processor 21. The information processing device 20 may have a type of volatile memory other than RAM.
[0051] The HDD 23 is a nonvolatile storage that stores software programs such as an operating system (OS), middleware, and application software, as well as data. The information processing device 20 may also have other types of nonvolatile storage, such as a flash memory or an SSD (Solid State Drive).
[0052] The GPU 24 performs image processing in cooperation with the processor 21 and outputs an image to a display device 24a connected to the information processing device 20. The display device 24a is, for example, a CRT (Cathode Ray Tube) display, a liquid crystal display, an organic EL (Electro Luminescence) display, or a projector. Other types of output devices, such as a printer, may also be connected to the information processing device 20.
[0053] The GPU 24 may also be used as a general purpose computing on graphics processing unit (GPGPU). The GPU 24 may execute a program in response to an instruction from the processor 21. The information processing device 20 may have a volatile semiconductor memory other than the RAM 22 as a GPU memory.
[0054] The input interface 25 receives an input signal from an input device 25a connected to the information processing device 20. The input device 25a is, for example, a mouse, a touch panel, or a keyboard. A plurality of input devices may be connected to the information processing device 20.
[0055] The medium reader 26 is a reading device that reads programs and data recorded on the recording medium 26a. The recording medium 26a is, for example, a magnetic disk, an optical disk, or a semiconductor memory. Magnetic disks include flexible disks (FDs) and HDDs. Optical disks include compact discs (CDs) and digital versatile discs (DVDs). The medium reader 26 copies the programs and data read from the recording medium 26a to other recording media such as the RAM 22 or the HDD 23. The read programs may be executed by the processor 21.
[0056] The recording medium 26a may be a portable recording medium. The recording medium 26a may be used to distribute programs and data. The recording medium 26a and the HDD 23 may also be referred to as computer-readable recording media.
[0057] The communication interface 27 communicates with other information processing devices via a network 27 a. The communication interface 27 may be a wired communication interface connected to a wired communication device such as a switch or a router, or may be a wireless communication interface connected to a wireless communication device such as a base station or an access point.
[0058] The interface 28 is connected to a quantum computer 28a that executes the processing of the quantum circuit, and reflects in the quantum circuit the values of the angle parameters determined by the processor 21. The interface 28 also acquires the processing results (measurement results) of the quantum circuit from the quantum computer 28a and sends them to the processor 21.
[0059] A quantum gate quantum computer can be used as the quantum computer 28a. Various types of quantum bits can be used, such as those using superconducting circuits, ion traps, optical pulses, and diamond color centers.
[0060] Next, the functions of the information processing device 20 will be described. FIG. 8 is a block diagram illustrating an example of functions of the information processing device. The information processing device 20 includes an input unit 31 , a quantum circuit information storage unit 32 , a distance length list storage unit 33 , a quantum circuit weight reduction processing unit 34 , a VQE processing unit 35 , an energy list storage unit 36 , and an output unit 37 .
[0061] Each of the above storage units is implemented using, for example, the RAM 22 or the HDD 23. The input unit 31, the quantum circuit weight reduction processing unit 34, the VQE processing unit 35, and the output unit 37 are implemented using, for example, the processor 21 and a program.
[0062] Input data such as quantum circuit information (quantum circuit information) representing the electronic state of a molecule whose energy is to be calculated by VQE and multiple interatomic distances between multiple atoms included in the molecule are input to the input unit 31. The quantum circuit includes multiple Rz gates and multiple CNOT gates associated with each of the multiple Rz gates. The input data may be input, for example, via a recording medium 26a or a network 27a, or may be input by a user operating the input device 25a. Note that the information processing device 10 may generate the quantum circuit information.
[0063] The quantum circuit information storage unit 32 stores quantum circuit information. The distance length list storage unit 33 stores a distance length list in which a plurality of input interatomic distances are arranged in ascending order of interatomic distance.
[0064] The quantum circuit weight reduction unit 34 reduces the number of Rz gates and CNOT gates associated with the Rz gates included in the quantum circuit based on the value of rz_per_param, thereby reducing the weight of the quantum circuit. Furthermore, the quantum circuit weight reduction unit 34 increases the value of rz_per_param when the cumulative increase in the number of iterations of VQE, which is performed in order of shortest interatomic distance, reaches or exceeds a threshold.
[0065] For example, the quantum circuit weight reduction processing unit 34 stores quantum circuit information representing a lightened quantum circuit or quantum circuit information representing a quantum circuit with an increased value of rz_per_param in place of the original quantum circuit information in the quantum circuit information storage unit 32. Alternatively, the quantum circuit weight reduction processing unit 34 may store quantum circuit information representing a lightened quantum circuit or quantum circuit information representing a quantum circuit with an increased value of rz_per_param in the quantum circuit information storage unit 32 separately from the original quantum circuit information.
[0066] The VQE processing unit 35 performs a process of calculating the energy of a molecule by VQE. The process of calculating the energy is performed, for example, as follows, in order of increasing interatomic distance based on the distance length list stored in the distance length list storage unit 33.
[0067] The VQE processing unit 35 reads out the quantum circuit information stored in the quantum circuit information storage unit 32 and causes the quantum computer 28a to execute processing of the light-weight quantum circuit represented by the quantum circuit information. The VQE processing unit 35 then calculates the energy and energy gradient of the molecule based on the processing result (measurement result), updates the values of the angular parameters of the quantum circuit, and causes the quantum computer 28a to repeat the processing of the quantum circuit until a predetermined convergence condition is satisfied. The VQE processing unit 35 then outputs the energy and the number of iterations when the predetermined convergence condition is satisfied.
[0068] The energy list storage unit 36 stores the energy list output by the VQE processing unit 35, which lists the energies of molecules in the molecular structure for each interatomic distance. The output unit 37 outputs the energy list. For example, the output unit 37 may output the energy list to the display device 24a for display. The output unit 37 may also transmit the energy list to another information processing device via the network 27a.
[0069] Next, a description will be given of the processing procedure of the quantum circuit lightweighting method, including the calculation processing of molecular energy by VQE, performed by the information processing device 20. FIG. 9 is a flowchart showing an example of a processing procedure of the quantum circuit weight reduction method.
[0070] (Step S10) First, initialization processing is performed. In the initialization processing, the quantum circuit lightweight processing unit 34 initializes rz_per_param to 1, the cumulative increase in the number of iterations to 0, and the number of previous iterations to 0. In addition, the energy list is initialized to be empty.
[0071] (Step S11) The VQE processing unit 35 acquires the distance length list from the distance length list storage unit 33. (Step S12) The VQE processing unit 35 determines whether the distance length list is empty. If it is determined that the distance length list is not empty, the process of step S13 is performed, and if it is determined that the distance length list is empty, the process of step S24 is performed.
[0072] (Step S13) The VQE processing unit 35 extracts the first element from the distance length list. Since the distance length list arranges the interatomic distances in ascending order, the first element of the distance length list is the shortest interatomic distance among the interatomic distances that have not yet been extracted.
[0073] (Step S14) The quantum circuit weight reduction processing unit 34 performs a process of reducing the weight of the quantum circuit based on the value of rz_per_param. Since the initial value of rz_per_param is 1, the Rz gate and the CNOT gate associated therewith are deleted from the original quantum circuit so that the number of Rz gates for each angle parameter becomes one.
[0074] When there are multiple Rz gates with a certain angle parameter, the quantum circuit weight reduction unit 34 prioritizes the removal of Rz gates that act earlier on a quantum bit, for example. This is because the later an Rz gate acts, the more important it is to the calculation result. However, the quantum circuit weight reduction unit 34 may also identify Rz gates to be removed with priority according to another rule.
[0075] When rz_per_param is increased by the processing described below, the quantum circuit weight reduction unit 34 prioritizes adding Rz gates that act on quantum bits later among the Rz gates deleted from the original quantum circuit. However, the quantum circuit weight reduction unit 34 may also prioritize Rz gates to be added according to another rule.
[0076] (Step S15) The VQE processing unit 35 performs a calculation process of molecular energy by VQE for the molecular structure of the interatomic distance extracted in the process of step S13, using quantum circuit information representing a lightened quantum circuit. The procedure of the energy calculation process will be described later (see FIG. 10).
[0077] (Step S16) The VQE processing unit 35 adds the energy calculated in the process of step S15 to the end of the energy list stored in the energy list storage unit 36. (Step S17) The quantum circuit lightweight processing unit 34 calculates the difference between the number of iterations of the previous VQE and the number of iterations of the current VQE (=number of iterations of the current VQE−number of iterations of the previous VQE).
[0078] (Step S18) The quantum circuit weight reduction processing unit 34 determines whether the difference is greater than 0. If it is determined that the difference is greater than 0, the process of step S19 is performed, and if it is determined that the difference is equal to or less than 0, the process of step S22 is performed.
[0079] (Step S19) The quantum circuit weight reduction processing unit 34 adds the difference calculated in the process of step S17 to the cumulative increase number. (Step S20) The quantum circuit weight reduction processing unit 34 determines whether the cumulative increase is equal to or greater than a predetermined threshold. If it is determined that the cumulative increase is equal to or greater than the threshold, the process of step S21 is performed, and if it is determined that the cumulative increase is less than the threshold, the process of step S23 is performed.
[0080] (Step S21) The quantum circuit weight reduction unit 34 increments rz_per_param by one. (Step S22) The quantum circuit weight reduction unit 34 resets the cumulative increase number to zero.
[0081] (Step S23) The quantum circuit lightweight processing unit 34 sets the number of iterations of the previous iteration as the number of iterations of the current VQE. After that, the process of step S12 is performed again. (Step S24) The output unit 37 outputs the energy list, thereby completing the process of the quantum circuit lightweighting method, including the process of calculating the molecular energy by VQE.
[0082] FIG. 10 is a flowchart showing an example of a procedure for calculating the energy of a molecule using VQE. (Step S30) The VQE processing unit 35 initializes the number of iterations to zero.
[0083] (Step S31) The VQE processing unit 35 sets the number of iterations to the number of iterations+1. (Step S32) The VQE processing unit 35 causes the quantum computer 28a to execute the processing of the lightened quantum circuit.
[0084] (Step S33) The VQE processing unit 35 calculates the energy and energy gradient of the molecule based on the processing result (measurement result) of the quantum circuit. (Step S34) The VQE processing unit 35 determines whether or not a predetermined convergence condition is satisfied. If it is determined that the convergence condition is not satisfied, the process of step S35 is performed, and if it is determined that the convergence condition is satisfied, the process of step S37 is performed.
[0085] (Step S35) The VQE processing unit 35 updates the values of the angle parameters by gradient descent using the energy gradient calculated in the process of step S33. In the gradient descent method, the values of the angle parameters are updated in a direction that maximizes the decrease in energy.
[0086] (Step S36) The VQE processing unit 35 reflects the updated angle parameter values in the quantum circuit, and then the process of step S31 is performed again. (Step S37) The VQE processing unit 35 outputs the energy and the number of iterations when the convergence condition is satisfied, thereby completing the calculation process of the molecular energy for a molecular structure with a certain interatomic distance.
[0087] 9 and 10 are merely examples, and the order may be changed as appropriate. Furthermore, the optimization method for the angle parameter values is not limited to the gradient descent method described above. The convergence conditions may differ depending on the optimization method used.
[0088] Also, in the above example, when the cumulative increase number becomes equal to or greater than the threshold, the quantum circuit weight reduction processing unit 34 increases rz_per_param by only one, but this is not limited to one and may be increased by two or more.
[0089] As described above, the VQE processing unit 35 performs the process of calculating the energy of a molecule by VQE using a lightweight second quantum circuit (a lightweight quantum circuit) that is a first quantum circuit (an original quantum circuit) that has been reduced in number by reducing the number of Rz gates for each angle parameter. The process of calculating the energy of a molecule by VQE is performed for each molecular structure of multiple interatomic distances between multiple atoms included in the molecule, which are represented in the distance length list. Furthermore, the process of calculating the energy by the VQE processing unit 35 and the process of acquiring the number of VQE iterations by the quantum circuit lightweight processing unit 34 are performed in order of shortest interatomic distances. Furthermore, the quantum circuit lightweight processing unit 34 acquires the cumulative increase in the number of iterations from the first iteration number for a first interatomic distance among the multiple interatomic distances to the second iteration number for a second interatomic distance that is longer than the first interatomic distance among the multiple interatomic distances. Then, when the cumulative increase number becomes equal to or greater than a threshold, the quantum circuit weight reduction processing unit 34 changes the quantum circuit information to quantum circuit information representing a third quantum circuit in which the number of Rz gates for each angle parameter of the second quantum circuit (the value of rz_per_param) is increased. The VQE processing unit 35 calculates energy by VQE for a molecular structure having a third interatomic distance longer than the second interatomic distance using the quantum circuit information representing the third quantum circuit.
[0090] As a result, as in the first embodiment, it is possible to suppress an increase in VQE error due to a reduction in the number of Rz gates, and to prevent the accuracy of VQE from deteriorating as the interatomic distance increases. Furthermore, in regions where the interatomic distance is relatively short, the cumulative increase is less than the threshold, so the number of Rz gates for each angle parameter does not increase, and it is possible to reduce VQE errors due to errors caused by noise.
[0091] (Example of lightweight quantum circuits) Fig. 11 is a diagram showing an example of weight reduction of a quantum circuit. Fig. 11 shows an example of weight reduction when the number of angle parameters of the original quantum circuit is 3, the number of Rz gates per angle parameter is 8, and the number of CNOT gates per Rz gate is 6. Therefore, in the original quantum circuit, the total number of Rz gates is 24, and the total number of CNOT gates is 144.
[0092] The smaller the value of rz_per_param, the stronger the weight reduction. For example, when rz_per_param=1, the total number of Rz gates is 3 and the total number of CNOT gates is 18. By reducing the number of CNOT gates, which have a high error rate, the VQE error due to noise-induced errors can be reduced.
[0093] (Example of cumulative increase not exceeding the threshold) 12A and 12B are diagrams showing the relationship between the VQE error and the number of iterations for the interatomic distance of hydrogen molecules. FIG. 12A shows an example of the relationship between the interatomic distance of hydrogen molecules and the VQE error, and FIG. 12B shows an example of the relationship between the interatomic distance of hydrogen molecules and the number of iterations. In FIG. 12A, the horizontal axis represents the interatomic distance, and the vertical axis represents the VQE error. In FIG. 12B, the horizontal axis represents the interatomic distance, and the vertical axis represents the number of iterations.
[0094] In the example shown in Figure 12, ansatz and STO-3G for the hydrogen molecule are used. The error is the difference between the ground state energy of the hydrogen molecule obtained by the Full Configuration Interaction method and the ground state energy of the hydrogen molecule obtained by the noise-free VQE simulation. The VQE simulation was performed for five rz_per_param values: 1, 2, 3, 4, and 5, as well as for no weight reduction (denoted as "None").
[0095] In the case of hydrogen molecules, as shown in Figure 12(A), there is no tendency for the VQE error to increase as the interatomic distance increases, and the error is within the chemical precision. As shown in Figure 12(B), the number of iterations also changes very little as the interatomic distance increases. In such cases, the cumulative increase in the number of iterations does not exceed the threshold, and rz_per_param remains at its initial value of 1, even as the interatomic distance increases. Therefore, a quantum circuit with the highest degree of weight reduction and least susceptible to noise can be used.
[0096] However, for most molecules, as in the case of LiH mentioned above, it is thought that as the interatomic distance increases, the smaller rz_per_param becomes, the greater the VQE error becomes.
[0097] (Example output) The output unit 37 may cause the display device 24a to display the following potential energy curve.
[0098] Fig. 13 is a diagram showing an example of a potential energy curve of a hydrogen molecule, in which the horizontal axis represents the interatomic distance and the vertical axis represents the energy (ground state energy). A potential energy curve, such as that shown in Figure 13, can be obtained by connecting the energy plots calculated by VQE for each interatomic distance. The minimum points indicate stable states, and the maximum points indicate transition states.
[0099] By obtaining such a potential energy curve, the characteristics of the chemical reaction of the molecule can be understood. According to the information processing device 20 of the present embodiment as described above, deterioration of the accuracy of VQE can be suppressed, and therefore a highly accurate potential energy curve can be obtained, which can contribute to drug discovery, new material development, and the like.
[0100] As mentioned above, the above processing contents can be realized by causing the information processing device 20 to execute a program (for example, a quantum circuit lightweighting program). The program can be recorded on a computer-readable recording medium (e.g., recording medium 26a). Examples of recording media that can be used include magnetic disks, optical disks, magneto-optical disks, and semiconductor memories. Magnetic disks include FDs and HDDs. Optical disks include CDs, CD-R (Recordable) / RW (Rewritable), DVDs, and DVD-R / RWs. The program may be recorded on a portable recording medium and distributed. In this case, the program may be copied from the portable recording medium to another recording medium (e.g., HDD 23) and executed.
[0101] The above has described one aspect of the quantum circuit lightweighting program, information processing device, and quantum circuit lightweighting method of the present invention based on the embodiment, but these are merely examples and are not limited to the above description. [Explanation of symbols]
[0102] 1a 1st quantum circuit 1b Second quantum circuit 10. Information processing equipment 11 Storage section 11a,11b Quantum circuit information 12 Processing section
Claims
1. A process of calculating the energy of a molecule by VQE for each molecular structure having a plurality of interatomic distances between a plurality of atoms included in a molecule, using quantum circuit information representing a lightweight second quantum circuit that has a reduced number of Rz gates for each angle parameter included in a first quantum circuit, and obtaining the number of iterations of the VQE, in order of the shortest interatomic distances, when a cumulative increase in the number of iterations from a first iteration number for a first interatomic distance among the plurality of interatomic distances to a second iteration number for a second interatomic distance among the plurality of interatomic distances that is longer than the first interatomic distance becomes equal to or greater than a threshold, the quantum circuit information to be used is changed to quantum circuit information representing a third quantum circuit in which the number of Rz gates for each angle parameter of the second quantum circuit is increased, and the energy is calculated by the VQE for a molecular structure with a third interatomic distance that is longer than the second interatomic distance among the plurality of interatomic distances; A quantum circuit lightweight program that executes processing on a computer.
2. 2. The quantum circuit lightweighting program according to claim 1, wherein the first quantum circuit includes a plurality of CNOT gates associated with the Rz gate, and when the quantum circuit information representing the second quantum circuit is generated, the plurality of CNOT gates associated with the Rz gate deleted from the first quantum circuit are also deleted from the first quantum circuit.
3. 2. The quantum circuit weight reduction program according to claim 1, wherein an initial value of the number of Rz gates for each of the angle parameters in the second quantum circuit is 1.
4. a storage unit that stores quantum circuit information representing a lightweight second quantum circuit that has a reduced number of Rz gates for each angle parameter included in the first quantum circuit; a processing unit that uses the quantum circuit information to calculate the energy of the molecule by VQE for molecular structures of each of a plurality of interatomic distances between a plurality of atoms included in the molecule, and obtains the number of iterations of the VQE, in order of increasing interatomic distances, when a cumulative increase in the number of iterations from a first iteration number for a first interatomic distance among the plurality of interatomic distances to a second iteration number for a second interatomic distance among the plurality of interatomic distances that is longer than the first interatomic distance becomes equal to or greater than a threshold, changes the quantum circuit information to quantum circuit information representing a third quantum circuit in which the number of Rz gates for each angle parameter of the second quantum circuit is increased, and calculates the energy by VQE for molecular structures of a third interatomic distance among the plurality of interatomic distances that is longer than the second interatomic distance; An information processing device having the above.
5. A process of calculating the energy of a molecule by VQE for each molecular structure having a plurality of interatomic distances between a plurality of atoms included in a molecule, using quantum circuit information representing a lightweight second quantum circuit that has a reduced number of Rz gates for each angle parameter included in a first quantum circuit, and obtaining the number of iterations of the VQE, in order of the shortest interatomic distances, when a cumulative increase in the number of iterations from a first iteration number for a first interatomic distance among the plurality of interatomic distances to a second iteration number for a second interatomic distance among the plurality of interatomic distances that is longer than the first interatomic distance becomes equal to or greater than a threshold, the quantum circuit information to be used is changed to quantum circuit information representing a third quantum circuit in which the number of Rz gates for each angle parameter of the second quantum circuit is increased, and the energy is calculated by the VQE for a molecular structure with a third interatomic distance that is longer than the second interatomic distance among the plurality of interatomic distances; A method for reducing the size of quantum circuits in which processing is performed by a computer.
Citation Information
Patent Citations
Material design system and material design method
JP2021081819A