Quantum circuit construction method and system for preparing special spin eigenstates

CN122905087APending Publication Date: 2026-10-13HEFEI MICRO ERA DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611369639.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-04
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

SCS电路和WDB电路均要求自旋值严格满足,因此只能制备第一类自旋本征态(Dicke态),无法处理的一般情况

Benefits of technology

[0083]根据本发明实施例提供的制备特殊自旋本征态的量子电路构建方法和系统,本发明的制备特殊自旋本征态的量子电路构建方法,支持任意有效的自旋值,能够制备最大自旋值、非最大自旋值且局部配对形式、非最大自旋值且全局配对形式的三类特殊自旋本征态,并且对于非最大自旋值的一般情况,能够兼容局部配对与全局配对两类特殊自旋耦合结构,从而扩大了适用范围,还能够有效控制量子电路深度和量子门数量,保证制备效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122905087A_ABST
    Figure CN122905087A_ABST
Patent Text Reader

Abstract

The application discloses a quantum circuit construction method and system for preparing a special spin eigenstate, and the method comprises the following steps: determining whether the spin value of a target spin eigenstate and the value of the projection of the spin value on the axis direction are all valid according to the parity of the particle number; if all the values are valid, initializing an initial quantum circuit containing a quantum bit; when the time is t, performing a same-direction pairing processing to obtain a same-direction pairing CG coefficient; when the target spin eigenstate is in a local pairing form and t is less than T, performing the local pairing processing and the same-direction pairing processing to obtain a same-direction pairing CG coefficient of a plurality of quantum bits and a quantum circuit corresponding to a spin singlet of a remaining quantum bit; when the target spin eigenstate is in a global pairing form and t is less than T, performing a global pairing processing to obtain a reverse pairing CG coefficient; and constructing a CG circuit. The application can effectively control the depth of the quantum circuit and the number of quantum gates, and ensure the preparation efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of quantum circuit technology, and in particular to a method for constructing quantum circuits with special spin eigenstates and a system for constructing quantum circuits with special spin eigenstates. Background Technology

[0002] Spin eigenstates are important quantum states in many-body quantum systems that describe spin and its coupling structure. They are typically described using the total spin value s and its projection onto the z-axis. To characterize, denoted as For a particle with a spin value of 1 / 2, its two spin projection values ​​correspond to... and Each qubit naturally constitutes a quantum bit, and usually corresponds to one of the qubits. state and state.

[0003] When included The system of 1 particle reaches its maximum spin value. When the corresponding spin eigenstate is a special type of spin state, it corresponds to the Dicke state, which is widely studied in the field of quantum computing.

[0004] For non-maximum spin values Generally, depending on the spin coupling structure, spin eigenstates typically comprise two special forms. One is the local pairing form, where some particles couple in pairs to form spin singlets, and the remaining particles further couple to form maximally spin substates, collectively constituting the target spin state. This structure is widely present in quantum chemical systems where electrons preferentially occupy low-energy orbitals and form paired electrons. The other is the global pairing form, where two sets of particles are first coupled to form substates with definite spins, and then coupled through the CG (Clebsch–Gordan) coefficient to obtain the target total spin state. This form is common in strongly correlated quantum systems with orbital degeneracy, long-range exchange interactions, or collective correlation effects. These two types of structures reflect two special quantum coupling mechanisms—local correlation and collective correlation—and are important theoretical foundations for describing the electronic structure and magnetic properties of complex quantum systems.

[0005] Efficiently preparing the three types of special spin eigenstates—those with maximum spin, those with local pairing but not maximum spin, and those with global pairing but not maximum spin—is a key issue in quantum computing applications. In tasks such as QPE (Quantum Phase Estimation), VQE (Variational Quantum Eigensolver), quantum many-body simulation, and molecular electronic structure calculation, whether the initial state satisfies the correct spin symmetry directly affects computational accuracy, convergence efficiency, and the reachability of the target state. Therefore, constructing quantum circuits capable of preparing these three types of special spin eigenstates with high fidelity and low overhead is a crucial fundamental technology for improving the practicality of quantum algorithms.

[0006] However, the spin eigenstate preparation schemes in related technologies mainly include SCS (Split & Cyclic Shift) circuits, WDB (Weight Distribution Block) circuits, and Serber circuits. Both SCS and WDB circuits require the spin value to strictly satisfy... Therefore, only type I spin eigenstates (Dicke states) can be prepared, and other spin eigenstates cannot be processed. In general, even in the construction of second-type locally paired spin eigenstates, these two types of circuits can only serve as sub-modules for preparing maximally paired spin sub-states, and cannot be directly used for the preparation of third-type globally paired spin eigenstates. Although Serber circuits can handle... Any spin value, but the projected value must strictly satisfy... This means that only spin eigenstates with projection values ​​equal to the spin values ​​can be prepared, and it cannot cover... In general, Serber circuits are mainly designed for the second type of local pairing structure, and lack an effective preparation mechanism for the spin eigenstates of the third type of global pairing. Summary of the Invention

[0007] The present invention is proposed to solve at least one of the above-mentioned problems. According to a first aspect of the present invention, a method for constructing quantum circuits with special spin eigenstates is provided, the method comprising:

[0008] Based on the number of particles The parity of the target spin eigenstate is used to determine its spin value. The spin value exist Projection values ​​along the axis Are all possible values ​​valid?

[0009] If all are valid, then initialize the included... An initial quantum circuit with 10 qubits;

[0010] when When the same direction pairing is performed, the same direction pairing CG coefficients are obtained;

[0011] when Furthermore, when the target spin eigenstate is in the form of local pairing, local pairing processing and same-direction pairing processing are performed to obtain the same-direction pairing CG coefficients of several qubits and the quantum circuit of the spin single state corresponding to the remaining several qubits.

[0012] when Furthermore, when the target spin eigenstate is in a globally paired form, global pairing processing is performed to obtain the reverse pairing CG coefficients;

[0013] Construct a CG circuit based on the same-direction pairing CG coefficients or the opposite-direction pairing CG coefficients;

[0014] Based on the number of active qubits, existing SCS circuit technology is used to iteratively generate an SCS circuit, and the spin singlet quantum circuit, the CG circuit, and the SCS circuit are synthesized sequentially to obtain a complete quantum circuit.

[0015] In one embodiment of the invention, the spin value and projection value The valid range of values ​​is:

[0016] When the number of particles Even number and spin value satisfy , or, number of particles Odd number and spin value satisfy At that time, spin value efficient;

[0017] When the projection value satisfy And the difference When the value is an integer, the projection value efficient.

[0018] In one embodiment of the present invention, the step of performing local pairing processing includes:

[0019] The qubits are arranged in ascending order of their serial numbers;

[0020] After Each pair of qubits is paired up to generate a quantum circuit that fabricates each pair of qubits into a spin singlet.

[0021] Forward Each quantum bit is paired in the same direction.

[0022] In one embodiment of the present invention, the step of fabricating a pair of qubits into a spin single-state quantum circuit includes:

[0023] Apply a qubit to the smaller qubit in the pair of qubits An X gate is applied to the bit with the largest sequence number;

[0024] Using the smaller sequence number bit as the control bit and the larger sequence number bit as the controlled bit, apply a... Control X-gate;

[0025] Apply a Z-gate to the bit with the larger sequence number.

[0026] In one embodiment of the present invention, the spin singlet is .

[0027] In one embodiment of the present invention, the step of performing the same-direction pairing process includes:

[0028] According to the spin value and the projection value Calculate the difference ;

