Quantum simulator based on subspace mapping table

By using a subspace mapping table to store index pairs of qubit gates in the quantum simulator, the quantum simulator can directly access the mapping table for processing, which solves the problem of redundant computation when the quantum simulator processes a large number of qubits and improves simulation efficiency.

CN119250217BActive Publication Date: 2025-11-11中电信量子信息科技集团有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411344266.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2025-11-11
Estimated Expiration
2044-09-25

AI Technical Summary

Technical Problem

Existing quantum simulators suffer from redundant computations when processing large numbers of qubits, resulting in low simulation efficiency.

Method used

A quantum simulator based on a subspace mapping table is adopted. By pre-constructing the mapping table to store the index pairs of qubit gates, the quantum gate module directly accesses the mapping table for processing, reducing the operation on each qubit.

Benefits of technology

This improves the processing efficiency of quantum simulators, reduces redundant calculations, and speeds up the application of qubit gates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119250217B_ABST
    Figure CN119250217B_ABST
Patent Text Reader

Abstract

This application discloses a quantum simulator based on a subspace mapping table. The quantum simulator includes a quantum gate module, and the subspace mapping table is configured to store a pre-built mapping table. The quantum gate module is configured to simulate qubit gates and access the mapping table to process qubits in the quantum system according to the index pairs in the mapping table, obtaining quantum state data to obtain simulation results. Compared to existing technologies, when processing the quantum system according to qubit gates, the quantum simulator can obtain the updated index pairs required for a qubit gate to act on a specific qubit by querying the pre-built mapping table stored in the subspace mapping table. Therefore, it does not require operation on each qubit, accelerating the application speed of qubit gates and improving the efficiency of the quantum simulator.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of quantum computing, and more specifically, to a quantum simulator based on a subspace mapping table. Background Technology

[0002] Quantum simulators, which rely on high-performance computers to simulate quantum computers, play a crucial role in quantum technology research such as quantum communication, quantum cryptography, and quantum computing. However, in these technologies, each quantum gate applied by the simulator requires operation on each qubit. When the number of qubits used by the quantum simulator is large, significant redundant computation problems arise, affecting simulation efficiency. Summary of the Invention

[0003] This application provides a quantum simulator based on a subspace mapping table.

[0004] This application provides a quantum simulator based on a subspace mapping table. The quantum simulator includes a quantum gate module, and the subspace mapping table is configured to store a pre-built mapping table.

[0005] The quantum gate module is configured to simulate a qubit gate and access the mapping table to process the qubits in the quantum system according to the index in the mapping table to obtain quantum state data and thus obtain simulation results.

[0006] Thus, when processing quantum systems based on qubit gates, compared to existing technologies, quantum simulators can obtain the updated index pairs required when a qubit gate acts on a specific qubit by querying a pre-built mapping table stored in a subspace mapping table. Therefore, it is not necessary to operate on each qubit, which speeds up the application of qubit gates and improves the efficiency of quantum simulators.

[0007] In some implementations, the mapping table is obtained through the following steps:

[0008] Calculate the index pair for each qubit in the quantum system input to the quantum simulator. The index pair is used to indicate the correspondence between the position of each qubit and the position of the affected scalar in the quantum state vector of the quantum system when quantum logic processing is performed.

[0009] The mapping table is constructed based on the index pairs.

[0010] Thus, the quantum simulator calculates an index pair for each qubit in the quantum system input to it. This index pair indicates the correspondence between the position of each qubit and the position of the affected scalar in the corresponding quantum state vector of the quantum system during quantum logic processing. Next, the quantum simulator constructs a mapping table based on these index pairs. This results in a mapping table containing the index pairs that need to be updated when a qubit gate operates on a specific qubit. Subsequent processing of qubits by the quantum gate module can then be performed without operating on each qubit individually, accelerating the application of qubit gates and improving the efficiency of the quantum simulator.

[0011] In some implementations, the calculation input to the quantum simulator includes index pairs for each qubit in the quantum system, comprising:

[0012] Set the initial traversal value, traversal step size, and index interval;

[0013] A temporary index pair is obtained based on the initial traversal value, the traversal step size, the index interval, the position i corresponding to the qubit, and the increment value, where i is a positive integer less than n, n is the number of qubits in the quantum system, and the increment value is less than or equal to i.

[0014] The mapping table is obtained based on the temporary index pair.

