A method, system, device and medium for preparing arbitrary quantum states
By determining the basic quantum states, combining and transforming methods, the problem of preparing any quantum state in quantum computing is solved, and the parallelism advantage of quantum computing is realized.
Patent Information
- Application Number
- CN202310231233.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-08
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2043-03-08
AI Technical Summary
The prior art is difficult to effectively prepare any quantum state, which limits the parallelism advantage of quantum computing.
By determining the basic quantum state based on qubits, combining it in a predetermined combination method to obtain a combined quantum state, and converting the combined quantum state into a target quantum state through a predetermined calculation method.
The arbitrary preparation of quantum states in quantum computing is realized, which fully reflects the parallelism advantages of quantum computing.
Smart Images

Figure CN116187459B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of quantum computing, and specifically relates to a method, system, equipment and medium for preparing an arbitrary quantum state. Background Art
[0002] As Moore's Law has reached its limit in recent years, the improvement of computer computing power has slowed down. People are in urgent need of seeking new computing methods to ensure the continuous improvement of computer computing power. Quantum computing is one of the most popular non-von computing architectures. Unlike traditional computing, where a single bit can only be in one of the states 0 or 1, a quantum bit can be in a superposition state consisting of a |0> state, a |1> state, or a linear combination of |0> and |1> (here the |> symbol is Dirac, indicating that this state is a quantum state). When a quantum bit is in a superposition state, all operations performed on the quantum bit can be regarded as simultaneous operations on the ground state that constitutes the superposition state. Therefore, quantum computers can provide natural parallelism. However, due to the difference in the computing principles of quantum computing and traditional computing, it is necessary to design unique quantum algorithms for quantum computers to reflect the parallel advantages of quantum computing. The preparation of quantum states is crucial.
[0003] Therefore, a preparation method that can flexibly set the quantum state is urgently needed. Summary of the invention
[0004] In order to solve the above problems, the present invention proposes a method for preparing an arbitrary quantum state, comprising:
[0005] Determining, based on the quantum bit, a basic quantum state that can be achieved by the quantum bit;
[0006] Combining the basic quantum states in a predetermined combination manner to obtain a combined quantum state;
[0007] The combined quantum state is converted into a target quantum state according to a predetermined calculation method based on the bit state of the basic quantum state in the combined quantum state.
[0008] In some embodiments of the present invention, combining the basic quantum states in a predetermined combination manner to obtain a combined quantum state includes:
[0009] The number of grouping elements of the basic quantum state is determined based on the number of target quantum states, and a predetermined number of basic quantum states are added in a front-to-back order based on an adjacent relationship to obtain a combined quantum state.
[0010] In some embodiments of the present invention, converting the combined quantum state into a target quantum state according to a predetermined calculation method based on the bit state of the basic quantum state in the combined quantum state includes:
[0011] The quantum bits with the same value in the combined quantum state are used as control bits, and the quantum bits with different values in the combined quantum state are used as controlled bits.
[0012] In some embodiments of the present invention, converting the combined quantum state into a target quantum state according to a predetermined calculation method based on the bit state of the basic quantum state in the combined quantum state further includes:
[0013] Based on the coefficient of the corresponding basic quantum state in the combined quantum state, a rotation angle that causes the coefficient of the basic quantum state of the controlled bit to be not a predetermined value to be a predetermined value is calculated.
[0014] In some embodiments of the present invention, converting the combined quantum state into a target quantum state according to a predetermined calculation method based on the bit state of the basic quantum state in the combined quantum state further includes:
[0015] The coefficient of the basic quantum state in which the controlled bit is not a predetermined value is set to a predetermined value through the rotation angle to obtain a temporary target quantum state.
[0016] In some embodiments of the invention, the method further comprises:
[0017] It is determined whether the temporary target quantum state is equal to the target quantum state, and in response to the temporary target quantum state being equal to the target quantum state, the temporary target quantum state is used as the target quantum state.
[0018] In some embodiments of the invention, the method further comprises:
[0019] In response to the temporary target quantum state not satisfying the target quantum state, the temporary target quantum state is used as a new basic quantum state to form a new combined quantum state in a predetermined combination manner, and the new combined quantum state is converted into a new temporary target quantum state in a predetermined calculation manner based on the bit state of the new basic quantum state;
[0020] The above process is repeated until the temporary target quantum state is equal to the target quantum state.
[0021] Another aspect of the present invention further provides a system for preparing an arbitrary quantum state, comprising:
[0022] A quantum state acquisition module, the quantum state acquisition module is configured to determine, based on the quantum bit, a basic quantum state that the quantum bit can achieve;
[0023] A quantum state combination module, wherein the quantum state combination module is configured to combine the basic quantum states in a predetermined combination manner to obtain a combined quantum state;
[0024] A quantum state conversion module is configured to convert the combined quantum state into a target quantum state according to a predetermined calculation method based on the bit state of the basic quantum state in the combined quantum state.
[0025] Another aspect of the present invention further provides a computer device, comprising:
[0026] at least one processor; and
[0027] A memory, wherein the memory stores computer instructions that can be executed on the processor, and when the instructions are executed by the processor, the steps of the method described in any one of the above-mentioned embodiments are implemented.
[0028] Another aspect of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any one of the methods described in the above-mentioned embodiments are implemented.
[0029] Through the method for preparing an arbitrary quantum state proposed by the present invention, an arbitrary quantum state can be realized in the algorithm, thereby realizing the parallel advantage of quantum computing. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0031] Figure 1 A flow chart of an embodiment of a method for preparing an arbitrary quantum state provided by an embodiment of the present invention;
[0032] Figure 2 A schematic diagram of the structure of a system for preparing an arbitrary quantum state provided by an embodiment of the present invention;
[0033] Figure 3 A schematic diagram of the structure of a computer device provided by an embodiment of the present invention;
[0034] Figure 4 A schematic diagram of the structure of a computer-readable storage medium provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0035] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the embodiments of the present invention are further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.
[0036] The present invention aims to solve the problem of preparing arbitrary quantum states in quantum computing. The preparation of arbitrary quantum states is one of the important steps in the design of quantum algorithms. Taking the quantum image processing algorithm as an example, image stretching, noise reduction, edge detection and other processing methods are all based on the quantum state representation of the image. Considering the physical realization of quantum computers, the quantum bits applied to quantum algorithms always use the |0> state as the initial state at the beginning of the algorithm. Therefore, it is necessary to find a method for preparing arbitrary quantum states to evolve the quantum bits used for calculation from the |0> state to the arbitrary quantum state representation required by the quantum algorithm.
[0037] In order to solve the above problems, the present invention proposes a method for preparing an arbitrary quantum state, comprising:
[0038] Step S1, determining a basic quantum state that can be achieved by the quantum bit based on the quantum bit;
[0039] Step S2, combining the basic quantum states according to a predetermined combination method to obtain a combined quantum state;
[0040] Step S3: based on the bit state of the basic quantum state in the combined quantum state, convert the combined quantum state into a target quantum state according to a predetermined calculation method.
[0041] The theoretical basis of the present invention is that quantum computing itself is a reversible computing model. For example, assuming that U, V, and W are three quantum operations, and that the continuous application of U, V, and W to the quantum state |a> can obtain the |b> state, which is written as WVU|a>=|b>; then the reverse operation of this quantum operation can restore the quantum state from |b> to |a> state, which is written as U -1 V -1 W -1 |b>=|a>. Therefore, if we want to prepare n quantum bits from the initial state |0…0> (n zeros) to the |φ> state, we only need to find a quantum circuit (i.e., a quantum operation sequence) that can restore the |φ> state to the |0…0> state, and then run the inverse of this quantum circuit.
[0042] In step S1, to realize any quantum terabit in the algorithm, it is necessary to first determine the number of quantum bits of the quantum computer, and determine the basic quantum state based on the number of quantum bits. For example, 4 quantum bits can identify 16 quantum states. A 4-bit quantum computer can only realize up to 16 quantum states in the algorithm based on 4 bits.
[0043] In step S2, the quantum states of the actual bits based on quantum computing are grouped to obtain a combined quantum state. Specifically, there are 16 possible quantum states for four bits |0000>|0001>|0010>|0011>…|1110>|1111>, assuming that the quantum state to be prepared |φ>=a|0000>+b|0001>+c|0010>+d|0011>+e|0100>…(where a, b, c, etc. are complex numbers), |φ> represents any quantum state that may exist in the four quantum bit space. Furthermore, the quantum states that make up |φ> are combined in pairs in adjacent order (no repeated combinations), that is, (a|0000>+b|0001>)+(c|0010>+d|0011>)+(e|0100>+f|0101>)+…(o|1110>+p|1111). A total of 8 combinations of quantum states are obtained.
[0044] In step S3, according to the value of the basic quantum state in the combined quantum state, it is calculated that -sin(θ / 2)a+cos(θ / 2)be -iβ =0 (where a and b are the coefficients of the superposition quantum state), and apply the angles θ and β to the controlled quantum bit to achieve deflection on RY and RZ.
[0045] Specifically, following the above embodiment, it is observed that after the quantum states |φ> are combined in pairs, the first three bits in each group are the same. Therefore, a controlled quantum operation can be performed on the last bit, and the control bits are the first three quantum bits. That is to say, when the first three bits are |000>, |001>...|111> respectively, different single quantum gates are performed on the last bit, and the function of the single quantum gate is to set the last bit in each group to |0>.
[0046] Taking the first group a|0000>+b|0001> as an example, when the first three bits are |000>, the last bit is rotated by an RZ rotation of -β and an RY rotation of -θ, so that it becomes (cos(θ / 2)a+sin(θ / 2)be -iβ )|0000>+(-sin(θ / 2)a+cos(θ / 2)be -iβ )|0001>, that is, by choosing the appropriate angles θ and β, we can make -sin(θ / 2)a+cos(θ / 2)be -iβ =0, RZ and RY have no effect when the current three bits are not |000>.
[0047] Furthermore, for (c|0010>+d|0011>), we also get a set of equations that can be used to make -sin(θ / 2)c+cos(θ / 2)be -iβ= 0. Similarly, the other controlled RY gates can be used to set the probability amplitudes corresponding to |0010>, |0011>, |0101>, |0111>, |1001>, |1011>, |1101> and |1111> to 0 respectively.
[0048] After the above steps, the 16 quantum states that originally constituted the superposition state |φ> have been reduced to 8, and the last bit always remains in the |0> state. Next, the third quantum bit is subjected to a controlled quantum operation (i.e., the third quantum bit is used as a controlled quantum bit), and the control bits are the first two quantum bits. That is to say, when the first two quantum bits are |00>, |01>, |10>, |11>, respectively, different single-bit gate operations are performed on the third quantum bit, and the function of the single-bit gate is to set the third quantum bit in each group to |0>.
[0049] After the above steps, the number of quantum states in the superposition state is reduced from 8 to 4, and the last two bits remain in the |00> state. Next, the first bit is used as the control bit to perform a single-bit operation on the second bit, that is, when the first bit is |0> or |1>, different single-bit gate operations are performed on the second bit, and the function of the single-bit gate is to set the second quantum bit to the |0> state.
[0050] After the above steps, the state is now (p|0>+q|1>)|000>, so only a single-bit gate needs to be applied to the first quantum bit. The function of the single-bit gate is to set the first quantum bit to the |0> state.
[0051] After the above steps, the operation of resetting any four-bit quantum state back to |0000> is realized. Finally, the quantum gate corresponding to the above operation is reversed to realize the preparation of any four-bit quantum state from the |0000> state.
[0052] In some embodiments of the present invention, combining the basic quantum states in a predetermined combination manner to obtain a combined quantum state includes:
[0053] The number of grouping elements of the basic quantum state is determined based on the number of target quantum states, and a predetermined number of basic quantum states are added in a front-to-back order based on an adjacent relationship to obtain a combined quantum state.
[0054] In this embodiment, the target quantum state refers to the quantum state required by the upper layer of the algorithm. According to the implementation method of any quantum state of the present invention, the way to implement any quantum state is similar to the binary method, that is, first divide the maximum number of quantum bits that can be represented by the quantum bit by 2 to obtain the next level of quantum state, and so on, until a quantum state that meets the requirements is achieved.
[0055] In some embodiments of the present invention, converting the combined quantum state into a target quantum state according to a predetermined calculation method based on the bit state of the basic quantum state in the combined quantum state includes:
[0056] The quantum bits with the same value in the combined quantum state are used as control bits, and the quantum bits with different values in the combined quantum state are used as controlled bits.
[0057] In this embodiment, the combined quantum state a|0000>+b|0001> is taken as an example. Since the combined quantum state is obtained by superposition of two basic quantum states, and the first three quantum bits are obviously consistent, a controlled quantum operation can be applied to the last bit, and the control bits are the first three bits. That is to say, when the first three bits are |000>, |001>...|111> respectively, different single quantum gates are applied to the last bit respectively, and the function of the single quantum gate is to set the last bit in each group to |0>.
[0058] In some embodiments of the present invention, converting the combined quantum state into a target quantum state according to a predetermined calculation method based on the bit state of the basic quantum state in the combined quantum state further includes:
[0059] Based on the coefficient of the corresponding basic quantum state in the combined quantum state, a rotation angle that causes the coefficient of the basic quantum state of the controlled bit to be not a predetermined value to be a predetermined value is calculated.
[0060] In this embodiment, as described above, when the first three bits are |000>, the last bit is subjected to an RZ rotation of -β and an RY rotation of -θ, so that it becomes (cos(θ / 2)a+sin(θ / 2)be -iβ )|0000>+(-sin(θ / 2)a+cos(θ / 2)be -iβ )|0001>, that is, by choosing the appropriate angles θ and β, we can make -sin(θ / 2)a+cos(θ / 2)be -iβ =0, when the current three bits are not |000>, RZ and RY have no effect. Similarly, other controlled RY gates can be used to make the probability amplitudes corresponding to |0011>, |0101>, |0111>, |1001>, |1011>, |1101> and |1111> equal to 0.
[0061] In some embodiments of the present invention, converting the combined quantum state into a target quantum state according to a predetermined calculation method based on the bit state of the basic quantum state in the combined quantum state further includes:
[0062] The coefficient of the basic quantum state in which the controlled bit is not a predetermined value is set to a predetermined value through the rotation angle to obtain a temporary target quantum state.
[0063] In an embodiment of the present invention,
[0064] In some embodiments of the invention, the method further comprises:
[0065] It is determined whether the temporary target quantum state is equal to the target quantum state, and in response to the temporary target quantum state being equal to the target quantum state, the temporary target quantum state is used as the target quantum state.
[0066] In some embodiments of the invention, the method further comprises:
[0067] In response to the temporary target quantum state not satisfying the target quantum state, the temporary target quantum state is used as a new basic quantum state to form a new combined quantum state in a predetermined combination manner, and the new combined quantum state is converted into a new temporary target quantum state in a predetermined calculation manner based on the bit state of the new basic quantum state;
[0068] The above process is repeated until the temporary target quantum state is equal to the target quantum state.
[0069] like Figure 2 As shown, another aspect of the present invention further provides a system for preparing an arbitrary quantum state, comprising:
[0070] A quantum state acquisition module 1, wherein the quantum state acquisition module 1 is configured to determine, based on the quantum bit, a basic quantum state that the quantum bit can achieve;
[0071] A quantum state combination module 2, wherein the quantum state combination module 2 is configured to combine the basic quantum states in a predetermined combination manner to obtain a combined quantum state;
[0072] The quantum state conversion module 3 is configured to convert the combined quantum state into a target quantum state according to a predetermined calculation method based on the bit state of the basic quantum state in the combined quantum state.
[0073] In some embodiments of the present invention, combining the basic quantum states in a predetermined combination manner to obtain a combined quantum state includes:
[0074] The number of grouping elements of the basic quantum state is determined based on the number of target quantum states, and a predetermined number of basic quantum states are added in a front-to-back order based on an adjacent relationship to obtain a combined quantum state.
[0075] In some embodiments of the present invention, converting the combined quantum state into a target quantum state according to a predetermined calculation method based on the bit state of the basic quantum state in the combined quantum state includes:
[0076] The quantum bits with the same value in the combined quantum state are used as control bits, and the quantum bits with different values in the combined quantum state are used as controlled bits.
[0077] In some embodiments of the present invention, converting the combined quantum state into a target quantum state according to a predetermined calculation method based on the bit state of the basic quantum state in the combined quantum state further includes:
[0078] Based on the coefficient of the corresponding basic quantum state in the combined quantum state, a rotation angle that causes the coefficient of the basic quantum state of the controlled bit to be not a predetermined value to be a predetermined value is calculated.
[0079] In some embodiments of the present invention, converting the combined quantum state into a target quantum state according to a predetermined calculation method based on the bit state of the basic quantum state in the combined quantum state further includes:
[0080] The coefficient of the basic quantum state in which the controlled bit is not a predetermined value is set to a predetermined value through the rotation angle to obtain a temporary target quantum state.
[0081] In some embodiments of the invention, the method further comprises:
[0082] It is determined whether the temporary target quantum state is equal to the target quantum state, and in response to the temporary target quantum state being equal to the target quantum state, the temporary target quantum state is used as the target quantum state.
[0083] In some embodiments of the invention, the method further comprises:
[0084] In response to the temporary target quantum state not satisfying the target quantum state, the temporary target quantum state is used as a new basic quantum state to form a new combined quantum state in a predetermined combination manner, and the new combined quantum state is converted into a new temporary target quantum state in a predetermined calculation manner based on the bit state of the new basic quantum state;
[0085] The above process is repeated until the temporary target quantum state is equal to the target quantum state.
[0086] like Figure 3 As shown, another aspect of the present invention further provides a computer device, comprising:
[0087] at least one processor 21; and
[0088] A memory 22, wherein the memory 22 stores computer instructions 23 that can be run on the processor 21, and when the instructions 23 are executed by the processor 21, a method for preparing an arbitrary quantum state is implemented, including:
[0089] Determining, based on the quantum bit, a basic quantum state that can be achieved by the quantum bit;
[0090] Combining the basic quantum states in a predetermined combination manner to obtain a combined quantum state;
[0091] The combined quantum state is converted into a target quantum state according to a predetermined calculation method based on the bit state of the basic quantum state in the combined quantum state.
[0092] In some embodiments of the present invention, combining the basic quantum states in a predetermined combination manner to obtain a combined quantum state includes:
[0093] The number of grouping elements of the basic quantum state is determined based on the number of target quantum states, and a predetermined number of basic quantum states are added in a front-to-back order based on an adjacent relationship to obtain a combined quantum state.
[0094] In some embodiments of the present invention, converting the combined quantum state into a target quantum state according to a predetermined calculation method based on the bit state of the basic quantum state in the combined quantum state includes:
[0095] The quantum bits with the same value in the combined quantum state are used as control bits, and the quantum bits with different values in the combined quantum state are used as controlled bits.
[0096] In some embodiments of the present invention, converting the combined quantum state into a target quantum state according to a predetermined calculation method based on the bit state of the basic quantum state in the combined quantum state further includes:
[0097] Based on the coefficient of the corresponding basic quantum state in the combined quantum state, a rotation angle that causes the coefficient of the basic quantum state of the controlled bit to be not a predetermined value to be a predetermined value is calculated.
[0098] In some embodiments of the present invention, converting the combined quantum state into a target quantum state according to a predetermined calculation method based on the bit state of the basic quantum state in the combined quantum state further includes:
[0099] The coefficient of the basic quantum state in which the controlled bit is not a predetermined value is set to a predetermined value through the rotation angle to obtain a temporary target quantum state.
[0100] In some embodiments of the invention, the method further comprises:
[0101] It is determined whether the temporary target quantum state is equal to the target quantum state, and in response to the temporary target quantum state being equal to the target quantum state, the temporary target quantum state is used as the target quantum state.
[0102] In some embodiments of the invention, the method further comprises:
[0103] In response to the temporary target quantum state not satisfying the target quantum state, the temporary target quantum state is used as a new basic quantum state to form a new combined quantum state in a predetermined combination manner, and the new combined quantum state is converted into a new temporary target quantum state in a predetermined calculation manner based on the bit state of the new basic quantum state;
[0104] The above process is repeated until the temporary target quantum state is equal to the target quantum state.
[0105] like Figure 4 As shown, another aspect of the present invention further provides a computer-readable storage medium 401, wherein the computer-readable storage medium 401 stores a computer program 402, and when the computer program 402 is executed by a processor, a method for preparing an arbitrary quantum state is implemented, including:
[0106] Determining, based on the quantum bit, a basic quantum state that can be achieved by the quantum bit;
[0107] Combining the basic quantum states in a predetermined combination manner to obtain a combined quantum state;
[0108] The combined quantum state is converted into a target quantum state according to a predetermined calculation method based on the bit state of the basic quantum state in the combined quantum state.
[0109] In some embodiments of the present invention, combining the basic quantum states in a predetermined combination manner to obtain a combined quantum state includes:
[0110] The number of grouping elements of the basic quantum state is determined based on the number of target quantum states, and a predetermined number of basic quantum states are added in a front-to-back order based on an adjacent relationship to obtain a combined quantum state.
[0111] In some embodiments of the present invention, converting the combined quantum state into a target quantum state according to a predetermined calculation method based on the bit state of the basic quantum state in the combined quantum state includes:
[0112] The quantum bits with the same value in the combined quantum state are used as control bits, and the quantum bits with different values in the combined quantum state are used as controlled bits.
[0113] In some embodiments of the present invention, converting the combined quantum state into a target quantum state according to a predetermined calculation method based on the bit state of the basic quantum state in the combined quantum state further includes:
[0114] Based on the coefficient of the corresponding basic quantum state in the combined quantum state, a rotation angle that causes the coefficient of the basic quantum state of the controlled bit to be not a predetermined value to be a predetermined value is calculated.
[0115] In some embodiments of the present invention, converting the combined quantum state into a target quantum state according to a predetermined calculation method based on the bit state of the basic quantum state in the combined quantum state further includes:
[0116] The coefficient of the basic quantum state in which the controlled bit is not a predetermined value is set to a predetermined value through the rotation angle to obtain a temporary target quantum state.
[0117] In some embodiments of the invention, the method further comprises:
[0118] It is determined whether the temporary target quantum state is equal to the target quantum state, and in response to the temporary target quantum state being equal to the target quantum state, the temporary target quantum state is used as the target quantum state.
[0119] In some embodiments of the invention, the method further comprises:
[0120] In response to the temporary target quantum state not satisfying the target quantum state, the temporary target quantum state is used as a new basic quantum state to form a new combined quantum state in a predetermined combination manner, and the new combined quantum state is converted into a new temporary target quantum state in a predetermined calculation manner based on the bit state of the new basic quantum state;
[0121] The above process is repeated until the temporary target quantum state is equal to the target quantum state.
[0122] Finally, it should be noted that a person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only storage memory (ROM) or a random access memory (RAM), etc. The embodiment of the computer program can achieve the same or similar effect as any of the above-mentioned method embodiments corresponding thereto.
[0123] In addition, typically, the devices and equipment disclosed in the embodiments of the present invention may be various electronic terminal devices, such as mobile phones, personal digital assistants (PDAs), tablet computers (PADs), smart TVs, etc., or large terminal devices, such as servers, etc. Therefore, the protection scope disclosed in the embodiments of the present invention should not be limited to a certain type of device or equipment. The client disclosed in the embodiments of the present invention may be applied to any of the above electronic terminal devices in the form of electronic hardware, computer software, or a combination of the two.
[0124] In addition, the method disclosed in the embodiment of the present invention can also be implemented as a computer program executed by a CPU, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the CPU, the above functions defined in the method disclosed in the embodiment of the present invention are performed.
[0125] In addition, the above method steps and system units may also be implemented using a controller and a computer-readable storage medium for storing a computer program that enables the controller to implement the above steps or unit functions.
[0126] In addition, it should be understood that the computer-readable storage medium (e.g., memory) described herein can be a volatile memory or a non-volatile memory, or can include both a volatile memory and a non-volatile memory. As an example and not by way of limitation, a non-volatile memory can include a read-only memory (ROM), a programmable ROM (PROM), an electrically programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), or a flash memory. A volatile memory can include a random access memory (RAM), which can act as an external cache memory. As an example and not by way of limitation, RAM can be obtained in a variety of forms, such as synchronous RAM (DRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct Rambus RAM (DRRAM). The storage devices of the disclosed aspects are intended to include, but are not limited to, these and other suitable types of memory.
[0127] It will also be appreciated by those skilled in the art that various exemplary logic blocks, modules, circuits and algorithm steps described in conjunction with the disclosure herein can be implemented as electronic hardware, computer software or a combination of the two. In order to clearly illustrate this interchangeability of hardware and software, a general description has been given to the functions of various schematic components, blocks, modules, circuits and steps. Whether this function is implemented as software or hardware depends on specific applications and the design constraints imposed on the entire system. Those skilled in the art can implement the described function in various ways for each specific application, but this implementation decision should not be interpreted as causing a departure from the disclosed scope of the embodiments of the present invention.
[0128] The various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure herein may be implemented or executed using the following components designed to perform the functions described herein: a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of these components. A general-purpose processor may be a microprocessor, but alternatively, the processor may be any conventional processor, controller, microcontroller, or state machine. The processor may also be implemented as a combination of computing devices, for example, a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP, and / or any other such configuration.
[0129] The step of the method or algorithm described in conjunction with the disclosure here can be directly included in hardware, in a software module executed by a processor, or in a combination of the two. The software module can reside in a RAM memory, a flash memory, a ROM memory, an EPROM memory, an EEPROM memory, a register, a hard disk, a removable disk, a CD-ROM, or a storage medium of any other form known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium or write information to the storage medium. In an alternative, the storage medium can be integrated with the processor. The processor and the storage medium can reside in an ASIC. The ASIC can reside in a user terminal. In an alternative, the processor and the storage medium can reside in a user terminal as discrete components.
[0130] In one or more exemplary designs, the functions can be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions can be stored on a computer-readable medium or transmitted via a computer-readable medium as one or more instructions or codes. Computer-readable media include computer storage media and communication media, and the communication media include any media that helps to transfer a computer program from one location to another. The storage medium can be any available medium that can be accessed by a general or special-purpose computer. As an example and not limiting, the computer-readable medium can include RAM, ROM, EEPROM, CD-ROM or other optical disk storage devices, disk storage devices or other magnetic storage devices, or can be used to carry or store the required program code in the form of instructions or data structures and can be accessed by a general or special-purpose computer or a general or special-purpose processor. In addition, any connection can be appropriately referred to as a computer-readable medium. For example, if a coaxial cable, optical fiber cable, twisted pair, digital subscriber line (DSL) or wireless technologies such as infrared, radio and microwaves are used to send software from a website, server or other remote source, the above-mentioned coaxial cable, optical fiber cable, twisted pair, DSL or wireless technologies such as infrared, radio and microwaves are all included in the definition of the medium. As used herein, disk and disc include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk, Blu-ray disc, wherein disks usually reproduce data magnetically, while optical discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
Claims
1. A method for preparing an arbitrary quantum state, characterized in that: include: Determining, based on the quantum bit, a basic quantum state that can be achieved by the quantum bit; Combining the basic quantum states in a predetermined combination manner to obtain a combined quantum state; Converting the combined quantum state into a target quantum state according to a predetermined calculation method based on the bit state of the basic quantum state in the combined quantum state; The step of converting the combined quantum state into a target quantum state according to a predetermined calculation method based on the bit state of the basic quantum state in the combined quantum state includes: The qubits with the same value in the combined quantum state are used as control bits, and the qubits with different values in the combined quantum state are used as controlled bits; Based on the coefficient of the corresponding basic quantum state in the combined quantum state, calculating the rotation angle of the coefficient of the basic quantum state that makes the controlled bit not have a predetermined value to have a predetermined value; By using the rotation angle, the coefficient of the basic quantum state of the controlled bit which is not a predetermined value is set to a predetermined value to obtain a temporary target quantum state; Determining whether the temporary target quantum state is equal to the target quantum state, and in response to the temporary target quantum state being equal to the target quantum state, using the temporary target quantum state as the target quantum state; In response to the temporary target quantum state not satisfying the target quantum state, the temporary target quantum state is used as a new basic quantum state to form a new combined quantum state in a predetermined combination manner, and the new combined quantum state is converted into a new temporary target quantum state in a predetermined calculation manner based on the bit state of the new basic quantum state; The above process is repeated until the temporary target quantum state is equal to the target quantum state.
2. The method according to claim 1, characterized in that The step of combining the basic quantum states in a predetermined combination manner to obtain a combined quantum state comprises: The number of grouping elements of the basic quantum state is determined based on the number of target quantum states, and a predetermined number of basic quantum states are added in a front-to-back order based on an adjacent relationship to obtain a combined quantum state.
3. A system for preparing arbitrary quantum states, characterized in that: include: A quantum state acquisition module, the quantum state acquisition module is configured to determine, based on the quantum bit, a basic quantum state that the quantum bit can achieve; A quantum state combination module, wherein the quantum state combination module is configured to combine the basic quantum states in a predetermined combination manner to obtain a combined quantum state; A quantum state conversion module, wherein the quantum state conversion module is configured to convert the combined quantum state into a target quantum state according to a predetermined calculation method based on the bit state of the basic quantum state in the combined quantum state; Converting the combined quantum state into a target quantum state according to a predetermined calculation method based on the bit state of the basic quantum state in the combined quantum state includes: The qubits with the same value in the combined quantum state are used as control bits, and the qubits with different values in the combined quantum state are used as controlled bits; Based on the coefficient of the corresponding basic quantum state in the combined quantum state, calculating the rotation angle of the coefficient of the basic quantum state that makes the controlled bit not have a predetermined value to have a predetermined value; By using the rotation angle, the coefficient of the basic quantum state of the controlled bit which is not a predetermined value is set to a predetermined value to obtain a temporary target quantum state; Determining whether the temporary target quantum state is equal to the target quantum state, and in response to the temporary target quantum state being equal to the target quantum state, using the temporary target quantum state as the target quantum state; In response to the temporary target quantum state not satisfying the target quantum state, the temporary target quantum state is used as a new basic quantum state to form a new combined quantum state in a predetermined combination manner, and the new combined quantum state is converted into a new temporary target quantum state in a predetermined calculation manner based on the bit state of the new basic quantum state; The above process is repeated until the temporary target quantum state is equal to the target quantum state.
4. A computer device, characterized in that: include: at least one processor; as well as A memory, wherein the memory stores computer instructions executable on the processor, wherein the instructions, when executed by the processor, implement the steps of the method according to any one of claims 1 to 2.
5. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of the method according to any one of claims 1 to 2.
Citation Information
Patent Citations
Data identification method and device based on quantum computer and readable storage medium
CN112001498A
Quantum circuit operation method and device, electronic equipment and medium
CN114548413A