[0029] like Then The qubits are divided into two groups, each containing... and Each qubit is used to adjust the initial state and calculate the CG coefficients for same-direction pairing.

[0030] In one embodiment of the present invention, the step of calculating the same-direction pairing CG coefficients includes:

[0031] Let the iteration value from Decrease to 1 for each The CG coefficient is calculated using the following formula. :

[0032] .

[0033] Among them, if Serial Number Incrementing from 0 to ;like Serial Number from Increment to .

[0034] In one embodiment of the present invention, the step of performing global pairing processing includes:

[0035] According to the number of particles and the projection value Calculate the difference ;

[0036] like Then The qubits are divided into two groups, each containing... and Each qubit is used to adjust the initial state and calculate the reverse pairing CG coefficients.

[0037] In one embodiment of the present invention, adjusting the initial state specifically involves arranging the qubits in ascending order of their serial numbers, starting with the first... An X gate is applied to each of the qubits.

[0038] In one embodiment of the present invention, the step of calculating the reverse pairing CG coefficients includes:

[0039] Let the iteration value from Decrease to 1 for each ,judge and Size relationship;

[0040] like The CG coefficient is then calculated using the following formula. :

[0041] .

[0042] like The CG coefficient is then calculated using the following formula. :

[0043] .

[0044] like The CG coefficient is then calculated using the following formula. :

[0045] .

[0046] Among them, when At that time, serial number Incrementing from 0 to ,when At that time, serial number from Increment to ,when At that time, serial number from Increment to .

[0047] In one embodiment of the present invention, the step of constructing a CG circuit based on the same-direction pairing CG coefficients or the opposite-direction pairing CG coefficients includes:

[0048] Calculate the rotation parameter list of the parameterized quantum gates in the circuit based on the same-direction pairing CG coefficients or the opposite-direction pairing CG coefficients;

[0049] Based on difference With grouping parameters The size relationship is determined, and the CG circuit is constructed based on the rotation parameter list.

[0050] In one embodiment of the present invention, the step of listing the rotation parameters of the parameterized quantum gate in the computing circuit specifically includes:

[0051] Let the iteration value from Decreasing down to 1, for each L, the rotation parameters are calculated using the following formula. :

[0052] .

[0053] .

[0054] Among them, if ,make Serial Number from Decrease to 0; if ,make Serial Number from Decrease to ;

[0055] Remove or The remainder besides By serial number Arrange the parameters in ascending order to obtain the rotation parameter list.

[0056] In one embodiment of the present invention, the step of constructing the CG circuit includes:

[0057] like Then, the first CG circuit is constructed to sequentially implement the functions of one-hot encoding, CG coefficient allocation, encoding cancellation, and bit shifting;

[0058] like Then, an auxiliary qubit is added to the end of the qubit list and a switching quantum gate is applied, and then respectively for... and Two intervals are used to construct a second CG circuit to sequentially implement one-hot encoding, CG coefficient allocation, encoding cancellation, bit shifting, and auxiliary bit zeroing functions;

[0059] The CG circuit is constructed based on either the first CG circuit or the second CG circuit.

[0060] In one embodiment of the present invention, when The step of constructing the first CG circuit includes:

[0061] Using the second bit as the control bit and the first bit as the controlled bit, apply a... Control the X gate, then increment the sequence number of the control bit and the controlled bit, and repeat the application. Control X gate until applied indivual Control the X gate to achieve the one-hot encoding;

[0062] Let the iteration value from Decrease to 1 for each Apply 1 control Door and indivual control The gate enables the allocation of the CG coefficients;

[0063] By applying all quantum gates in the one-hot encoding process in reverse order, the encoding cancellation is achieved.

[0064] Let the iteration value from Decrease to 1 for each Apply indivual Control SWAP door and 1 Control the X gate to achieve the bit shift;

[0065] Among them, parameters Values ​​are taken sequentially from the list of rotation parameters.

[0066] In one embodiment of the present invention, when The step of constructing the second CG circuit includes:

[0067] for Interval, with the first The first bit is a control bit, the second bit... Each bit is a controlled bit, and an application is made. Control the X gate, then decrement the control bit and controlled bit number, and repeat the process. Control X gate until applied indivual Control the X gate to achieve the one-hot encoding;

[0068] Let the iteration value from Decrease to For each One was applied in total. control Door and indivual control The gate implements the CG coefficient allocation, wherein the parameters are... Take values ​​sequentially from the rotation parameter list and then take their negatives;

[0069] By applying all quantum gates in the one-hot encoding process in reverse order, the encoding cancellation is achieved.

[0070] Let the iteration value from Increment to For each Apply indivual Control SWAP door and 1 Control the X gate to achieve the bit shift;

[0071] for The interval is defined with the second bit as the control bit and the first bit as the controlled bit, and an application is made. Control the X gate, then increment the sequence number of the control bit and the controlled bit, and repeat the application. Control X gate until applied indivual Control the X gate to achieve the one-hot encoding;

[0072] Let the iteration value from Decrease to 1 for each Apply 1 control Door and indivual control Doors, and for each Gate adds auxiliary bits as Control bits are used to allocate the CG coefficients, wherein the parameters are... Take values ​​sequentially from the list of rotation parameters;

[0073] By applying all quantum gates in the one-hot encoding process in reverse order, the encoding cancellation is achieved.

[0074] Let the iteration value from Decrease to 1 for each Apply indivual Control SWAP door and 1 Control the X-gate and monitor each Control SWAP door and 1 Adding auxiliary bits to the X-gate as Control bits are used to achieve the bit shifting;

[0075] Set all auxiliary bits to zero.

[0076] According to a second aspect of the present invention, a quantum circuit construction system for preparing special spin eigenstates is provided, the system comprising: a preprocessing module, a local pairing module, a same-direction pairing module, a global pairing module, a CG circuit construction module, and an SCS circuit construction module;

[0077] The preprocessing module is used to determine the spin value of the target spin eigenstate based on the parity of the particle number N. The spin value exist Projection values ​​along the axis If all possible values ​​are valid, then initialize the value containing... An initial quantum circuit of 1 qubits, when When, the same-direction pairing module is invoked, when And when the target spin eigenstate is in a locally paired form, the locally paired module and the same-direction paired module are invoked. Furthermore, when the target spin eigenstate is in a globally paired form, the global pairing module is invoked;

[0078] The local pairing module is connected to the preprocessing module and the same-direction pairing module. It is used to perform local pairing processing on a number of qubits to obtain the corresponding spin single-state quantum circuit, and send the remaining number of qubits to the same-direction pairing module.

[0079] The same-direction pairing module is connected to the preprocessing module to perform same-direction pairing processing to obtain same-direction pairing CG coefficients.

[0080] The global pairing module is connected to the preprocessing module and is used to perform global pairing processing to obtain reverse pairing CG coefficients.

[0081] The CG circuit construction module is connected to the same-direction pairing module and the global pairing module, and is used to construct a CG circuit according to the same-direction pairing CG coefficient or the opposite-direction pairing CG coefficient;

[0082] The SCS circuit construction module is connected to the CG circuit construction module. It is used to call existing SCS circuit technology according to the number of qubits involved, iteratively generate the SCS circuit, and sequentially synthesize the spin singlet quantum circuit, the CG circuit and the SCS circuit to obtain a complete quantum circuit.

[0083] The quantum circuit construction method and system for preparing special spin eigenstates provided in the embodiments of the present invention support any effective spin value and can prepare three types of special spin eigenstates: maximum spin value, non-maximum spin value with local pairing, and non-maximum spin value with global pairing. Furthermore, for the general case of non-maximum spin value, it can be compatible with both local and global pairing special spin coupling structures, thereby expanding the scope of application. It can also effectively control the quantum circuit depth and the number of quantum gates, ensuring preparation efficiency. Attached Figure Description