[0015] Thus, the quantum simulator sets the initial traversal value, traversal step size, and index interval. Next, based on the initial traversal value, traversal step size, index interval, the position i corresponding to the qubit, and the increment value, the quantum simulator obtains temporary index pairs, where i is a positive integer less than n, n is the number of qubits in the quantum system, and the increment value is less than or equal to i. Finally, the quantum simulator obtains a mapping table based on the temporary index pairs. In this way, by traversing according to the set parameters, the positional relationships between the corresponding quantum state vector positions of each qubit in the quantum system are obtained.

[0016] In some implementations, obtaining a temporary index pair based on the initial traversal value, the traversal step size, the index interval, the position i corresponding to the qubit, and the increment value includes:

[0017] The first temporary index in the temporary index pair is obtained based on the initial traversal value, the traversal step size, and the increment value.

[0018] Thus, the quantum simulator obtains the first temporary index in the temporary index pair based on the initial traversal value, traversal step size, and increment value. In this way, the quantum simulator obtains the first temporary index through relevant parameters, and subsequently obtains the second temporary index using the first temporary index and the index interval.

[0019] In some implementations, obtaining a temporary index pair based on the initial traversal value, the traversal step size, the index interval, the position i corresponding to the qubit, and the increment value includes:

[0020] The second temporary index in the temporary index pair is obtained based on the first temporary index and the index interval.

[0021] Thus, the quantum simulator obtains the first temporary index in the temporary index pair based on the initial traversal value, traversal step size, and increment value. Then, it obtains the second temporary index in the temporary index pair based on the first temporary index and the index interval. In this way, the computer obtains the second temporary index using the first temporary index and the index interval. This allows the computer to obtain the index table based on the first and second temporary indices, reducing the time required to calculate the positional relationships for each qubit in the quantum system when using quantum gate pairs.

[0022] In some implementations, obtaining a temporary index pair based on the initial traversal value, the traversal step size, the index interval, the position i corresponding to the qubit, and the increment value includes:

[0023] The next traversal value is obtained based on the initial traversal value and the traversal step size;

[0024] If the next ergodic value is less than or equal to the maximum ergodic value, a temporary index pair is obtained based on the next ergodic value, the position i corresponding to the qubit, and the increment value. The maximum ergodic value is determined based on the number of qubits in the quantum system.

[0025] Thus, the quantum simulator obtains the next ergodic value based on the initial ergodic value and the ergodic step size. Then, if the next ergodic value is less than or equal to the maximum ergodic value, the quantum simulator obtains a temporary index pair based on the next ergodic value, the position i corresponding to the qubit, and the increment value. The maximum ergodic value is determined based on the number of qubits in the quantum system. In this way, the quantum simulator, without exceeding the set maximum ergodic value, calculates the temporary index pair corresponding to the position i of the qubit based on the ergodic value and the ergodic step size, ensuring that the index pair corresponding to each qubit is calculated completely.

[0026] In some implementations, obtaining a temporary index pair based on the initial traversal value, the traversal step size, the index interval, the position i corresponding to the qubit, and the increment value includes:

[0027] If the next traversal value is greater than the maximum traversal value, the temporary index pair is confirmed as the index pair.

[0028] Thus, if the ergodic value is greater than the maximum ergodic value in the next iteration, the quantum simulator will recognize the temporary index pair as the final index pair. In this way, the quantum simulator ends the ergodic process when the ergodic value is greater than the maximum ergodic value, and uses the already calculated temporary index pair as the final index pair. This can be used to reduce the time required to calculate the positional relationships for each qubit in a quantum system when quantum gates are paired.

[0029] In some embodiments, the quantum simulator further includes a quantum state vector initialization module;

[0030] The quantum state vector initialization module is configured to initialize the quantum system using classical computing resources to obtain an initial quantum system, and to construct the mapping table based on the initial quantum system.

[0031] Thus, the quantum simulator also includes a quantum state vector initialization module. This module is configured to initialize the quantum system using classical computing resources to obtain an initial quantum system, which is then used to construct a mapping table. In this way, the quantum state vector initialization module is responsible for initializing the quantum system using classical computing resources, preparing for the construction of the mapping table.

[0032] In some embodiments, the quantum simulator further includes a quantum state post-processing module;

[0033] The quantum state post-processing module is configured to process the quantum state data to obtain simulation results.

[0034] Thus, the quantum simulator also includes a quantum state post-processing module. This module is configured to process the quantum state data to obtain simulation results. In this way, by processing the quantum state data through the quantum state post-processing module, the quantum simulator can simulate the operation of a quantum computer, providing an important tool for the research and development of quantum computing.

