The present embodiment relates to an information processing program, an information processing method, and an information processing device.
In the field of quantum computers, noisy intermediate-scale quantum computers (NISQ) are expected to be put into practical use. A NISQ is a medium-scale quantum computer without an error correction function. One application of a NISQ is calculation by the variational quantum eigensolver (VQE). The VQE is a variational algorithm for obtaining a ground state of a quantum many-body system. The VQE may be used for performing quantum chemical calculation in a NISQ, for example. The quantum chemical calculation is calculation for obtaining a molecular state and physical property information by solving a Schrödinger equation. At present, various studies are in progress for putting calculation using the VQE into practical use.
Related art is disclosed in International Publication Pamphlet No. WO 2020/230794, U.S. Patent Application Publication No. 2019/0354316, Japanese National Publication of International Patent Application No. 2020-534607 and Rongxin Xia, Sabre Kais, “Qubit coupled cluster singles and doubles variational quantum eigensolver ansatz for electronic structure calculations” arXiv: 2005.08451v3, 10 Oct. 2020.
According to an aspect of the embodiments, a non-transitory computer-readable recording medium stores an information processing program for causing a computer to perform a process that includes: calculating an initial value of a variable that corresponds to each electron excitation of a plurality of electron excitations to calculate a base energy of a molecule by variational quantum eigensolver; determining, for each electron excitation of the plurality of electron excitations, whether to implement a corresponding circuit based on whether the initial value of the corresponding variable is greater than a predetermined threshold; and placing a partial circuit that performs a gate operation of the electron excitation to calculate energy in accordance with a value of the variable in a quantum circuit that calculates the base energy of the molecule, for each electron excitation for which it is determined to implement the corresponding circuit among the plurality of electron excitations.
The object and advantages of the invention will be realized and attained by means of the elements and combinations particularly pointed out in the claims.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory and are not restrictive of the invention.
As a technique related to quantum calculation such as the VQE, there is a proposed quantum information processing method for obtaining a differential of energy, by which a derivative of energy can be obtained when quantum calculation of the energy of a system is performed with the VQE, for example. Furthermore, there also is a proposed method that uses classical data in quantum operations by inputting the classical data as quantum data. Further, a system for implementing a high-hardware-efficiency variational quantum eigensolver for quantum computing machines has also been proposed. Also, VQE Ansatz with less complicated quantum gates has been proposed.
One of the problems for practical use of quantum chemical calculation by the VQE lies in that the number of gate operations is large. If the number of gate operations is too large, the calculation time increases, calculation is not completed within the quantum bit duration (coherence time), and any calculation result might not be obtained. Furthermore, when the number of gate operations is large, errors accumulate during the quantum calculation process, and the influence of the errors on calculation results becomes larger.
In one aspect, an object of the present invention is to reduce the number of gate operations.
In the description below, embodiments will be explained with reference to the drawings. Note that each of the embodiments may be implemented in combination with a plurality of embodiments as long as there are no contradictions.
A first embodiment is an information processing method for reducing the number of gate operations in a quantum circuit for performing quantum chemical calculation by the VQE.
The information processing device 10 includes a storage unit 11 and a processing unit 12. The storage unit 11 is a memory or a storage device included in the information processing device 10, for example. The processing unit 12 is a processor or an arithmetic circuit included in the information processing device 10, for example.
The storage unit 11 stores information about the molecule to be calculated, a quantum circuit 1 for calculating the base energy of the molecule, and the like.
The processing unit 12 generates the quantum circuit 1 for performing quantum chemical calculation by the VQE using a quantum computer. For example, the processing unit 12 calculates the initial value of a variable corresponding to each electron excitation of a plurality of electron excitations for calculating the base energy of the molecule by the VQE. For example, the processing unit 12 calculates configuration interaction (CI) coefficients of the respective configuration state functions corresponding to a plurality of electron configurations included in wave functions (linear combinations of electron configurations) according to a CI method, using a classical quantum chemical calculation technique. The CI coefficients corresponding to the respective electron configurations are coefficients of a real number multiplied by a term indicating an electron excitation for the electron configuration. The processing unit 12 then sets the CI coefficient corresponding to each electron excitation as the initial value of the variable to be used in the circuit corresponding to the electron excitation.
Next, for each electron excitation of the plurality of electron excitations, the processing unit 12 determines whether to implement the corresponding circuit, based on whether the initial value of the corresponding variable is greater than a predetermined threshold. For example, for an electron excitation in which the absolute value of the initial value of the variable is greater than the threshold, the processing unit 12 determines to implement the circuit corresponding to the electron excitation. Further, when the initial value of the variable is equal to or smaller than the threshold, the processing unit 12 determines not to implement the circuit corresponding to the electron excitation.
The processing unit 12 then disposes, in the quantum circuit 1, partial circuits 2a, 2b, . . . , 3a, 3b, . . . that perform gate operations corresponding to the electron excitation for calculating the energy in accordance with the value of the variable, for each of the electron excitations for which it has been determined to implement the corresponding circuits among the plurality of electron excitations. For example, in a case where the electron excitation determined to be implemented are a one-electron excitation, the processing unit 12 disposes, in the quantum circuit 1, the partial circuits 2a, 2b, . . . , which perform operations of Givens rotation corresponding to the electron excitation. Furthermore, in a case where the electron excitation determined to be implemented is a two-electron excitation, the processing unit 12 disposes, in the quantum circuit 1, the partial circuits 3a, 3b, . . . , which perform operations of quantum-number-preserving-pair-exchange (QNPPX) corresponding to the electron excitation.
As described above, in a case where the initial value of the variable of an electron excitation is equal to or smaller than the threshold, implementation of the circuit corresponding to the electron excitation is prevented, to reduce the number of gate operations at the time of VQE calculation. For example, a CI coefficient is used as the initial value of a variable, it is expected that the value of an electron excitation to which a variable having a very small initial value is applied remains small even if optimization in VQE calculation is performed. The energy calculated by the circuit according to an electron excitation having a small variable value is minute compared with the energy calculated by circuits for other electron excitations. Therefore, even if implementation of the circuit corresponding to an electron excitation having a small variable value is prevented, the decrease in the calculation accuracy of the final base energy is small.
Moreover, a one-electron excitation gate operation is performed with a Givens rotation circuit, so that the number of gate operations can be further reduced without lowering the calculation accuracy. Likewise, a two-electron excitation gate operation is performed with QNPPX, so that the number of gate operations can be further reduced without lowering the calculation accuracy.
In VQE calculation, a gate operation and measurement of an electron excitation can be performed in parallel for each electron excitation. However, the number of quantum bits that can be used may not be sufficient to execute all electron excitations in parallel. In that case, it is possible to reduce the number of gate operations by generating the quantum circuit 1 so that more partial circuits can be executed in parallel without any overlap between the quantum bits of the excitation source and the excitation destination in the electron excitations to be simultaneously executed. Note that, in the quantum circuit 1, the circuits to be executed in parallel are disposed in the same column (positions overlapping in the vertical direction in the quantum circuit 1).
For example, it is assumed that the processing unit 12 separates a column in which partial circuits of one-electron excitations are disposed from a column in which partial circuits of two-electron excitations are disposed. Here, the partial circuits already disposed in a certain column in the quantum circuit 1 are set as first partial circuits. Further, the partial circuits to be disposed next are set as second partial circuits. In a case where the quantum bits of the excitation sources and the excitation destinations of the electron excitations corresponding to the second partial circuits do not overlap with any of the quantum bits of the excitation sources and the excitation destinations in the first partial circuits at this point of time, the processing unit 12 disposes the second partial circuits in the same column as the first partial circuits. Thus, the number of gate operations in the quantum circuit 1 is reduced.
Also, it is possible to further reduce the number of gate operations by mixing one-electron excitation partial circuits and two-electron excitation partial circuits in the same column. For example, the processing unit 12 disposes third partial circuits corresponding to two-electron excitations in a column in which circuits that can be simultaneously executed in the quantum circuit 1 are disposed. After that, the processing unit 12 disposes, in the same column as the third partial circuits, a plurality of fourth partial circuits that correspond to one-electron excitations and have the quantum bits of the excitation sources and the excitation destinations not overlapping with any of the quantum bits of the excitation sources and the excitation destinations in the third partial circuits. At that time, the processing unit 12 disposes the plurality of fourth partial circuits in the same column as the third partial circuits within a range in which the number of times of use of the same quantum bit as an excitation source or an excitation destination does not exceed a predetermined number among the plurality of fourth partial circuits. Thus, the quantum circuit 1 having the number of gate operations reduced is generated.
A second embodiment is a computer system that performs quantum chemical calculation by the VQE, using a quantum computer.
The memory 102 is used as a main storage device of the classical computer 100. In the memory 102, at least some of the operating system (OS) programs and the application programs to be executed by the processor 101 are temporarily stored. Furthermore, in the memory 102, various kinds of data to be used in processing by the processor 101 are stored. As the memory 102, a volatile semiconductor storage device such as a random access memory (RAM) is used, for example.
Examples of the peripheral devices coupled to the bus 109 include a storage device 103, a graphics processing unit (GPU) 104, an input interface 105, an optical drive device 106, a device coupling interface 107, and a network interface 108.
The storage device 103 electrically or magnetically writes/reads data into/from a built-in recording medium. The storage device 103 is used as an auxiliary storage device of the classical computer 100. In the storage device 103, OS programs, application programs, and various kinds of data are stored. Note that, as the storage device 103, a hard disk drive (HDD) or a solid state drive (SSD) may be used, for example.
The GPU 104 is an arithmetic device that performs image processing, and is also called a graphics controller. A monitor 21 is coupled to the GPU 104. The GPU 104 causes the screen of the monitor 21 to display an image in accordance with an instruction from the processor 101. Examples of the monitor 21 include a display device using an organic electro luminescence (EL), a liquid crystal display device, and the like.
A keyboard 22 and a mouse 23 are coupled to the input interface 105. The input interface 105 transmits signals sent from the keyboard 22 and the mouse 23 to the processor 101. Note that the mouse 23 is an example of a pointing device, and some other pointing device may also be used. Examples of other pointing devices include a touch panel, a tablet, a touch pad, a track ball, and the like.
The optical drive device 106 uses laser light or the like, to read data recorded in an optical disk 24, or write data into the optical disk 24. The optical disk 24 is a portable recording medium in which data is recorded so that the data can be read through reflection of light. Examples of the optical disk 24 include a digital versatile disc (DVD), a DVD-RAM, a compact disc read only memory (CD-ROM), a CD-recordable (R)/rewritable (RW), and the like.
The device coupling interface 107 is a communication interface for coupling peripheral devices to the classical computer 100. For example, a memory device 25 and a memory reader/writer 26 may be coupled to the device coupling interface 107. The memory device 25 is a recording medium equipped with a function to communicate with the device coupling interface 107. The memory reader/writer 26 is a device that writes data into a memory card 27 or reads data from the memory card 27. The memory card 27 is a card-type recording medium.
The network interface 108 is coupled to the quantum computer 200. The network interface 108 exchanges data with the quantum computer 200.
The classical computer 100 may implement processing functions of the second embodiment with the hardware as described above. Note that the information processing device 10 described in the first embodiment can be formed with hardware similar to that of the classical computer 100 illustrated in
The classical computer 100 implements the processing functions of the second embodiment by executing a program recorded in a computer-readable recording medium, for example. The programs in which the contents of the processes to be performed by the classical computer 100 are written may be recorded in various recording media. For example, the programs to be executed by the classical computer 100 may be stored in the storage device 103. The processor 101 loads at least one of the programs in the storage device 103 into the memory 102, and executes the program. Also, the programs to be executed by the classical computer 100 may be recorded in a portable recording medium such as the optical disk 24, the memory device 25, or the memory card 27. A program stored in the portable recording medium may be executed after being installed into the storage device 103 under the control of the processor 101, for example. Also, the processor 101 may read a program directly from the portable recording medium, to execute the program.
With the hardware illustrated in
The quantum circuit generation unit 110 generates a quantum circuit for calculating energy of a quantum many-body system such as a molecule. For example, the quantum circuit generation unit 110 generates a quantum circuit based on a VQE algorithm that realizes an electron excitation of UCCSD Ansatz by fewer quantum operations. The quantum circuit generation unit 110 transmits the generated quantum circuit to the quantum calculation management unit 120.
The quantum calculation management unit 120 instructs the quantum computer 200 to perform energy calculation based on the generated quantum circuit. For example, the quantum calculation management unit 120 sets a plurality of parameters θ related to a gate operation at a quantum gate in the quantum circuit. The quantum calculation management unit 120 sets initial values to the values of the plurality of parameters θ before the first quantum calculation. The quantum calculation management unit 120 acquires, from the quantum computer 200, a result of the energy calculation based on the quantum circuit parameterized with the plurality of parameters θ. Having acquired the result of the energy calculation, the quantum calculation management unit 120 determines whether the energy has converged. When the energy has not converged, the quantum calculation management unit 120 instructs the optimization calculation unit 130 to optimize the parameters.
The optimization calculation unit 130 updates, for each quantum calculation, all or some of the values of the plurality of parameters θ in a direction in which the energy value decreases. When the optimization calculation comes to an end, the optimization calculation unit 130 notifies the quantum calculation management unit 120 of the updated values of the plurality of parameters θ.
Note that the function of each element of the classical computer 100 illustrated in
Next, a method for calculating the base energy of a molecule by the VQE is described. The energy E to be obtained in calculating the base energy of a molecule by the VQE is expressed as in the following Expression (1).
φ represents a quantum state. H represents a Hamiltonian. The Hamiltonian is a function of an intermolecular distance R. θ represents the rotation angle to be used as the optimization variable. The base energy is the lowest energy. Therefore, when Expression (1) is repeatedly calculated by varying the rotation angle θ, the lowest energy among the energies obtained by a plurality of times of calculation is a base energy E0. An expression expressing the base energy E0 is as follows.
In actual calculation, the Hamiltonian is decomposed into a sum form (H=H1+H2+ . . . ), and each Hamiltonian obtained by the decomposition is calculated. In other words, the quantum circuit generation unit 110 generates a quantum circuit for performing quantum chemical calculation by the VQE for each Hamiltonian obtained by the decomposition.
A quantum circuit of the VQE includes a circuit called Ansatz. Ansatz occupies most of the VQE quantum circuit. Ansatz is a circuit for expressing a wave function ψ(θ) parameterized with a variable in a quantum circuit.
Each term on the right side of Expression (3) corresponds to an electron excitation for obtaining a predetermined electron orbital. a, b, and c are coefficients for each electron excitation. The quantum circuit 30 includes a basis conversion circuit, a Z-axis measurement circuit, and the like, in addition to the Ansatz circuit 31.
There is Unitary Coupled Cluster Singles and Doubles (UCCSD) as a representative Ansatz for achieving high accuracy. The UCCSD can obtain a calculation result with a higher accuracy than Coupled Cluster Singles and Doubles (CCSD) of classical quantum chemical calculation in an ideal state (when a hard error is small enough). On the other hand, even if the UCCSD is a problem of about 20 quantum bits, tens of thousands to hundreds of thousands of gates are required, and it is practically difficult to implement the UCCSD in a NISQ.
Therefore, the quantum circuit generation unit 110 generates a quantum circuit for realizing the VQE by expressing a one-electron excitation or a two-electron excitation using a rotation gate element (a Givens rotation circuit, or a QNPPX circuit). Thus, a calculation accuracy equivalent to that of the UCCSD can be achieved, and the number of gates can be reduced.
Here, it is assumed that the one-electron excitation partial circuits 41a, 41b, . . . express one-electron excitations from the i-th quantum bit to the j-th quantum bit. In this case, for each one excitation, 4(j-i) CNOT gates and ten one-qubit gates are used in the one-electron excitation partial circuits 41a, 41b, . . . (i and j being integers of 0 or greater). The CNOT gates are two-qubit gates that perform bit inversion on the target quantum bits when the control quantum bits are |1>.
Meanwhile, it is assumed that the two-electron excitation partial circuits 42a, 42b, . . . express two-electron excitations from the (i, j)-th quantum bit to the (k, l)-th quantum bit. In this case, for each one excitation, 16(j+l−i−k) CNOT gates and 72 one-qubit gates are used in the two-electron excitation partial circuits 42a, 42b, . . . (i, j, k, and l being integers of 0 or greater).
An Ansatz circuit 50 using a rotation gate element also includes a plurality of one-electron excitation partial circuits 51a, 51b, . . . , and a plurality of two-electron excitation partial circuits 52a, 52b, . . . . The one-electron excitation partial circuits 51a, 51b, . . . are circuits that express one-electron excitations with Givens rotation. For each one excitation, two two-qubit gates and four one-qubit gates are used in the one-electron excitation partial circuits 51a, 51b, . . . . Meanwhile, the two-electron excitation partial circuits 52a, 52b, . . . are circuits that express two-electron excitations with QNPPX. For each one excitation, twelve two-qubit gates and ten one-qubit gates are used in the two-electron excitation partial circuits 52a, 52b, . . . .
When the rotation angle is θ, the circuit element 61 corresponding to the “a”-th quantum bit that is the excitation source is expressed as “Gaab(θ)”. The circuit element 62 of the “b”-th quantum bit that is the excitation destination is expressed as “Gaab(θ)”, with θ being the rotation angle. The set of the circuit element 61 and the circuit element 62 represents one Givens rotation circuit 60.
Where the Givens rotation circuit 60 is expressed with one-qubit gates and two-qubit gates, an Hadamard gate 63 is first disposed in the quantum bit that is the excitation source. Next, a CNOT gate 64 that has the control quantum bit as the excitation source and the target quantum bit as the excitation destination is provided. Next, rotation gates 65 and 66 around the Y-axis at the rotation angle θ are disposed in the quantum bit as the excitation source and the quantum bit as the excitation destination, respectively. Next, a CNOT gate 67 that has the control quantum bit as the excitation source and the target quantum bit as the excitation destination is provided. Lastly, an Hadamard gate 68 is disposed in the quantum bit that is the excitation source.
This Givens rotation is expressed by Expression (4) as illustrated below.
Of the two values expressed as “| . . . 0 . . . 1 . . . >” in Expression (4), the value on the left side corresponds to the quantum state of the quantum bit of the excitation destination (the “b”-th quantum bit), and the value on the right side corresponds to the quantum state of the quantum bit of the excitation source (the “a”-th quantum bit). Further, the Givens rotation can also be expressed as in the following Expression (5).
In Expression (5), I represents an identity operator. As illustrated in
When the rotation angle is θ, the circuit element 71 corresponding to the “a1”-th quantum bit that is an excitation source is expressed as “PXa1a1a2b1b2(θ)”. The circuit element 72 corresponding to the “a2”-th quantum bit that is an excitation source is expressed as “PXa2a1a2b1b2(θ)”. The circuit element 73 corresponding to the “b1”-th quantum bit that is an excitation destination is expressed as “PXb1a1a2b1b2(θ)”. The circuit element 74 corresponding to the “b2”-th quantum bit that is an excitation destination is expressed as “PXb2a1a2b1b2(θ)”.
Where the QNPPX circuit 70 is expressed with one-qubit gates and two-qubit gates, a CNOT gate 75a that has the “a2”-th quantum bit as the control quantum bit and the “a1”-th quantum bit as the target quantum bit is first provided. Next, a CNOT gate 75b that has the “b2”-th quantum bit as the control quantum bit and the “b2”-th quantum bit as the target quantum bit is provided. Next, a CZ gate 75c for the “a1”-th quantum bit and the “a2”-th quantum bit is provided, and an Hadamard gate 76a is disposed in the “b2”-th quantum bit. Next, a CNOT gate 75d that has the “b2”-th quantum bit as the control quantum bit and the “b1”-th quantum bit as the target quantum bit is provided. Next, a rotation gate 76b around the Y-axis at the rotation angle θ is disposed in the “b1”-th quantum bit, and a rotation gate 76c around the Y-axis at a rotation angle −θ is disposed in the “b2”-th quantum bit.
Next, a CZ gate 75e for the “a1”-th quantum bit and the “b2”-th quantum bit is provided. Next, a CNOT gate 75f that has the “a1”-th quantum bit as the control quantum bit and the “a2”-th quantum bit as the target quantum bit is provided. Next, a rotation gate 76d around the Y-axis at the rotation angle θ is disposed in the “b1”-th quantum bit, and a rotation gate 76e around the Y-axis at the rotation angle −θ is disposed in the “b2”-th quantum bit. Next, a CNOT gate 75g that has the “a2”-th quantum bit as the control quantum bit and the “b1”-th quantum bit as the target quantum bit is provided.
Next, a CNOT gate 75h that has the “a2”-th quantum bit as the control quantum bit and the “b2”-th quantum bit as the target quantum bit is provided. Next, a rotation gate 76f around the Y-axis at the rotation angle −θ is disposed in the “b1”-th quantum bit, and a rotation gate 76g around the Y-axis at the rotation angle θ is disposed in the “b2”-th quantum bit. Next, a CNOT gate 75i that has the “a1”-th quantum bit as the control quantum bit and the “b1”-th quantum bit as the target quantum bit is provided. Next, a CZ gate 75j for the “a1”-th quantum bit and the “b2”-th quantum bit is provided. Next, a rotation gate 76h around the Y-axis at the rotation angle −θ is disposed in the “b1”-th quantum bit, and a rotation gate 76i around the Y-axis at the rotation angle θ is disposed in the “b2”-th quantum bit.
Next, a CNOT gate 75k that has the “b2”-th quantum bit as the control quantum bit and the “b1”-th quantum bit as the target quantum bit is provided. Next, a CNOT gate 75l that has the “a2”-th quantum bit as the control quantum bit and the “b2”-th quantum bit as the target quantum bit is provided. Next, an Hadamard gate 76j is disposed in the “b2”-th quantum bit. Next, a CNOT gate 75m that has the “b2”-th quantum bit as the control quantum bit and the “a2”-th quantum bit as the target quantum bit is provided. Next, a CNOT gate 75n that has the “a2”-th quantum bit as the control quantum bit and the “a1”-th quantum bit as the target quantum bit is provided.
The QNPPX operation for all states of each quantum bit is expressed by the following equation (7).
The two-qubit gates of the QNPPX circuit 70 illustrated in
As the one-electron excitations and the two-electron excitations are implemented with rotation gate elements in this manner, the number of gate operations can be reduced. Moreover, if the number of electron excitations implementing quantum circuits is small, the number of gate operations can be further reduced. In a case where the rotation angle θ in the rotation gate elements that realize one-electron excitations and two-electron excitations is small enough, the influence of the excitations on the wave function is very small. That is, the quantum circuits of a rotation gate element having a sufficiently small rotation angle θ has no significant influence on a calculation result even if the quantum circuit is not implemented. Therefore, the quantum circuit generation unit 110 prevents implementation of rotation gate elements to which a rotation angle θ equal to or smaller than the threshold is applied. Thus, the number of gate operations is reduced.
In the description below, a base energy calculation process by the VQE using a quantum circuit in which the number of gate operations is reduced will be described in detail.
[Step S101] The quantum circuit generation unit 110 determines a problem to be calculated, based on an input from the user. For example, the quantum circuit generation unit 110 determines a molecular type, an atomic position, a basis function, an active space, or the like to be calculated. Also, the quantum circuit generation unit 110 determines association of the operators included in the Hamiltonian of the wave function with quantum bits, using Jordan-Wigner transformation, for example.
[Step S102] The quantum circuit generation unit 110 generates a quantum circuit that expresses electron excitations with rotation gate elements. The quantum circuit generation process will be described later in detail (see
[Step S103] The quantum calculation management unit 120 controls the quantum computer 200 to calculate base energy. The VQE is used in calculating the base energy, and the optimization calculation unit 130 optimizes the optimization variable θ. The base energy calculation process will be described later in detail (see
[Step S104] The quantum calculation management unit 120 outputs a finally obtained optimal solution (a state in which energy has the minimum value).
Through such procedures, quantum chemical calculation by the VQE is performed. In the description below, each of the processes in quantum chemical calculation will be explained in detail.
[Step S111] The quantum circuit generation unit 110 calculates CI coefficients by a classical quantum mechanics calculation technique. Thus, CI coefficients corresponding to the respective electron excitations incorporated into the quantum circuit are calculated.
For example, the quantum circuit generation unit 110 calculates CI coefficients by the Configuration Interaction Singles and Doubles (CISD) method. CISD is a calculation in which a wave function as in Expression (8) below is created, and coefficients Cab and Ca1a2b1b2 are variably calculated so that the energy E expressed in Expression (9) becomes smaller.
Cab and Ca1a2b1b2 are the CI coefficients. Cab is a CI coefficient corresponding to a one-electron excitation in which the orbit corresponding to the “a”-th quantum bit is an excitation source, and the orbit corresponding to the “b”-th quantum bit is an excitation destination. Ca1a2b1b2 is a CI coefficient corresponding to a two-electron excitation in which orbits corresponding to the “a1”-th quantum bit and the “a2”-th quantum bit are excitation sources, and orbits corresponding to the “b1”-th quantum bit and the “b2”-th quantum bit are excitation destinations. Meanwhile, “a†baa|ψHF>” and “a†a2a†a1ab2ab1|ψHF>” represent the corresponding excitation-destination calculation bases (such as |1100>, for example).
The calculated CI coefficients are used as the initial values of variables (the rotation angle θ) to be applied to the rotation gate elements in the corresponding excitation (a one-electron excitation or a two-electron excitation). If the CI coefficient (Cab Or Ca1a2b1b2Cab) is small enough, it is possible to infer that the calculation basis corresponding to the CI coefficient is unnecessary in the wave function to be obtained after optimization by the VQE. Therefore, the quantum circuit generation unit 110 does not implement, in the quantum circuit in the VQE calculation, a circuit that calculates a calculation basis having a CI coefficient with an absolute value equal to or smaller than a threshold.
If the absolute value of the CI coefficient (Cab or Ca1a2b1b2) is greater than the threshold, the quantum circuit generation unit 110 uses the CI coefficient as the initial value of the variable for the corresponding circuit. The value of the variable is optimized by the optimization calculation unit 130 in the VQE calculation process.
[Step S112] The quantum circuit generation unit 110 generates an initial state of the wave function. For example, the quantum circuit generation unit 110 uses a Hartree Fock (HF) state as the initial state.
[Step S113] The quantum circuit generation unit 110 repeats the processes in steps S114 to S116 for all one-electron excitations.
[Step S114] The quantum circuit generation unit 110 determines whether the absolute value of the CI coefficient corresponding to the target one-electron excitation is greater than a predetermined threshold. If the absolute value of the CI coefficient is greater than the threshold, the quantum circuit generation unit 110 moves the process on to step S115. Furthermore, if the absolute value of the CI coefficient is not greater than the threshold, the quantum circuit generation unit 110 moves the process on to step S116.
[Step S115] The quantum circuit generation unit 110 sets a generation flag “Yes” associated with the target one-electron excitation. After that, the quantum circuit generation unit 110 moves the process on to step S117.
[Step S116] The quantum circuit generation unit 110 sets a generation flag “No” associated with the target one-electron excitation.
[Step S117] When the processes in steps S114 to S116 for all one-electron excitations are completed, the quantum circuit generation unit 110 moves the process on to step S121 (see
[Step S121] The quantum circuit generation unit 110 repeats the processes in steps S121 to S124 for all two-electron excitations.
[Step S122] The quantum circuit generation unit 110 determines whether the absolute value of the CI coefficient corresponding to the target two-electron excitation is greater than a predetermined threshold. If the absolute value of the CI coefficient is greater than the threshold, the quantum circuit generation unit 110 moves the process on to step S123. Furthermore, if the absolute value of the CI coefficient is not greater than the threshold, the quantum circuit generation unit 110 moves the process on to step S124.
[Step S123] The quantum circuit generation unit 110 sets a generation flag “Yes” associated with the target two-electron excitation. After that, the quantum circuit generation unit 110 moves the process on to step S125.
[Step S124] The quantum circuit generation unit 110 sets a generation flag “No” associated with the target two-electron excitation.
[Step S125] When the processes in steps S122 to S124 for all two-electron excitations are completed, the quantum circuit generation unit 110 moves the process on to step S126.
[Step S126] The quantum circuit generation unit 110 generates Givens rotation circuits corresponding to the one-electron excitations associated with the generation flag “Yes”. The quantum circuit generation unit 110 then disposes the generated Givens rotation circuits in the Ansatz circuit 31. Also, the quantum circuit generation unit 110 initializes the rotation angle θ of the disposed Givens rotation circuits to the value of the corresponding CI coefficient. For example, “Cab” is set as the initial value of θ in the Givens rotation circuit “Gab(θ)” that has the “a”-th quantum bit as the excitation source and the “b”-th quantum bit as the excitation destination.
[Step S127] The quantum circuit generation unit 110 generates QNPPX circuits corresponding to the two-electron excitations associated with the generation flag “Yes”. The quantum circuit generation unit 110 then disposes the generated QNPPX circuits in the Ansatz circuit 31. Also, the quantum circuit generation unit 110 initializes the rotation angle θ of the disposed QNPPX circuits to the value of the corresponding CI coefficient. For example, “Ca1a2b1b2” is set as the initial value of θ in the QNPPX circuit “PXa1a2b1b2(θ)” that has the “a1”-th and “a2”-th quantum bits as excitation sources and the “b1”-th and “b2”-th quantum bits as excitation destinations.
As illustrated in
Note that it is possible to estimate that the value of the coefficient of the circuit corresponding to a one-electron excitation or a two-electron excitation after optimization by the VQE is close to the absolute value of the CI coefficient. Accordingly, by setting the CI coefficient as the VQE parameter initial value to the rotation angle of the corresponding excitation, it is possible to accelerate convergence of a VQE calculation result, and perform the processing more efficiently.
Further, if the value of the coefficient of the circuit corresponding to a one-electron excitation or a two-electron excitation after optimization in the VQE is close to the absolute value of the CI coefficient, exclusion of the circuits corresponding to the calculation bases having CI coefficients equal to or smaller than the threshold from the VQE hardly affect the VQE calculation result. In other words, degradation of calculation accuracy is prevented.
The quantum circuit generation unit 110 generates an Ansatz circuit 81 while referring to the generation table 80. In the Ansatz circuit 81, a HF state preparation circuit 82 for preparing a HF state is first disposed. Following the HF state preparation circuit 82, a plurality of Givens rotation circuits corresponding to one-electron excitations are provided.
As long as the quantum bits of excitation sources and excitation destinations do not overlap, the quantum circuit generation unit 110 disposes circuits in the first column (the column closer to the left side in the quantum circuit). For example, the quantum circuit generation unit 110 disposes the corresponding circuits in order from the top of the generation table 80. Note that the width of a column in which Givens rotation circuits are disposed is equal to the width of one Givens rotation circuit. Also, the width of a column in which QNPPX circuits are disposed is equal to the width of one QNPPX circuit.
For example, the quantum circuit generation unit 110 first disposes, in the first column, a Givens rotation circuit that has the quantum bit with a quantum bit number “0” as the excitation source, and the quantum bit with a quantum bit number “4” as the excitation destination. The quantum circuit generation unit 110 next disposes, in the same first column, a Givens rotation circuit that has the quantum bit with a quantum bit number “1” as the excitation source, and the quantum bit with a quantum bit number “5” as the excitation destination.
The quantum bit number of the excitation source of the Givens rotation circuit to be next disposed (the third row in the generation table 80) is “0”. In the quantum bit with the quantum bit number “0”, a circuit has already been disposed in the first column. Therefore, the quantum circuit generation unit 110 next disposes, in the second column, a Givens rotation circuit that has the quantum bit with the quantum bit number “0” as the excitation source, and the quantum bit with a quantum bit number “6” as the excitation destination.
Further, in the Givens rotation circuit to be disposed (the fourth row in the generation table 80), the quantum bit number of the excitation source is “3”, and the quantum bit number of the excitation destination is “7”. For the quantum bits corresponding to those quantum bit numbers, there is not a circuit disposed in the first column. Therefore, the quantum circuit generation unit 110 disposes, in the first column, a Givens rotation circuit that has the quantum bit with the quantum bit number “3” as the excitation source, and the quantum bit with the quantum bit number “7” as the excitation destination.
Likewise, the QNPPX circuits corresponding to two-electron excitations are disposed on the left side as long as there are no overlaps among the quantum bits. As a result, in the third column, QNPPX circuits that have the respective quantum bits with quantum bit numbers “0, 1” as excitation sources, and the respective quantum bits with quantum bit numbers “4, 5” as excitation destinations are disposed.
In the fourth column, QNPPX circuits that have the respective quantum bits with quantum bit numbers “0, 3” as excitation sources, and the respective quantum bits with quantum bit numbers “4, 7” as excitation destinations are disposed. Further, in the fourth column, QNPPX circuits that have the respective quantum bits with quantum bit numbers “2, 1” as excitation sources, and the respective quantum bits with quantum bit numbers “6, 5” as excitation destinations are disposed. In the fifth column, QNPPX circuits that have the respective quantum bits with the quantum bit numbers “0, 1” as excitation sources, and the respective quantum bits with quantum bit numbers “6, 7” as excitation destinations are disposed.
As the circuits are arranged in such a manner, the Ansatz circuit 81 having a small circuit depth is generated. Quantum chemical calculation by the VQE is performed by a quantum circuit including the Ansatz circuit 81 generated in such a manner. The quantum chemical calculation by the VQE is executed by a cooperative process between the quantum computer 200 and the classical computer 100.
The calculation of Hamiltonians and the update of the parameters θ as described above are repeated until the base energy is obtained.
[Step S201] The quantum calculation management unit 120 of the classical computer 100 instructs the quantum computer 200 to calculate energy with the quantum circuit for VQE calculation. At that time, the quantum calculation management unit 120 designates the parameters θ to be applied to the quantum circuit. CI coefficients are used as the initial values of the parameters θ. After optimization of θ, the values of the parameters θ updated by the optimization are designated as the values of variables.
[Step S202] The quantum computer 200 operates the quantum bits in accordance with the quantum circuit, and calculates the quantum circuit. The quantum computer 200 transmits the result of measurement for each quantum bit to the classical computer 100.
[Step S203] The quantum calculation management unit 120 of the classical computer 100 calculates energy from the results of measurement of the quantum bits.
[Step S204] The quantum calculation management unit 120 determines whether the energy difference before and after the update of the parameters θ is equal to or smaller than a predetermined threshold in the second and subsequent energy calculations. If the energy difference is equal to or smaller than the threshold, the quantum calculation management unit 120 moves the process on to step S206. Furthermore, if the energy difference is neither equal to nor smaller than the threshold, the quantum calculation management unit 120 moves the process on to step S205. Note that the quantum calculation management unit 120 invariably moves the process on to step S205 after the first energy calculation.
[Step S205] The optimization calculation unit 130 updates the parameters θ in a direction in which the expectation value of energy decreases. The quantum calculation management unit 120 acquires the updated values of the parameters θ from the optimization calculation unit 130, and moves the process on to step S201.
[Step S206] The quantum calculation management unit 120 acquires the minimum value of the repeatedly calculated energy as the base energy.
In this manner, a result of calculation of the base energy can be obtained. The accuracy of the obtained calculation result is equal to that by the UCCSD.
As illustrated in the graph 83, the energy values by the UCCSD and the energy values in a case where rotation gate elements are used are substantially the same values, and the “+” marks and the “o” marks overlap. That is, even if one-electron excitations and two-electron excitations are replaced with rotation gate elements, the calculation can be performed with an accuracy equal to that with the UCCSD.
Further, as rotation gate elements are used in the Ansatz circuit, the number of gates is greatly reduced compared with that with the UCCSD. Note that the number of gates in a case where rotation gate elements are used in the Ansatz circuit varies depending on the threshold for determining whether to incorporate an excitation circuit.
In an Ansatz using rotation gate elements (threshold “10−2”), the number of one-qubit gates is “610”, and the number of two-qubit gates is “854”. In an Ansatz using rotation gate elements (threshold “10−20”), the number of one-qubit gates is “5798”, and the number of two-qubit gates is “7966”. In an Ansatz of the UCCSD, the number of one-qubit gates is “41244”, and the number of two-qubit gates is “65968”.
In the Ansatz using rotation gate elements (threshold “10−2”), the number of one-qubit gates decreases to 1.5%, and the number of two-qubit gates decreases to 1.3%, compared with the UCCSD. In the Ansatz using rotation gate elements (threshold “10−20”), the number of one-qubit gates decreases to 14.1%, and the number of two-qubit gates decreases to 12.1%, compared with the UCCSD.
As described above, even in a case where the threshold is set to “10−20” with which a degree of accuracy similar to that with the UCCSD can be obtained, there is an effect of reducing the number of gates by 80% to 90% compared with the UCCSD. Furthermore, if the threshold is increased to about “10−2” by allowing a decrease in accuracy, there is an effect of reducing the number of gates by 98% to 99% compared with the UCCSD. Accordingly, the threshold is made greater in accordance with the accuracy desired in quantum chemical calculation, for example, so that the speed of calculation can be increased.
In the description below, a specific example of molecular energy calculation will be explained. The object in question is N2 (nitrogen molecules). The number of quantum bits to be used is 20 quantum bits. It is assumed that the base energy corresponding to the bond length (interatomic distance) is then calculated.
For CI coefficient calculation, classical quantum chemical calculation software is used. It is assumed that a threshold & is determined, CI coefficients Cab and Ca1a2b1b2 satisfying ε<|C| are selected, and circuits of excitations corresponding to the selected CI coefficients are mounted in an Ansatz circuit. The initial state is “ψ(HF)=|00000011111111111111>”.
In the implementation of electron excitations, in the case of “ε=10−3”, one-electron excitations corresponding to C6,18 and C7,19 are implemented in Givens rotation circuits. Here, a set including C6,18 and C7,19 is represented by τ1, and the wave function till implementation of one-electron excitations is expressed by the following Expression (10).
In a manner similar to that for one-electron excitations, QNPPX circuits of two-electron excitations corresponding to the CI coefficients equal to or greater than the threshold E are implemented. Where a set of the CI coefficients exceeding the threshold E is represented by τ2, the wave function is expressed by the following Expression (11).
The base energy obtained by the optimization calculation unit 130 optimizing the parameters for the wave function is “−107.6453”. This is a result sufficiently close to the exact solution “−107.6528” obtained by Full CI, which accurately solves the Schrödinger equation.
In a third embodiment, when rotation gate elements are disposed in an Ansatz circuit, circuits of one-electron excitations and circuits of two-electron excitations are allowed to coexist in one column having a width equal to the width of one QNPPX circuit. As Givens rotation circuits corresponding to one-electron excitations and QNPPX circuits corresponding to two-electron excitations are allowed to coexist in the same column, circuit placement that can be efficiently calculated becomes possible.
For example, the quantum circuit generation unit 110 performs processes illustrated in
[Step S301] The quantum circuit generation unit 110 creates a generation table. For example, the quantum circuit generation unit 110 registers, in the generation table, records corresponding to the respective one-electron excitations and two-electron excitations associated with the generation flag “Yes”. In the registered record, the quantum bit numbers of the excitation sources and the excitation destinations are indicated and associated with the variables indicating rotation angles.
[Step S302] The quantum circuit generation unit 110 sets an initial value “1” to a variable “Dep” (Dep=1) indicating the largest column number that can be a circuit placement position in the Ansatz circuit.
[Step S303] The quantum circuit generation unit 110 performs a process of determining a placement position for each two-electron excitation indicated in the generation table (steps S304 to S309). Here, the two-electron excitation for which the placement position is to be determined is represented by “x”.
[Step S304] The quantum circuit generation unit 110 performs a placement possibility determination process (step S305) for each column from the first column to the Dep column. Here, the determination target column is a column z.
[Step S305] The quantum circuit generation unit 110 determines whether at least one quantum bit of an excitation source and an excitation destination of the two-electron excitation x in the column z has been used. If at least one quantum bit has been used, the quantum circuit generation unit 110 moves the process on to step S306. Furthermore, if all the quantum bits are unused, the quantum circuit generation unit 110 moves the process on to step S307.
[Step S306] In a case where the determination in step S305 is completed for all the columns from the first column to the Dep column, the quantum circuit generation unit 110 moves the process on to step S308.
[Step S307] The quantum circuit generation unit 110 disposes the QNPPX circuit corresponding to the two-electron excitation x to be subjected to the placement position determination in the column z that is the determination target in step S305. After that, the quantum circuit generation unit 110 moves the process on to step S310.
[Step S308] The quantum circuit generation unit 110 increments the variable “Dep” by 1 (Dep+1).
[Step S309] The quantum circuit generation unit 110 disposes the QNPPX circuit corresponding to the two-electron excitation x to be subjected to the placement position determination in the Dep column after the increment.
[Step S310] In a case where the processes in steps S304 to S309 have been performed for all two-electron excitations indicated in the generation table, the quantum circuit generation unit 110 moves the process on to step S321 (see
[Step S321] The quantum circuit generation unit 110 performs a process of determining a placement position for each one-electron excitation indicated in the generation table (steps S322 to S328). Here, the one-electron excitation for which the placement position is to be determined is represented by “y”.
[Step S322] The quantum circuit generation unit 110 performs a determination process in steps S323 and S324 for each column from the first column to the Dep column. Here, the determination target column is the column Z.
[Step S323] The quantum circuit generation unit 110 determines whether at least one quantum bit of the excitation source and the excitation destination of the one-electron excitation y in the column z has been used for a two-electron excitation. If at least one quantum bit has been used, the quantum circuit generation unit 110 moves the process on to step S325. Furthermore, if any of the quantum bits is unused, the quantum circuit generation unit 110 moves the process on to step S324.
[Step S324] The quantum circuit generation unit 110 determines whether at least one quantum bit of the excitation source and the excitation destination of the one-electron excitation y in the column z has been used n times for other one-electron excitations. n is a natural number indicating how many quantum operations for one-electron excitations can be implemented within the time of one quantum operation for one two-electron excitation. The value of n is determined by the process execution time for a one-qubit gate and the process execution time for a two-qubit gate. For example, n is a value of about “5”.
In a case where at least one of the target quantum bits of the one-electron excitation y has been used n times in the column z, the quantum circuit generation unit 110 moves the process on to step S325. Furthermore, in a case where all the quantum bits have been used only up to n−1 times, the quantum circuit generation unit 110 moves the process on to step S326.
Note that, even in a case where any quantum bit of the target one-electron excitation y has been used only up to n−1 times, the quantum circuit generation unit 110 moves the process on to step S325 when the position in which the Givens rotation circuit for the one-electron excitation y is to be mounted is not found in the column z. For example, when the column z is divided into n subdivided columns, the Givens rotation circuits corresponding to one-electron excitations are disposed in the subdivided columns. If there is an unused subdivided column in which both the two quantum bits of the excitation source and the excitation destination of the one-electron excitation y to be mounted are unused, the one-electron excitation y can be mounted in the column z. If there are no subdivided columns in which both the two quantum bits of the excitation source and the excitation destination of the one-electron excitation y to be disposed are unused, the one-electron excitation y cannot be implemented in the column z, and therefore, the process is moved on to step S325.
[Step S325] In a case where the determination in steps S323 and S324 is completed for all the columns from the first column to the Dep column, the quantum circuit generation unit 110 moves the process on to step S327.
[Step S326] The quantum circuit generation unit 110 disposes the Givens rotation circuit corresponding to the one-electron excitation y to be subjected to the placement position determination in the column z that is the determination target in steps S323 and S324. After that, the quantum circuit generation unit 110 moves the process on to step S329.
[Step S327] The quantum circuit generation unit 110 increments the variable “Dep” by 1 (Dep+1).
[Step S328] The quantum circuit generation unit 110 disposes the Givens rotation circuit corresponding to the one-electron excitation y to be subjected to the placement position determination in the Dep column after the increment.
[Step S329] In a case where the processes in steps S322 to S327 have been performed for all the one-electron excitations indicated in the generation table, the quantum circuit generation unit 110 ends the rotation gate element placement process.
In this manner, an Ansatz circuit in which Givens rotation circuits of one-electron excitations and QNPPX circuits of two-electron excitations coexist in the same column is generated. The generated Ansatz circuit efficiently utilizes each quantum bit, and reduces the depth of the circuit.
For example, the quantum circuit generation unit 110 first disposes, in the first column, a QNPPX circuit that has each quantum bit with quantum bit numbers “1, 3” as an excitation source, and each quantum bit with quantum bit numbers “5, 7” as an excitation destination.
In the QNPPX circuit to be placed next (the sixth row in the generation table 90), “7” is included among the quantum bit numbers of the excitation destinations. Since the quantum bit number “7” is already used in the first column by a QNPPX circuit, the quantum bit number “7” cannot be placed any more in the first column. Therefore, the quantum circuit generation unit 110 disposes, in the second column, a QNPPX circuit that has each quantum bit with quantum bit numbers “0, 3” as an excitation source, and each quantum bit with quantum bit numbers “4, 7” as an excitation destination.
The quantum circuit generation unit 110 next disposes, in the second column, a QNPPX circuit that has each quantum bit with quantum bit numbers “2, 1” as an excitation source, and each quantum bit with quantum bit numbers “6, 5” as an excitation destination.
In the QNPPX circuit to be placed next (the eighth row in the generation table 90), “1” and “7” are included among the quantum bit numbers of the excitation destinations. The quantum bit numbers “1” and “7” are already used by QNPPX circuits both in the first column and the second column. Therefore, the QNPPX circuit to be placed next cannot be disposed in either of the first column and the second column. Therefore, the quantum circuit generation unit 110 disposes, in the third column, a QNPPX circuit that has each quantum bit with quantum bit numbers “0, 1” as an excitation source, and each quantum bit with quantum bit numbers “6, 7” as an excitation destination.
After that, the quantum circuit generation unit 110 disposes Givens rotation circuits in vacant regions in the respective columns. Note that, in the example in
As one-electron excitation circuits and two-electron excitation circuits can coexist in the same column in this manner, the length of the Ansatz circuit 91 can be shortened.
In the second embodiment, an example case where the base energy of a nitrogen molecule is calculated has been described. However, the processes described in the second embodiment can also be applied to other types of quantum chemical calculation.
The above description merely indicates the principles of the present invention. Further, numerous modifications and changes may be made by those skilled in the art, and the present invention is not limited to the above-described or illustrated exact configurations and application examples. All corresponding modifications and equivalents are regarded as those within the scope of the present invention by appended claims and equivalents thereof.
All examples and conditional language provided herein are intended for the pedagogical purposes of aiding the reader in understanding the invention and the concepts contributed by the inventor to further the art, and are not to be construed as limitations to such specifically recited examples and conditions, nor does the organization of such examples in the specification relate to a showing of the superiority and inferiority of the invention. Although one or more embodiments of the present invention have been described in detail, it should be understood that the various changes, substitutions, and alterations could be made hereto without departing from the spirit and scope of the invention.
This application is a continuation application of International Application PCT/JP2022/011510 filed on Mar. 15, 2022 and designated the U.S., the entire contents of which are incorporated herein by reference.
Number | Date | Country | |
---|---|---|---|
Parent | PCT/JP2022/011510 | Mar 2022 | WO |
Child | 18793991 | US |