[0084] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0085] Figure 1 This is a schematic flowchart of a method for constructing a quantum circuit with a special spin eigenstate according to an embodiment of the present invention;

[0086] Figure 2 This is a schematic diagram of a quantum circuit construction system for preparing special spin eigenstates according to an embodiment of the present invention;

[0087] Figure 3 This is a schematic diagram of the structure of a quantum circuit provided in an embodiment of the present invention;

[0088] Figure 4 A schematic diagram of a quantum circuit provided for another embodiment of the present invention. Detailed Implementation

[0089] To make the objectives, technical solutions, and advantages of the present invention more apparent, exemplary embodiments according to the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are merely a part of the embodiments of the present invention, and not all of the embodiments of the present invention. It should be understood that the present invention is not limited to the exemplary embodiments described herein. Based on the embodiments of the present invention described herein, all other embodiments obtained by those skilled in the art without inventive effort should fall within the protection scope of the present invention.

[0090] In the following description, numerous specific details are set forth in order to provide a more thorough understanding of the invention. However, it will be apparent to those skilled in the art that the invention can be practiced without one or more of these details. In other instances, certain technical features well-known in the art have not been described in order to avoid obscuring the invention.

[0091] It should be understood that the invention can be embodied in various forms and should not be construed as being limited to the embodiments set forth herein. Rather, providing these embodiments will make the disclosure thorough and complete, and will fully convey the scope of the invention to those skilled in the art.

[0092] To fully understand this invention, a detailed structure will be presented in the following description to illustrate the technical solution proposed by this invention. Optional embodiments of the invention are described in detail below; however, in addition to these detailed descriptions, the invention may have other embodiments.

[0093] The following detailed description of some embodiments of the present invention is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0094] To propose a general method for fabricating three types of special spin eigenstates—maximum spin, non-maximum spin with local pairing, and non-maximum spin with global pairing—and to provide a universal fabrication method compatible with both local and global pairing structures for the general case of non-maximum spin, the first aspect of this invention provides a quantum circuit construction method for fabricating special spin eigenstates, such as... Figure 1 As shown, the methods for constructing quantum circuits with special spin eigenstates include:

[0095] S1, based on the number of particles The parity of the target spin eigenstate is used to determine its spin value. Spin value exist Projection values ​​along the axis Are all possible values ​​valid?

[0096] Specifically, spin value and projection value The valid range of values ​​is:

[0097] When the number of particles Even number and spin value satisfy , or, number of particles Odd number and spin value satisfy At that time, spin value efficient.

[0098] When the projection value satisfy And the difference When the value is an integer, the projection value efficient.

[0099] S2, if all are valid, then initialize the included... An initial quantum circuit with 100 qubits.

[0100] It should be noted that the initial quantum circuit is an empty quantum circuit in which no quanta have been applied.

[0101] As an example, if it is invalid, the process is terminated.

[0102] S3, when When the same direction pairing is performed, the same direction pairing CG coefficients are obtained.

[0103] S4, when Furthermore, when the target spin eigenstate is in the form of local pairing, local pairing processing and same-direction pairing processing are performed to obtain the same-direction pairing CG coefficients of several qubits and the quantum circuit corresponding to the spin single state of the remaining several qubits.

[0104] Specifically, the spin singlet is .

[0105] S5, when Furthermore, when the target spin eigenstate is in the form of global pairing, global pairing processing is performed to obtain the reverse pairing CG coefficients.

[0106] S6. Construct the CG circuit based on the same-direction paired CG coefficients or the opposite-direction paired CG coefficients.

[0107] S7. Based on the number of active qubits, the existing SCS circuit technology is used to iteratively generate the SCS circuit, and then the spin singlet quantum circuit, CG circuit and SCS circuit are synthesized in sequence to obtain the complete quantum circuit.

[0108] The quantum circuit construction method for preparing special spin eigenstates according to embodiments of the present invention supports any effective spin value and can prepare three types of special spin eigenstates: maximum spin value, non-maximum spin value with local pairing, and non-maximum spin value with global pairing. Furthermore, for the general case of non-maximum spin value, it can be compatible with both local and global pairing special spin coupling structures, thereby expanding the scope of application. It can also effectively control the quantum circuit depth and the number of quantum gates, ensuring preparation efficiency.

[0109] In some embodiments, the step of performing local pairing processing includes:

[0110] S41, the qubits are arranged in ascending order of their serial numbers.

[0111] S42, will be later Each pair of qubits is paired to generate a quantum circuit that fabricates each pair of qubits into a spin singlet.

[0112] S43, foreground Each quantum bit is paired in the same direction.

[0113] Specifically, the steps for fabricating a pair of qubits into a spin singlet quantum circuit include:

[0114] S421, apply a bit to the smaller-indexed bit in the pair of qubits. An X gate is applied to the bit with the larger sequence number.

[0115] S422, using the smaller sequence number bit as the control bit and the larger sequence number bit as the controlled bit, applies a... Control X gate.

[0116] It should be noted that, The control bit of the X gate is... The X-gate takes effect immediately.

[0117] S423 applies a Z-gate to the bit with the larger sequence number.

[0118] In this embodiment, by passing the post Each quantum bit is paired up and prepared as a spin singlet. These bits no longer participate in subsequent CG and SCS operations, reducing the number of active operation bits from N to 2s, effectively reducing circuit depth and quantum gate overhead.

[0119] In some embodiments, the step of performing same-direction pairing includes:

[0120] S31, based on spin value and projection value Calculate the difference .

[0121] S32, if Then The qubits are divided into two groups, each containing... and Each qubit is used to adjust the initial state and calculate the CG coefficients for same-direction pairing.

[0122] It should be noted that, and Indicates grouping parameters, Indicates not less than The smallest integer, Indicates not greater than The largest integer. For example, , (The qubits corresponding to the first two serial numbers) (The qubit corresponding to the next sequence number).

[0123] As an example, if If so, the process will terminate.

[0124] Specifically, the steps for calculating the same-direction pairing CG coefficients include:

[0125] Let the iteration value from Decrease to 1 for each The CG coefficient is calculated using the following formula. :

[0126] .

[0127] Among them, if Serial Number Incrementing from 0 to ;like Serial Number from Increment to .

[0128] In this embodiment, by introducing a difference It can directly map physical spin states to circuit construction parameters, and in Early termination avoids invalid iterative calculations for this scenario. Simultaneously, asymmetric grouping is employed. This method, which is compatible with both integer and half-integer spin values, and combines interval-based iterative calculation of CG coefficients, can accurately output the weight parameters required for spin coupling, reduce redundant calculations, and improve computational efficiency.

[0129] In some embodiments, the step of performing global pairing includes:

[0130] S51, based on the number of particles and projection value Calculate the difference .

[0131] S52, if Then The qubits are divided into two groups, each containing... and Each qubit is used to adjust the initial state and calculate the reverse pairing CG coefficients.

[0132] It should be noted that a set containing Each qubit is numbered 1 to... A set of qubits, containing The qubits are numbered as follows to qubits.

[0133] Specifically, adjusting the initial state involves arranging the qubits in ascending order of their sequence numbers, starting with the first... An X gate is applied to each of the qubits.

[0134] More specifically, the steps for calculating the reverse-paired CG coefficients include:

[0135] S521, let the iteration value from Decrease to 1 for each ,judge and The size relationship.

[0136] S522, if The CG coefficient is then calculated using the following formula. :

[0137] .