[0035] In some implementations, the quantum simulator further includes a storage module;

[0036] The storage module is configured to store the quantum state data and the simulation results.

[0037] Thus, the quantum simulator also includes a storage module. This module is configured to store quantum state data and simulation results. In this way, the quantum simulator generates a large amount of quantum state data when simulating quantum computing. This data reflects the state of the qubits at different points in time, enabling the understanding and analysis of the quantum computing process. Storing the simulation results also helps researchers analyze and compare different quantum algorithms and their performance under different conditions.

[0038] Additional aspects and advantages of embodiments of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of embodiments of this application. Attached Figure Description

[0039] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, wherein:

[0040] Figure 1 This is one of the structural schematic diagrams of the quantum simulator according to the embodiments of this application;

[0041] Figure 2 This is one of the flowcharts illustrating the implementation of this application;

[0042] Figure 3 This is a second flowchart illustrating the implementation method of this application;

[0043] Figure 4 This is the third flowchart illustrating the implementation method of this application;

[0044] Figure 5 This is the fourth flowchart illustrating the implementation method of this application;

[0045] Figure 6 This is the fifth flowchart illustrating the implementation method of this application;

[0046] Figure 7 This is the sixth flowchart illustrating the implementation method of this application;

[0047] Figure 8 This is a schematic diagram of the structure of the subspace mapping table in the embodiments of this application;

[0048] Figure 9 This is a second schematic diagram of the structure of the quantum simulator according to the embodiments of this application;

[0049] Figure 10 This is the third schematic diagram of the structure of the quantum simulator according to the embodiments of this application;

[0050] Figure 11 This is the fourth schematic diagram of the structure of the quantum simulator according to the embodiments of this application;

[0051] Figure 12 This is a schematic diagram of the overall architecture of the quantum simulator according to the embodiments of this application. Detailed Implementation

[0052] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the embodiments of this application, and should not be construed as limiting the embodiments of this application.

[0053] In the absence of widespread practical quantum hardware, quantum simulators, which rely on high-performance computers to simulate quantum computers, play a crucial role in quantum technology research, such as quantum communication, quantum cryptography, and quantum computing. These quantum simulators typically use complex mathematical algorithms, such as matrix operations and vector transformations, to simulate the role of quantum gates in quantum states.

[0054] However, as the number of qubits increases, redundant computation becomes one of the main challenges. This problem stems from the interrelationship of each qubit. In traditional quantum computing simulations, every time a quantum gate is applied, the entire quantum state vector needs to be updated, causing the simulator to operate on all qubits, involving large-scale array operations and complex number calculations, thus reducing simulation efficiency.

[0055] Based on the above issues, please refer to Figure 1 This application provides a quantum simulator 100 based on a subspace mapping table 10. The quantum simulator 100 includes a quantum gate module 20, wherein the subspace mapping table 10 is configured to store a pre-built mapping table.

[0056] The quantum gate module 20 is configured to simulate a qubit gate and access a mapping table to process the qubits in the quantum system according to the index in the mapping table to obtain quantum state data and thus obtain simulation results.

[0057] Specifically, a quantum simulator 100 is a device or software system that uses classical computer resources to simulate quantum computing processes; it can also be called a quantum computing simulator.

[0058] Quantum systems are microscopic particle systems governed by the laws of quantum mechanics, possessing unique properties such as wave-particle duality, quantum superposition, and quantum entanglement. A quantum bit (qubit) is the basic unit of information in quantum computing, similar to a bit in classical computing.

[0059] A mapping table is a data structure used to store mapping information of relevant indices in a quantum state vector, thereby accelerating the process of quantum gates interacting with quantum state vectors. This subspace mapping table 10 optimizes the execution efficiency of quantum gates and reduces computational complexity by pre-computing and storing index pairs.

[0060] Quantum logic processing refers to changing the state of a qubit by using quantum gates.

[0061] A quantum logic gate is a fundamental operation performed on a qubit, similar to a logic gate in classical computing. Each quantum logic gate is represented by a unitary matrix and can perform specific linear transformations on the quantum state vector, thereby changing the state of the qubit. Quantum logic gates can also be simply referred to as quantum gates.

[0062] A quantum state vector is a mathematical tool used to precisely describe the state of a quantum system. In quantum computing, this vector consists of complex elements, each representing the probability amplitude of a quantum state, reflecting the probability of that state occurring in quantum measurements. The quantum state vector is also called a quantum state vector.