[0138] S523, if The CG coefficient is then calculated using the following formula. :

[0139] .

[0140] S524, if The CG coefficient is then calculated using the following formula. :

[0141] .

[0142] Among them, when At that time, serial number Incrementing from 0 to ,when At that time, serial number from Increment to ,when At that time, serial number from Increment to .

[0143] In this embodiment, the calculation of the CG coefficient in global pairing is performed by combining the L value with the grouping parameter. The magnitude relationship is divided into three intervals, which correspond to three different final states of angular momentum coupling, thus solving the cross-group coupling problem that cannot be handled by same-direction pairing.

[0144] In some embodiments, the step of constructing a CG circuit based on in-direction pairing CG coefficients or reverse pairing CG coefficients includes:

[0145] S61, calculate the rotation parameter list of parameterized quantum gates in the circuit based on the same-pairing CG coefficients or opposite-pairing CG coefficients.

[0146] Specifically, the steps for calculating the rotation parameter list of parameterized quantum gates in a circuit include:

[0147] S611, let the iteration value from Decrease to 1 for each The rotation parameters are calculated using the following formula. :

[0148] .

[0149] .

[0150] Among them, if ,make Serial Number from Decrease to 0; if ,make Serial Number from Decrease to .

[0151] S612, will remove or The remainder besides By serial number Sort in ascending order to obtain the rotation parameter list.

[0152] S62, based on difference With grouping parameters The size relationship is determined, and the CG circuit is constructed based on the rotation parameter list.

[0153] Specifically, the steps for constructing a CG circuit include:

[0154] S621, if Then, the first CG circuit is constructed to sequentially implement one-hot encoding, CG coefficient allocation, encoding cancellation, and bit shifting functions.

[0155] More specifically, when The steps for constructing the first CG circuit include:

[0156] S6211, using the second bit as the control bit and the first bit as the controlled bit, applies a... Control the X gate, then increment the sequence number of the control bit and the controlled bit, and repeat the application. Control X gate until applied indivual Control the X gate to achieve one-hot encoding.

[0157] S6212, let the iteration value from Decrease to 1 for each Apply 1 control Door and indivual control The gate enables the allocation of CG coefficients.

[0158] S6213 applies all quantum gates in reverse order to achieve one-hot encoding, thus canceling the encoding.

[0159] S6214, let the iteration value from Decrease to 1 for each Apply indivual Control SWAP door and 1 Control the X gate to achieve bit shifting.

[0160] Among them, parameters Take values ​​sequentially from the list of rotation parameters.

[0161] S622, if Then, an auxiliary qubit is added to the end of the qubit list and a switching quantum gate is applied, and then respectively for... and Two intervals are used to construct a second CG circuit to sequentially implement one-hot encoding, CG coefficient allocation, encoding cancellation, bit shifting, and auxiliary bit zeroing functions.

[0162] More specifically, when The steps for constructing the second CG circuit include:

[0163] S6221, for Interval, with the first The first bit is a control bit, the second bit... Each bit is a controlled bit, and an application is made. Control the X gate, then decrement the control bit and controlled bit number, and repeat the process. Control X gate until applied indivual Control the X gate to achieve one-hot encoding.

[0164] Let the iteration value from Decrease to For each L, a total of 1 application is performed. control Door and indivual control A gate is used to assign CG coefficients, where the parameters are... Take values ​​sequentially from the list of rotation parameters and then take their negatives.

[0165] By applying all quantum gates in reverse order during the one-hot encoding process, the encoding can be canceled.

[0166] Let the iteration value from Increment to For each Apply indivual Control SWAP door and 1 Control the X gate to achieve bit shifting.

[0167] S6222, for The interval is defined with the second bit as the control bit and the first bit as the controlled bit, and an application is made. Control the X gate, then increment the sequence number of the control bit and the controlled bit, and repeat the application. Control X gate until applied indivual Control the X gate to achieve one-hot encoding.

[0168] Let the iteration value from Decrease to 1 for each Apply 1 control Door and indivual control Doors, and for each Gate adds auxiliary bits as Control bits are used to allocate CG coefficients, where the parameters are... Take values ​​sequentially from the list of rotation parameters.

[0169] By applying all quantum gates in reverse order during the one-hot encoding process, the encoding can be canceled.

[0170] Let the iteration value from Decrease to 1 for each Apply indivual Control SWAP door and 1 Control the X-gate and monitor each Control SWAP door and 1 Adding auxiliary bits to the X-gate as Control bits are used to shift bits.

[0171] Set all auxiliary bits to zero.

[0172] S623, construct the CG circuit based on the first CG circuit or the second CG circuit.

[0173] As an example, if The specific steps for constructing the circuit are as follows:

[0174] I. To achieve the one-hot encoding function, a total of [number] applications were applied. indivual The X-gate is used to control the bit; specifically, a control bit is applied using the second bit as the control bit and the first bit as the controlled bit. Control the X gate; then increment the sequence number of the control bit and the controlled bit, and repeat the application. Control X gate.

[0175] II. To implement the CG coefficient allocation function, let the iterative value from Decrease to 1 for each One was applied in total. control Door and indivual (From left to right, corresponding to the descending order of the qubit numbers, the same below) Control Gate, Parameter Take values ​​sequentially from the rotation parameter list; specifically, start with the first... The first bit is a control bit, the second bit... Each bit is a controlled bit, and an application is made. control Door; then the first Each bit is a control bit. , with the first Each bit is a control bit. , with the first Each bit is a controlled bit. Apply a control Door; then, maintain control position. Unchanged, incrementing control bit The sequence number, incremented by the controlled bit. The sequence number is applied repeatedly. control Door.

[0176] III. In order to achieve the cancellation coding function, all quantum gates in step I are applied in reverse order.

[0177] IV. To implement the bit shifting function, let the iteration value... from Decrease to 1 for each A total of indivual Control SWAP door and 1 Control X gate; specifically, with the first The first bit is a control bit, the second bit... Each bit is a controlled bit, and an application is made. Control the SWAP gate; then, keeping the control bit unchanged, increment the sequence number of all controlled bits and repeat the application. Control the SWAP gate; then, with the first The first bit is a control bit, the second bit... Each bit is a controlled bit, and an application is made. Control X gate.

[0178] like , respectively targeting and The specific steps for constructing the circuit across two intervals are as follows:

[0179] I. Targeting In order to achieve one-hot encoding, a total of intervals are applied. indivual Control X gate; specifically, first with the first The first bit is a control bit, the second bit... Each bit is a controlled bit, and an application is made. Control the X gate, then decrement the control bit and controlled bit number, and repeat the process. Control X gate.

[0180] II. Targeting In order to implement the CG coefficient allocation function, let the interval, the iteration value from Decrease to For each One was applied in total. control Door and indivual control Gate, Parameter Take values ​​sequentially from the rotation parameter list and then negate them; specifically, start with the first... The first bit is a control bit, the second bit... Each bit is a controlled bit, and an application is made. control Door; then the first Each bit is a control bit. , with the first Each bit is a control bit. , with the first Each bit is a controlled bit. Apply a control Door; then, maintain control position. Decrease control bit The sequence number, decrementing the controlled bit The sequence number is applied repeatedly. control Door.

[0181] III. Targeting In order to achieve the cancellation coding function, all quantum gates in step I are applied in reverse order within the interval.

[0182] IV. Targeting In order to achieve the bit shift function, the interval is set to allow the iteration value to... from ( (Indicates the larger of the two values, the same below) increasing to... For each A total of indivual Control SWAP door and 1 Control X gate; specifically, first with the first The first bit and auxiliary bits are control bits, the 1st bit... Each bit is a controlled bit, and an application is made. Control the SWAP gate; then, keeping the control bit unchanged, decrement the sequence number of all controlled bits and repeat the application. Control the SWAP gate; then, with the first The first bit and auxiliary bits are control bits, the second... Each bit is a controlled bit, and an application is made. Control X gate.

[0183] V. Targeting In order to achieve one-hot encoding, the interval is modeled after... In the case of k=n, substitute the value of k.

[0184] VI. Targeting In order to implement the CG coefficient allocation function, the interval is modeled after... Substitute the situation At the same time, each quantum gate adds an auxiliary bit as Control bit.

[0185] VII. Targeting In order to achieve the function of canceling encoding, the interval is similar to... Substitute the situation .

[0186] VIII. Targeting In order to achieve the bit shifting function, the interval is modeled after... Substitute the situation At the same time, each quantum gate adds an auxiliary bit as Control bit.

[0187] IX. To achieve the auxiliary bit zeroing function, a total of 1 bit is applied. Control X-gate and indivual Control X gate, and then determine whether it meets the requirements. Apply 1 Control X gate; specifically, first with the first Each bit is a control bit. , No. Each bit is a control bit. The auxiliary bit is a controlled bit, and an application is made. Control X gate; then maintain control position Unchanged, and new additions As a control bit Increment control bit The sequence number, keeping the auxiliary bit as a controlled bit, applies a Control the X gate; then decrement the control bit. and The sequence number, incrementing control bit The sequence number is applied repeatedly using auxiliary bits as controlled bits. indivual Control X gate; finally, if , with the first and the One bit is the control bit, and the auxiliary bits are the controlled bits. An application is made... Control X gate.

[0188] In addition, the present invention also provides a quantum circuit construction system for preparing special spin eigenstates, such as... Figure 2 As shown, the quantum circuit construction system for preparing special spin eigenstates includes: a preprocessing module 10, a local pairing module 20, a same-direction pairing module 30, a global pairing module 40, a CG circuit construction module 50, and an SCS circuit construction module 60.

[0189] Preprocessing module 10 is used to determine the spin value of the target spin eigenstate based on the parity of the particle number N. Spin value exist Projection values ​​along the axis If all possible values ​​are valid, then initialize the value containing... An initial quantum circuit of 1 qubits, when When, the same-direction pairing module 30 is called, when And when the target spin eigenstate is in a locally paired form, the local pairing module 20 and the same-direction pairing module 30 are invoked. When the target spin eigenstate is in the form of global pairing, the global pairing module 40 is called.

[0190] The local pairing module 20 is connected to the preprocessing module 10 and the same-direction pairing module 30. It is used to perform local pairing processing on a number of qubits to obtain the corresponding spin single-state quantum circuit, and send the remaining number of qubits to the same-direction pairing module.

[0191] The same-direction pairing module 30 is connected to the preprocessing module 10 to perform same-direction pairing processing and obtain the same-direction pairing CG coefficients.

[0192] The global pairing module 40 is connected to the preprocessing module 10 and is used to perform global pairing processing to obtain the reverse pairing CG coefficients.

[0193] The CG circuit construction module 50 is connected to the same-direction pairing module 30 and the global pairing module 40, and is used to construct the CG circuit according to the same-direction pairing CG coefficient or the reverse pairing CG coefficient.

[0194] The SCS circuit construction module 60 is connected to the CG circuit construction module 50. It is used to call existing SCS circuit technology according to the number of qubits involved, iteratively generate SCS circuits, and sequentially synthesize spin singlet quantum circuits, CG circuits and SCS circuits to obtain a complete quantum circuit.

[0195] For other specific embodiments of the quantum circuit construction system for preparing special spin eigenstates in the embodiments of the present invention, please refer to the specific embodiments of the quantum circuit construction method for preparing special spin eigenstates in the above embodiments of the present invention.

[0196] Next, the method and system for constructing quantum circuits with special spin eigenstates according to the present invention will be described through two specific embodiments:

[0197] Example 1: Assuming the number of particles The goal is to prepare spin eigenstates with non-maximum spin values ​​and local pairing. The corresponding quantum state is:

[0198] .

[0199] The quantum circuit for preparing the target state is constructed using the system and method proposed in this invention, specifically including the following steps:

[0200] ①: Preprocessing module 10 first determines the spin value based on the parity of the particle number N. and in Projection values ​​along the axis Whether the value is valid depends on the number of particles. For odd numbers, the following conditions must be met: , ,and If it is an integer, then obviously, and The value is valid; initialization includes A quantum circuit with 100 qubits; due to And the target is a local pairing form, so proceed to step ②.

[0201] ②: Local pairing module 20 will pair the items with larger serial numbers. The fourth and fifth qubits are paired up to generate a single-state quantum circuit using the fourth and fifth qubits. Then, the qubits with smaller indices are... Step ③ is performed on each qubit.

[0202] In step ②, the specific steps for preparing the 4th and 5th bits into a single-state quantum circuit are as follows: An H-gate is applied to the 4th bit, and an X-gate is applied to the 5th bit. Using the 4th bit as the control bit and the 5th bit as the controlled bit, a gate is applied... The X gate is controlled, and finally a Z gate is applied on the 5th bit.

[0203] ③: Same-direction pairing module 30 records the difference ,because This module will be used for The three qubits (i.e., the 1st, 2nd, and 3rd qubits) are divided into two groups, each containing... (The 1st and 2nd) and For the (3rd) qubit, adjust the initial state, calculate the CG coefficients for same-direction pairing, and jump to step ⑤.

[0204] In step ③, the specific operation for adjusting the initial state is to apply an X gate to the first and second qubits respectively.

[0205] In step ③, the specific operation for calculating the CG coefficients of the same-direction pairing is as follows: Let the iteration value L start from... Decrease to 1 for each Calculate the CG coefficient :

[0206] .

[0207] Among them, if Serial Number Incrementing from 0 to ;like Serial Number from Increment to ;get:

[0208] .

[0209] .

[0210] ④: Global pairing module 40 is not required, skip it.

[0211] ⑤: List of rotation parameters for parameterized quantum gates in the computational circuit of CG circuit construction module 50, due to... Add an auxiliary qubit to the end of the qubit list. And apply a switching quantum gate, targeting respectively and In the two intervals, the circuit is constructed to sequentially implement one-hot encoding, CG coefficient allocation, encoding cancellation, and bit shifting functions. Finally, the circuit is constructed to implement the auxiliary bit zeroing function, and step ⑥ is executed.

[0212] In step ⑤, the specific operation for calculating the rotation parameter list is as follows: Let the iteration value from Decrease to 1 for each Calculate the rotation parameters based on the following relationships. :

[0213] .

[0214] .

[0215] Among them, if ,make Serial Number Decrease from L-1 to 0; if ,make Serial Number from Decrease to ; will be removed or All except By serial number Sort in ascending order to obtain the rotation parameter list:

[0216] The rotation parameter list is [1.23].

[0217] The rotation parameter list is [1.91].

[0218] In step ⑤, the specific operation of applying a switching quantum gate is as follows: using the first... Each bit is a control bit, with auxiliary bits. For the controlled bit, apply a Control X gate.

[0219] In step ⑤, respectively targeting and The specific steps for constructing the circuit across two intervals are as follows:

[0220] I. Targeting In order to achieve one-hot encoding, a total of intervals are applied. indivual The X-gate; specifically, using the second bit as the control bit and the third bit as the controlled bit, applies a... Control X gate.

[0221] II. Targeting In order to implement the CG coefficient allocation function, let the interval, the iteration value A total of indivual control Gate, Parameter Take a value from the rotation parameter list [1.23] and negate it. Specifically, take the value from the first... The first bit is a control bit, the second bit... Each bit is a controlled bit, and an application is made. control Door.

[0222] III. Targeting In order to achieve the cancellation coding function, all quantum gates in step I are applied in reverse order within the interval.

[0223] IV. Targeting In order to achieve the bit shift function, the interval is set to allow the iteration value to... A total of indivual Control SWAP door and 1 Control X gate; specifically, with the first One bit and auxiliary bits For control bits, the first Each bit is a controlled bit, and an application is made. Control X gate.

[0224] V. Targeting In order to achieve one-hot encoding, the interval is modeled after... Substitute the situation Specifically, a total of indivual The X-gate is controlled, and the circuit is empty.

[0225] VI. Targeting In order to implement the CG coefficient allocation function, the interval is modeled after... Substitute the situation At the same time, each quantum gate adds an auxiliary bit. As Control bit, set iteration value A total of indivual control Door and indivual Gate, Parameter Take values ​​from the rotation parameter list [1.91]; specifically, take the values ​​from the first... One bit and auxiliary bits For control bits, the first Each bit is a controlled bit, and one bit is applied. control Door.

[0226] VII. Targeting In order to achieve the function of canceling encoding, the interval is similar to... Substitute the situation Specifically, all quantum gates in step V are applied in reverse order, and the circuit is empty.

[0227] VIII. Targeting In order to achieve the bit shifting function, the interval is modeled after... Substitute the situation At the same time, each quantum gate adds an auxiliary bit. As Control bit; set iteration value A total of indivual Control SWAP door and 1 Control X gate; specifically, with the first One bit and auxiliary bits For control bits, the first Each bit is a controlled bit, and an application is made. Control X gate.

[0228] IX. To achieve the auxiliary bit zeroing function, a total of 1 bit is applied. Control X-gate and indivual Control X door, and then according to Apply 1 Control X gate; specifically, with the first The and the first Each bit is a control bit, with auxiliary bits. For the controlled bit, apply a Control X gate; then, due to , with the first and the Each bit is a control bit, with auxiliary bits. For the controlled bit, apply a Control X gate.

[0229] ⑥: The SCS circuit construction module 60, based on the number of qubits involved in this module, iteratively generates an SCS circuit using SCS circuit construction technology. Specifically, The SCS circuit on the module is empty. The SCS circuit on the module is configured such that the 3rd bit is the control bit and the 2nd bit is the controlled bit, applying a... X-gate; using the second bit as the control bit and the third bit as the controlled bit, apply a... control Gate; using the 3rd bit as the control bit and the 2nd bit as the controlled bit, apply a... Control X gate.

[0230] Finally, the constructed quantum circuit, see [link to documentation]. Figure 3 .in, Figure 3 The last qubit These are auxiliary bits and are not included in the target spin eigenstate. Running this circuit can prepare the target spin eigenstate on the first N=5 qubits.

[0231] Example 2: Assuming the number of particles The goal is to prepare spin states with non-maximum spin values ​​and global pairing. The corresponding quantum state is:

[0232]

[0233] The quantum circuit for preparing the target state is constructed using the system and method proposed in this invention, specifically including the following steps:

[0234] ①: Preprocessing module 10 first determines the spin value s and its projection value along the z-axis based on the parity of the particle number N. Whether the value is valid depends on the number of particles. For even numbers, the following conditions must be met: , ,and If it is an integer, then obviously, and The value is valid; initialization includes A quantum circuit with 100 qubits; due to Since the target is a global pairing, proceed to step ④.

[0235] ②: No need to execute local pairing module 20, skip it.

[0236] ③: No need to execute the same-direction pairing module 30, skip it.

[0237] ④: Global pairing module records 40 differences ,Will The qubits are divided into two groups, each containing... (The 1st, 2nd, 3rd, and 4th) and For the 5th and 6th qubits, adjust the initial state, calculate the CG coefficients for reverse pairing, and execute step ⑤.

[0238] In step ④, the specific operation for adjusting the initial state is as follows: in the smaller sequence number... An X gate is applied to each of the qubits.

[0239] In step ④, the specific operation for calculating the CG coefficients of the reverse pairing is as follows: Let the iteration value from Decrease to 1, and for each L, calculate the CG coefficient. ,like ,

[0240] .

[0241] Among them, serial number Incrementing from 0 to .

[0242] like ,

[0243] .

[0244] Among them, serial number from Increment to .

[0245] like ,

[0246] .

[0247] Among them, serial number from Increment to .

[0248] get:

[0249] .

[0250] .

[0251] .

[0252] ⑤: List of rotation parameters for parameterized quantum gates in the computational circuit of CG circuit construction module 50, due to... Add an auxiliary qubit to the end of the qubit list. And apply a switching quantum gate, targeting respectively and In the two intervals, the circuit is constructed to sequentially implement one-hot encoding, CG coefficient allocation, encoding cancellation, and bit shifting functions. Finally, the circuit is constructed to implement the auxiliary bit zeroing function, and step ⑥ is executed.

[0253] In step ⑤, the specific operation for calculating the rotation parameter list is as follows: Let the iteration value from Decrease to 1 for each Calculate the rotation parameters based on the following relationships. :

[0254] .

[0255] .

[0256] Among them, if ,make Serial Number from Decrease to 0; if ,make Serial Number Decrease from min(L,m)-1 to ; will be removed or The remainder besides By serial number Sort in ascending order to obtain the rotation parameter list:

[0257] The rotation parameter list is [-1.98, -1.43];

[0258] The rotation parameter list is as follows ;

[0259] The rotation parameter list is [-1.23].

[0260] In step ⑤, the specific operation of applying a switching quantum gate is as follows: using the first... Each bit is a control bit, with auxiliary bits. For the controlled bit, apply a Control X gate.

[0261] In step ⑤, because , respectively targeting and The specific steps for constructing the circuit across two intervals are as follows:

[0262] I. Targeting In order to achieve one-hot encoding, a total of intervals are applied. indivual Control X gate; specifically, first with the first The first bit is a control bit, the second bit... Each bit is a controlled bit, and an application is made. Control X gate; then, using the 4th bit as the control bit and the 5th bit as the controlled bit, apply a... Control X gate; then, using the 3rd bit as the control bit and the 4th bit as the controlled bit, apply a... Control X gate.

[0263] II. Targeting In order to implement the CG coefficient allocation function, let the interval, the iteration value One was applied in total. control Door and indivual control Gate, Parameter Take values ​​sequentially from the rotation parameter list [-1.98, -1.43] and then negate them. Specifically, first take the values ​​from the first... The first bit is a control bit, the second bit... Each bit is a controlled bit, and an application is made. control Door; then the first The first bit is a control bit, with the second bit being the control bit. Each bit is a controlled bit, and an application is made. control Door.

[0264] III. Targeting In order to achieve the cancellation coding function, all quantum gates in step I are applied in reverse order within the interval.

[0265] IV. Targeting In order to achieve the bit shift function, the interval is set to allow the iteration value to... from Increment to .

[0266] for A total of indivual Control SWAP door and one Control X gate; specifically, first with the first One bit and auxiliary bits For control bits, starting with the first... The and the first Each bit is a controlled bit, and an application is made. Control the SWAP gate; then, with the first One bit and auxiliary bits For control bits, starting with the first... Each bit is a controlled bit, and an application is made. Control X gate.

[0267] for A total of indivual Control SWAP door and one Control X gate; specifically, first with the first One bit and auxiliary bits For control bits, starting with the first... Each bit is a controlled bit, and an application is made. Control the SWAP gate; then use the second bit and auxiliary bits. The first two bits are control bits, and the fourth and fifth bits are controlled bits, applying a... Control the SWAP gate; then, with the first One bit and auxiliary bits For control bits, starting with the first... Each bit is a controlled bit, and an application is made. Control X gate.

[0268] V. Targeting In order to achieve one-hot encoding, the interval is modeled after... Substitute the situation A total of indivual The X-gate; specifically, using the second bit as the control bit and the first bit as the controlled bit, applies a... Control X gate.

[0269] VI. Targeting In order to implement the CG coefficient allocation function, the interval is modeled after... Substitute the situation At the same time, each quantum gate adds an auxiliary bit. As Control bit; specifically, set the iteration value from Decrease to 1.

[0270] for One was applied in total. control Door and indivual control Gate, Parameter From the list of rotation parameters The values ​​are taken sequentially; specifically, the first value is taken as the first... One bit and auxiliary bits For control bits, starting with the first... Each bit is a controlled bit, and an application is made. control Door; then the first One bit and auxiliary bits For control bits, starting with the first... Each bit is a controlled bit, and an application is made. control Door.

[0271] for One was applied in total. control Door and indivual control Gate, Parameter Take a value from the rotation parameter list [-1.23]; specifically, take the value from the first... One bit and auxiliary bits For control bits, starting with the first... Each bit is a controlled bit, and an application is made. control Door.

[0272] VII. Targeting In order to achieve the function of canceling encoding, the interval is similar to... Substitute the situation Specifically, all quantum gates in step V are applied in reverse order.

[0273] VIII. Targeting In order to achieve the bit shifting function, the interval is modeled after... Substitute the situation At the same time, each quantum gate adds an auxiliary bit. As The control bit, specifically, sets the iteration value... from Decrease to 1.

[0274] for A total of indivual Control SWAP door and one Control X gate; specifically, with the first One bit and auxiliary bits For control bits, starting with the first... Each bit is a controlled bit, and an application is made. Control X gate.

[0275] for A total of indivual Control SWAP door and one Control X gate; specifically, with the first One bit and auxiliary bits For control bits, starting with the first... Each bit is a controlled bit, and an application is made. Control the SWAP gate; then, with the first One bit and auxiliary bits For control bits, starting with the first... Each bit is a controlled bit, and an application is made. Control X gate.

[0276] IX. To achieve the auxiliary bit zeroing function, a total of 1 bit is applied. Control X-gate and indivual Control X door, and then according to Apply 1 Control X gate; specifically, first with the first The and the first Each bit is a control bit, with auxiliary bits. For the controlled bit, apply a Control the X gate; then, use the 1st, 2nd, and 4th bits as control bits, and auxiliary bits... For the controlled bit, apply a Control X gate; finally, due to , with the first and the Each bit is a control bit, with auxiliary bits. For the controlled bit, apply a Control X gate.

[0277] ⑥: SCS circuit construction module 60 generates an SCS circuit iteratively based on the number of qubits operated by this module and using SCS circuit construction technology. Specifically, it obtains 21 quantum gates after line breaks in the circuit diagram.

[0278] Finally, the constructed quantum circuit, see [link to documentation]. Figure 4 .in, Figure 4 The last qubit These are auxiliary bits and are not included in the target spin eigenstate. Running this circuit will enable... The target spin eigenstate was prepared on each qubit. Additionally, Figure 4 The dashed line in the middle indicates a line break.

[0279] Although exemplary embodiments have been described herein with reference to the accompanying drawings, it should be understood that the above exemplary embodiments are merely illustrative and are not intended to limit the scope of this application. Various changes and modifications can be made therein by those skilled in the art without departing from the scope and spirit of this application. All such changes and modifications are intended to be included within the scope of this application as claimed in the appended claims.

[0280] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0281] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed.