[0063] A unitary matrix is ​​a complex square matrix whose inverse is equal to its conjugate transpose. In quantum computing, all quantum gates must be represented by unitary matrices to ensure that the total probability of a quantum state, i.e., the sum of the squares of the probability amplitudes, remains 1, satisfying the normalization condition of quantum mechanics.

[0064] Quantum state data is used to represent the current state of a qubit.

[0065] In this embodiment, the quantum simulator 100 stores a pre-built mapping table in a subspace mapping table 10. When the quantum simulator 100 simulates a qubit gate to process a qubit in a quantum system through the quantum gate module 20, the quantum simulator 100 accesses the mapping table stored in the subspace mapping table 10 to obtain the updated index pairs required when the qubit gate acts on a specific qubit. The quantum simulator 100 can eliminate real-time index calculations through this mapping table and directly process the qubits in the quantum system according to the index pairs in the mapping table to obtain quantum state data.

[0066] In summary, when processing a quantum system based on qubit gates, compared to the prior art, the quantum simulator 100 of this application can obtain the updated index pairs required when a qubit gate acts on a specific qubit by querying a pre-built mapping table stored in the subspace mapping table 10. Therefore, it is not necessary to operate on each qubit, which speeds up the application of qubit gates and improves the efficiency of the quantum simulator 100.

[0067] Please see Figure 2 In some implementations, the mapping table is obtained through the following steps:

[0068] 011: Calculate the index pair of each qubit in the quantum system input to the quantum simulator;

[0069] 012: Construct a mapping table based on the index pairs.

[0070] This application also provides a computer device, including a memory and a processor. The method of this application can be implemented by the computer device of this application. Specifically, the memory stores a computer program, and the processor is used to calculate the index pair of each qubit in the quantum system input to the quantum simulator, and to construct a mapping table based on the index pairs.

[0071] This application also provides a mapping table construction apparatus. The information protection method of this application can be implemented by the mapping table construction apparatus of this application. Specifically, the mapping table construction apparatus includes a calculation module and an encryption module. The acquisition module is used to calculate the index pair of each qubit in the quantum system input to the quantum simulator. The construction module is used to construct a mapping table based on the index pairs.

[0072] Specifically, in this embodiment, the quantum simulator 100 calculates an index pair for each qubit in the quantum system input to the quantum simulator 100. The index pair indicates the correspondence between the position of each qubit and the position of the affected scalar in the corresponding quantum state vector of the quantum system during quantum logic processing. Then, the quantum simulator 100 constructs a mapping table based on the index pairs. By pre-compiling and storing these index pairs, the mapping table can optimize the execution efficiency of quantum gates, reduce computational complexity, and thus improve the performance of quantum computing.

[0073] Thus, the quantum simulator 100 calculates an index pair for each qubit in the quantum system input to it. This index pair indicates the correspondence between the position of each qubit and the position of the affected scalar in the corresponding quantum state vector of the quantum system during quantum logic processing. Next, the quantum simulator 100 constructs a mapping table based on these index pairs. This results in a mapping table containing the index pairs that need to be updated when a qubit gate acts on a specific qubit. Subsequent processing of qubits by the quantum gate module can then be performed without operating on each qubit individually, accelerating the application of qubit gates and improving the efficiency of the quantum simulator 100.

[0074] Please see Figure 3 In some implementations, step 011 (calculating the index pair of each qubit in the quantum system input to the quantum simulator 100) includes:

[0075] 0111: Set the initial traversal value, traversal step size, and index interval;

[0076] 0112: A temporary index pair is obtained based on the initial traversal value, traversal step size, index interval, position i corresponding to the qubit, and the increment value;

[0077] 0113: Obtain the mapping table based on the temporary index pair.

[0078] In some implementations, the setting module is used to set the initial traversal value, traversal step size, and index interval. The processing module is used to obtain temporary index pairs based on the initial traversal value, traversal step size, index interval, the position i corresponding to the qubit, and the increment value. The processing module is also used to obtain a mapping table based on the temporary index pairs.

[0079] In some implementations, the processor is also configured to set the initial traversal value, traversal step size, and index interval; and to obtain temporary index pairs based on the initial traversal value, traversal step size, index interval, the position i corresponding to the qubit, and the increment value; and to obtain a mapping table based on the temporary index pairs.

[0080] Specifically, the ergodic value can change. After the index pair corresponding to the current ergodic value is calculated, the ergodic value will be increased by a ergodic step size based on its original value. The ergodic value has a corresponding ergodic range, which is related to the number of qubits in the quantum system. When the ergodic value exceeds the ergodic range, the ergodic loop ends, and the position i and index pair of the qubit interacting with the current quantum gate in the quantum system are stored in the index table. The ergodic value is a key parameter used to determine a specific scalar position in the quantum state vector that needs to be updated. Specifically, the ergodic value is used to calculate the index that needs to be updated for each qubit when applying a quantum gate operation.

[0081] The traversal step size refers to the amount by which the value of the traversal increases each time during the traversal process. The traversal step size is related to the position i of the qubit currently acting on the quantum gate in the quantum system.

[0082] The index interval is used to calculate temporary index pairs. Incrementing values ​​are also variable and can be used to calculate temporary index pairs.

[0083] Temporary index pairs are index pairs that are not yet stored in the mapping table during the calculation process. These temporary index pairs may not have calculated all the index pairs for each quantum bit, and some index pairs may be missing.

[0084] In this embodiment, the quantum simulator 100 sets the initial traversal value to 0 and calculates the traversal step size and index interval based on the position i corresponding to the qubit. Next, the quantum simulator 100 obtains temporary index pairs based on the initial traversal value, traversal step size, index interval, position i corresponding to the qubit, and the increment value, where i is a positive integer less than n, n is the number of qubits in the quantum system, and the increment value is less than or equal to i. Finally, the quantum simulator 100 obtains a mapping table based on the temporary index pairs.

[0085] The following example illustrates the construction of the mapping table in the implementation of this application. For a quantum system with n qubits, taking a quantum system with 32 qubits as an example, the state update of each qubit has two key indices that need to be calculated when applied to a single-qubit quantum gate.

[0086] After initializing the quantum system to obtain a quantum state vector of length , the quantum simulator 100 calculates the index pair of each qubit in the quantum system input to the quantum simulator 100, as follows:

[0087] The traversal value is m, the initial value of traversal value m is 0, and the traversal step size is 2. i+1 The range of the traversal value m is 0-2. n Let n be the number of qubits in the quantum system. The increment is k, which ranges from 0 to i, where i is the position of the qubit currently acting on the quantum gate in the quantum system. The index interval is 2. i , where i is the position of the qubit currently acting on the quantum gate in the quantum system.

[0088] Thus, by iterating through the relevant parameters set, the positional relationships between the corresponding quantum state vector positions of each qubit in the quantum system can be obtained.

[0089] Please see Figure 4 In some implementations, step 0112 (obtaining a temporary index pair based on the initial traversal value, traversal step size, index interval, position i corresponding to the qubit, and the increment value) includes:

[0090] 01121: The first temporary index in the temporary index pair is obtained based on the initial traversal value, traversal step size, and increment value.

[0091] In some implementations, the processing module is also used to obtain a first temporary index in the temporary index pair based on the initial traversal value, the traversal step size, and the increment value.

[0092] In some implementations, the processor is also configured to obtain a first temporary index in the temporary index pair based on the initial traversal value, the traversal step size, and the increment value.

[0093] Specifically, the first temporary index is the first specific position in the quantum state vector where the quantum gate affects the quantum bit.

[0094] The quantum simulator 100 adds the initial traversal value to the corresponding increment to obtain multiple first temporary indices. After processing the initial traversal value and the corresponding increment, the initial traversal value is added to the traversal step size to obtain a new traversal value. This new traversal value is then added to the corresponding increment to obtain a new first temporary index.

[0095] Continuing with the example above, the value of the first temporary index index1 is equal to the sum of the traversal value m and the increment value k, that is, index1 = m + k.

[0096] Thus, the quantum simulator 100 obtains the first temporary index index1 through relevant parameters, and subsequently obtains the second temporary index index2 through the first temporary index index1 and the index interval.

[0097] Please see Figure 5 In some implementations, step 0112 (obtaining a temporary index pair based on the initial traversal value, traversal step size, index interval, position i corresponding to the qubit, and the increment value) includes:

[0098] 01122: Obtain the second temporary index from the temporary index pair based on the first temporary index and the index interval.

[0099] In some implementations, the calculation module is used to obtain a second temporary index in the temporary index pair based on the first temporary index and the index interval.

[0100] In some implementations, the processor is further configured to obtain a second temporary index from the temporary index pair based on the first temporary index and the index interval.

[0101] Specifically, the index interval refers to the interval between the first temporary index and the second temporary index, and the value of the index interval is related to the position i of the qubit interacting with the current quantum gate in the quantum system. The second temporary index is the second specific position in the temporary index pair that is associated with the first specific position.