[0282] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of this application may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.

[0283] Similarly, it should be understood that, in order to streamline this application and aid in understanding one or more of the various inventive aspects, features of this application may sometimes be grouped together in a single embodiment, figure, or description thereof in the description of exemplary embodiments of this application. However, this approach should not be construed as reflecting an intention that the claimed application requires more features than are expressly recited in each claim. Rather, as reflected in the corresponding claims, its inventive point lies in solving the corresponding technical problem with features fewer than all features of a single disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into that detailed description, wherein each claim itself is a separate embodiment of this application.

[0284] Those skilled in the art will understand that, apart from the mutual exclusion of features, all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or elements of any method or apparatus so disclosed may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.

[0285] Furthermore, those skilled in the art will understand that although some embodiments described herein include certain features included in other embodiments but not others, combinations of features from different embodiments are intended to be within the scope of this application and form different embodiments. For example, in the claims, any one of the claimed embodiments can be used in any combination.

[0286] The various component embodiments of this application can be implemented in hardware, or as software modules running on one or more processors, or a combination thereof. Those skilled in the art will understand that microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some modules according to the embodiments of this application. This application can also be implemented as an apparatus program (e.g., a computer program and computer program product) for performing part or all of the methods described herein. Such an implementation of this application can be stored on a computer-readable medium, or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.