[0102] The quantum simulator 100 adds each obtained first temporary index and index interval to obtain the second temporary index in the temporary index pair.

[0103] Continuing with the example above, the value of the second temporary index, index2, is equal to the sum of the first temporary index, index1, and the index interval, i.e., index2 = index1 + 2. i .

[0104] Thus, the quantum simulator 100 obtains a first temporary index through relevant parameters, and a second temporary index through the first temporary index and the index interval. It can generate an index table based on the first and second temporary indexes, reducing the time required to calculate the positional relationships for each qubit in the quantum system when quantum gates are paired.

[0105] Please see Figure 6 In some implementations, step 0112 (obtaining a temporary index pair based on the initial traversal value, traversal step size, index interval, position i corresponding to the qubit, and the increment value) includes:

[0106] 01123: Obtain the next traversal value based on the initial traversal value and the traversal step size;

[0107] 01124: If the next ergodic value is less than or equal to the maximum ergodic value, a temporary index pair is obtained based on the next ergodic value, the position i corresponding to the qubit, and the increment value.

[0108] In some implementations, the calculation module is used to obtain the next traversal value based on the initial traversal value and the traversal step size. The processing module is also used to obtain a temporary index pair based on the next traversal value, the position i corresponding to the qubit, and the increment value if the next traversal value is less than or equal to the maximum traversal value.

[0109] In some implementations, the processor is also configured to obtain the next traversal value based on the initial traversal value and the traversal step size. And, if the next traversal value is less than or equal to the maximum traversal value, to obtain a temporary index pair based on the next traversal value, the position i corresponding to the qubit, and the increment value.

[0110] Specifically, the maximum traversal value is the condition for determining the end of the traversal loop. The traversal loop will only end when the traversal value is greater than the maximum traversal value.

[0111] The quantum simulator 100 obtains the next ergodic value based on the initial ergodic value and the ergodic step size. Then, before processing the next ergodic value, it compares it with the maximum ratio ergodic value to determine if the next ergodic value is greater than the maximum ratio ergodic value. If the next ergodic value is less than or equal to the maximum ratio ergodic value, the quantum simulator 100 treats the next ergodic value as the new ergodic value and calculates the index corresponding to the qubit, ensuring that the index pairs for each qubit are calculated completely. The calculation method is consistent with the implementation described above and will not be repeated here.

[0112] Continuing with the example above, after all increments k corresponding to the current traversal value m have been processed, the traversal value m and the traversal step size 2 are then combined. i+1 Add them together to get the next iteration value m1. Then check if this next iteration value m1 is still within the range of 0-2. 32 Within the range. If this value is still between 0 and 2 in the next iteration. 32 Within the range, take this next traversal value m1 as the new traversal value, and continue to add it to the corresponding increment value to obtain a new temporary index pair.

[0113] In this way, the quantum simulator 100 calculates the temporary index pair corresponding to position i of the qubit based on the traversal value and the traversal step size without exceeding the set maximum traversal value, ensuring that the index pair corresponding to each qubit is calculated completely.

[0114] Please see Figure 7In some implementations, step 0112 (obtaining a temporary index pair based on the initial traversal value, traversal step size, index interval, position i corresponding to the qubit, and the increment value) includes:

[0115] 01125: If the value of the next traversal is greater than the maximum traversal value, the temporary index pair will be recognized as an index pair.

[0116] In some implementations, the processing module is also used to recognize temporary index pairs as index pairs if the next traversal value is greater than the maximum traversal value.

[0117] In some implementations, the processor is also configured to recognize a temporary index pair as an index pair if the next traversal value is greater than the maximum traversal value.

[0118] Specifically, if the next traversal value is greater than the maximum traversal value, the quantum simulator 100 ends the traversal loop and confirms all the obtained temporary index pairs as index pairs, storing the index pairs in the mapping table in subsequent processes.

[0119] Continuing with the example above, if the next iteration value is no longer between 0 and 2... 32 Within the range, all specific positions that will be affected by quantum logic processing of the i-th qubit and their correlations have been found. The position i of the qubit interacting with the current quantum gate in the quantum system and the obtained temporary index pair are stored in the mapping table.

[0120] Thus, when the ergodic value is greater than the maximum ergodic value, the quantum simulator 100 ends the ergodic process and uses the already calculated temporary index pair as the final index pair, which can be used to reduce the time for calculating the positional relationship of each qubit in the quantum gate system.