[0287] It should be noted that the above embodiments are illustrative of this application and not restrictive, and that those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. This application can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names.

[0288] The above description is merely a specific embodiment or illustration of the embodiments of this application. The scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. The scope of protection of this application shall be determined by the scope of the claims.

Claims

1. A method for constructing quantum circuits with special spin eigenstates, characterized in that, The method includes: Based on the number of particles The parity of the target spin eigenstate is used to determine its spin value. The spin value exist Projection values ​​along the axis Are all possible values ​​valid? If all are valid, then initialize the included... An initial quantum circuit with 10 qubits; when When the same direction pairing is performed, the same direction pairing CG coefficients are obtained; when Furthermore, when the target spin eigenstate is in the form of local pairing, local pairing processing and same-direction pairing processing are performed to obtain the same-direction pairing CG coefficients of several qubits and the quantum circuit of the spin single state corresponding to the remaining several qubits. when Furthermore, when the target spin eigenstate is in a globally paired form, global pairing processing is performed to obtain the reverse pairing CG coefficients; Construct a CG circuit based on the same-direction pairing CG coefficients or the opposite-direction pairing CG coefficients; Based on the number of active qubits, existing SCS circuit technology is used to iteratively generate an SCS circuit, and the spin singlet quantum circuit, the CG circuit, and the SCS circuit are synthesized sequentially to obtain a complete quantum circuit.

2. The method for constructing quantum circuits with special spin eigenstates according to claim 1, characterized in that, spin value and projection value The valid range of values ​​is: When the number of particles Even number and spin value satisfy , or, number of particles Odd number and spin value satisfy At that time, spin value efficient; When the projection value satisfy And the difference When the value is an integer, the projection value efficient.

3. The method for constructing quantum circuits with special spin eigenstates according to claim 1, characterized in that, The step of performing local pairing processing includes: The qubits are arranged in ascending order of their serial numbers; After Each pair of qubits is paired up to generate a quantum circuit that fabricates each pair of qubits into a spin singlet. Forward Each quantum bit is paired in the same direction.

4. The method for constructing quantum circuits with special spin eigenstates according to claim 3, characterized in that, The steps for fabricating a pair of qubits into a spin single-state quantum circuit include: Apply a qubit to the smaller qubit in the pair of qubits An X gate is applied to the bit with the largest sequence number; Using the smaller sequence number bit as the control bit and the larger sequence number bit as the controlled bit, apply a... Control X-gate; Apply a Z-gate to the bit with the larger sequence number.

5. The method for constructing quantum circuits with special spin eigenstates according to claim 1, characterized in that, The spin singlet state is .

6. The method for constructing quantum circuits with special spin eigenstates according to claim 1, characterized in that, The step of performing the same-direction pairing process includes: According to the spin value and the projection value Calculate the difference ; like Then The qubits are divided into two groups, each containing... and Each qubit is used to adjust the initial state and calculate the CG coefficients for same-direction pairing.

7. The method for constructing quantum circuits with special spin eigenstates according to claim 6, characterized in that, The step of calculating the same-direction pairing CG coefficients includes: Let the iteration value from Decrease to 1 for each The CG coefficient is calculated using the following formula. : ; Among them, if Serial Number Incrementing from 0 to ;like Serial Number from Increment to .

8. The method for constructing quantum circuits with special spin eigenstates according to claim 1, characterized in that, The steps for performing global pairing include: According to the number of particles and the projection value Calculate the difference ; like Then The qubits are divided into two groups, each containing... and Each qubit is used to adjust the initial state and calculate the reverse pairing CG coefficients.

9. The method for constructing quantum circuits with special spin eigenstates according to claim 6 or 8, characterized in that, The adjustment of the initial state specifically involves: arranging the qubits in ascending order by their sequence number, with the first... An X gate is applied to each of the qubits.

10. The method for constructing quantum circuits with special spin eigenstates according to claim 8, characterized in that, The step of calculating the reverse pairing CG coefficients includes: Let the iteration value from Decrease to 1 for each ,judge and Size relationship; like The CG coefficient is then calculated using the following formula. : ; like The CG coefficient is then calculated using the following formula. : ; like The CG coefficient is then calculated using the following formula. : ; Among them, when At that time, serial number Incrementing from 0 to ,when At that time, serial number from Increment to ,when At that time, serial number from Increment to .

11. The method for constructing quantum circuits with special spin eigenstates according to claim 7 or 10, characterized in that, The step of constructing the CG circuit based on the same-direction paired CG coefficients or the opposite-direction paired CG coefficients includes: Calculate the rotation parameter list of the parameterized quantum gates in the circuit based on the same-direction pairing CG coefficients or the opposite-direction pairing CG coefficients; Based on difference With grouping parameters The size relationship is determined, and the CG circuit is constructed based on the rotation parameter list.

12. The method for constructing quantum circuits with special spin eigenstates according to claim 11, characterized in that, The steps for listing the rotation parameters of the parameterized quantum gates in the computational circuit specifically include: Let the iteration value from Decreasing down to 1, for each L, the rotation parameters are calculated using the following formula. : ; ; Among them, if ,make Serial Number from Decrease to 0; if ,make Serial Number from Decrease to ; Remove or The remainder besides By serial number Arrange the parameters in ascending order to obtain the rotation parameter list.

13. The method for constructing quantum circuits with special spin eigenstates according to claim 11, characterized in that, The steps for constructing the CG circuit include: like Then, the first CG circuit is constructed to sequentially implement the functions of one-hot encoding, CG coefficient allocation, encoding cancellation, and bit shifting; like Then, an auxiliary qubit is added to the end of the qubit list and a switching quantum gate is applied, and then respectively for... and Two intervals are used to construct a second CG circuit to sequentially implement one-hot encoding, CG coefficient allocation, encoding cancellation, bit shifting, and auxiliary bit zeroing functions; The CG circuit is constructed based on either the first CG circuit or the second CG circuit.

14. The method for constructing quantum circuits with special spin eigenstates according to claim 13, characterized in that, when The step of constructing the first CG circuit includes: Using the second bit as the control bit and the first bit as the controlled bit, apply a... Control the X gate, then increment the sequence number of the control bit and the controlled bit, and repeat the application. Control X gate until applied indivual Control the X gate to achieve the one-hot encoding; Let the iteration value from Decrease to 1 for each Apply 1 control Door and indivual control The gate enables the allocation of the CG coefficients; By applying all quantum gates in the one-hot encoding process in reverse order, the encoding cancellation is achieved. Let the iteration value from Decrease to 1 for each Apply indivual Control SWAP door and 1 Control the X gate to achieve the bit shift; Among them, parameters Values ​​are taken sequentially from the list of rotation parameters.

15. The method for constructing quantum circuits with special spin eigenstates according to claim 13, characterized in that, when The step of constructing the second CG circuit includes: for Interval, with the first The first bit is a control bit, the second bit... Each bit is a controlled bit, and an application is made. Control the X gate, then decrement the control bit and controlled bit number, and repeat the process. Control X gate until applied indivual Control the X gate to achieve the one-hot encoding; Let the iteration value from Decrease to For each One was applied in total. control Door and indivual control The gate implements the CG coefficient allocation, wherein the parameters are... Take values ​​sequentially from the rotation parameter list and then take their negatives; By applying all quantum gates in the one-hot encoding process in reverse order, the encoding cancellation is achieved. Let the iteration value from Increment to For each Apply indivual Control SWAP door and 1 Control the X gate to achieve the bit shift; for The interval is defined with the second bit as the control bit and the first bit as the controlled bit, and an application is made. Control the X gate, then increment the sequence number of the control bit and the controlled bit, and repeat the application. Control X gate until applied indivual Control the X gate to achieve the one-hot encoding; Let the iteration value from Decrease to 1 for each Apply 1 control Door and indivual control Doors, and for each Gate adds auxiliary bits as Control bits are used to allocate the CG coefficients, wherein the parameters are... Take values ​​sequentially from the list of rotation parameters; By applying all quantum gates in the one-hot encoding process in reverse order, the encoding cancellation is achieved. Let the iteration value from Decrease to 1 for each Apply indivual Control SWAP door and 1 Control the X-gate and monitor each Control SWAP door and 1 Adding auxiliary bits to the X-gate as Control bits are used to achieve the bit shifting; Set all auxiliary bits to zero.

16. A quantum circuit construction system for preparing special spin eigenstates, characterized in that, The system includes: a preprocessing module, a local pairing module, a same-direction pairing module, a global pairing module, a CG circuit construction module, and an SCS circuit construction module; The preprocessing module is used to determine the spin value of the target spin eigenstate based on the parity of the particle number N. The spin value exist Projection values ​​along the axis If all possible values ​​are valid, then initialize the value containing... An initial quantum circuit of 1 qubits, when When, the same-direction pairing module is invoked, when And when the target spin eigenstate is in a locally paired form, the locally paired module and the same-direction paired module are invoked. Furthermore, when the target spin eigenstate is in a globally paired form, the global pairing module is invoked; The local pairing module is connected to the preprocessing module and the same-direction pairing module. It is used to perform local pairing processing on a number of qubits to obtain the corresponding spin single-state quantum circuit, and send the remaining number of qubits to the same-direction pairing module. The same-direction pairing module is connected to the preprocessing module to perform same-direction pairing processing to obtain same-direction pairing CG coefficients. The global pairing module is connected to the preprocessing module and is used to perform global pairing processing to obtain reverse pairing CG coefficients. The CG circuit construction module is connected to the same-direction pairing module and the global pairing module, and is used to construct a CG circuit according to the same-direction pairing CG coefficient or the opposite-direction pairing CG coefficient; The SCS circuit construction module is connected to the CG circuit construction module. It is used to call existing SCS circuit technology according to the number of qubits involved, iteratively generate the SCS circuit, and sequentially synthesize the spin singlet quantum circuit, the CG circuit and the SCS circuit to obtain a complete quantum circuit.