[0121] Please see Figure 8 Continuing with the above example, the complete process of the example described in the above implementation is explained below. For a quantum system with n qubits, taking a quantum system with 32 qubits as an example, the state update of each qubit requires two key indices to be calculated when applied to a single-qubit quantum gate.

[0122] Initializing the quantum system yields a length of 2. 32 After obtaining the quantum state vector, the quantum simulator 100 calculates the index pair of each qubit in the quantum system input to the quantum simulator 100, as follows:

[0123] The traversal value m is variable. After the index pair corresponding to the current traversal value has been calculated, the traversal value m will be increased by a traversal step of 2 based on the original value. i+1Furthermore, the traversal value m has a range, which is related to the number of qubits n in the quantum system. When the value of traversal value m exceeds the range, the traversal loop ends, and the position i and index of the qubit interacting with the current quantum gate in the quantum system are stored in the index table. The traversal step size is related to the position i of the qubit interacting with the current quantum gate in the quantum system. The increment value also varies; for each traversal value m, the increment value increases from 0 to i, increasing by 1 each time. The index interval refers to the interval between the first temporary index and the second temporary index, and the value of the index interval is related to the position i of the qubit interacting with the current quantum gate in the quantum system.

[0124] For the i-th qubit, the indices that need to be updated are the first temporary index `index1` and the second temporary index `index2`. The initial value of the traversal value `m` is set to 0, and the range of `m` is 0-2. n In this example, the range of m is 0-2. 32 The traversal step size increases by 2 each time. i+1 The index interval is 2. i The increment is k, and the range of the increment k is 0-i.

[0125] For each m, the inner loop iterates from 0 to 2. 32 That is, the range of m is from 0 to 2. 32 Each time, increase the traversal step size by 2. i +1 .

[0126] Therefore, index1 = m + k, and index2 = index1 + 2. i .

[0127] Next, the quantum simulator 100 constructs a mapping table based on the index pairs, which can be used by the quantum simulator.

[0128] Please refer to the following: Figure 9 In some embodiments, the quantum simulator 100 further includes a quantum state vector initialization module 30. The quantum state vector initialization module 30 is configured to initialize the quantum system using classical computing resources to obtain an initial quantum system, which includes quantum state vectors, in order to construct a mapping table based on the initial quantum system.

[0129] Specifically, the Quantum State Vector Initialization Module 30 uses classical computing resources to set the initial state of the qubit, which can be the ground state, a specific superposition state, or an entangled state.

[0130] In this embodiment of the application, the quantum state vector initialization module 30 can use classical computing resources to initialize the quantum system to obtain an initial quantum system. By initializing the quantum system, a foundation is provided for the simulation of quantum algorithms, so that the subspace mapping table 10 in the quantum simulator 100 can construct a mapping table based on the initial quantum system.

[0131] Thus, the quantum state vector initialization module 30 is responsible for using classical computing resources to initialize the quantum system, preparing for the construction of the mapping table.

[0132] Please refer to the following: Figure 10 In some embodiments, the quantum simulator 100 also includes a quantum state post-processing module 40.

[0133] The quantum state post-processing module 40 is configured to process the quantum state data to obtain simulation results.

[0134] Specifically, the Quantum State Post-processing Module 40 is responsible for managing and calculating the probability distribution of quantum state vectors. It processes quantum states after quantum gate transformations, ensuring that the sum of squares of the amplitudes is 1, and supports measurement operations to calculate the collapse probability of qubits.

[0135] In this embodiment of the application, the quantum state post-processing module 40 can process the quantum state data obtained after processing by the quantum gate module 20 to obtain simulation results.

[0136] In this way, the quantum simulator 100 processes quantum state data through the quantum state post-processing module 40, which can simulate the operation of a quantum computer and provide an important tool for the research and development of quantum computing.

[0137] Please refer to the following: Figure 11 In some embodiments, the quantum simulator 100 further includes a storage module 50. The storage module 50 is configured to store quantum state data and simulation results.

[0138] Specifically, the storage module 50 is responsible for storing the probability amplitude and phase information of the quantum state, supporting fast access and processing of quantum data. This storage module 50 provides the necessary data storage functions for the quantum computing simulator, supporting efficient data management and retrieval. The storage module 50 can store quantum state data and simulation results.

[0139] Thus, storage module 50 stores the large amount of quantum state data generated by the quantum simulator during quantum computing simulations. This data reflects the state of the qubits at different points in time, enabling the understanding and analysis of the quantum computing process. It also stores the simulation results, helping researchers analyze and compare different quantum algorithms and their performance under various conditions.

[0140] Please see Figure 12 The overall architecture of the quantum simulator 100 is shown in the figure. The quantum simulator 100 processes the input quantum system (32 qubits) as follows: After the input quantum system is input into the quantum simulator 100, firstly, the quantum state vector initialization module 30 initializes the quantum system, setting each qubit in the input quantum system to the initial state |0>. This means that in a quantum system of length 2... 32 In the complex vector, only the first element is set to 1, representing a probability of 100%, while the remaining elements are 0. Then, when the initialized input quantum system is first acted upon by a qubit gate, the subspace mapping table 10 pre-calculates the index pair corresponding to each qubit when acted upon by the quantum gate and stores the calculated index pairs in the subspace mapping table 10. Subsequently, when the quantum gate module 20 acts on the qubits in the initialized input quantum system, it directly obtains the quantum state vector to be changed from the subspace mapping table 10, without performing complex calculations. Next, after the quantum gate module 20 has processed the input quantum system, the quantum state post-processing module 40 observes the quantum state vectors, calculates the probability amplitude of each qubit, and determines the probability of them collapsing to the ground state |0> or |1>. The measurement module can simulate the quantum measurement process, providing the actual output of the state of each qubit. Finally, all measurement results are stored in the storage module 50 for subsequent data analysis and algorithm performance evaluation that may be needed.

[0141] In this specification, the terms "specifically," "furthermore," "particularly," "understandably," etc., refer to specific features, structures, materials, or characteristics described in connection with embodiments or examples that are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0142] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the function involved, as should be understood by those skilled in the art to which embodiments of this application pertain.

[0143] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.

Claims

1. A quantum simulator based on a subspace mapping table, characterized in that, The quantum simulator includes a quantum gate module. The subspace mapping table is configured to store a pre-built mapping table, wherein the mapping table is obtained through the following steps: setting an initial traversal value, a traversal step size, and an index interval; obtaining temporary index pairs based on the initial traversal value, the traversal step size, the index interval, the position i corresponding to the qubit, and an increment value, wherein i is a positive integer less than n, n is the number of qubits in the quantum system, and the increment value is less than or equal to i; obtaining the index pairs based on the temporary index pairs; and constructing the mapping table based on the index pairs. The quantum gate module is configured to simulate a qubit gate and access the mapping table to process the qubits in the quantum system according to the index in the mapping table to obtain quantum state data and thus obtain simulation results.

2. The quantum simulator according to claim 1, characterized in that, The process of obtaining a temporary index pair based on the initial traversal value, the traversal step size, the index interval, the position i corresponding to the qubit, and the increment value includes: The first temporary index in the temporary index pair is obtained based on the initial traversal value, the traversal step size, and the increment value.

3. The quantum simulator according to claim 2, characterized in that, The process of obtaining a temporary index pair based on the initial traversal value, the traversal step size, the index interval, the position i corresponding to the qubit, and the increment value includes: The second temporary index in the temporary index pair is obtained based on the first temporary index and the index interval.

4. The quantum simulator according to claim 1, characterized in that, The process of obtaining a temporary index pair based on the initial traversal value, the traversal step size, the index interval, the position i corresponding to the qubit, and the increment value includes: The next traversal value is obtained based on the initial traversal value and the traversal step size; If the next ergodic value is less than or equal to the maximum ergodic value, a temporary index pair is obtained based on the next ergodic value, the position i corresponding to the qubit, and the increment value. The maximum ergodic value is determined based on the number of qubits in the quantum system.

5. The quantum simulator according to claim 4, characterized in that, The step of obtaining the index pair based on the temporary index pair includes: If the next traversal value is greater than the maximum traversal value, the temporary index pair is confirmed as the index pair.

6. The quantum simulator according to claim 1, characterized in that, The quantum simulator also includes a quantum state vector initialization module; The quantum state vector initialization module is configured to initialize the quantum system using classical computing resources to obtain an initial quantum system, and to construct the mapping table based on the initial quantum system.

7. The quantum simulator according to claim 1, characterized in that, The quantum simulator also includes a quantum state post-processing module; The quantum state post-processing module is configured to process the quantum state data to obtain the simulation results.

8. The quantum simulator according to claim 7, characterized in that, The quantum simulator also includes a storage module; The storage module is configured to store the quantum state data and the simulation results.

Citation Information

Patent Citations

  • Quantum bit virtual mapping method and system

    CN108921296A

  • Simulation of quantum circuits

    CN111247538A