Continuous variable quantum key distribution method based on quantum k-nearest neighbor algorithm
By using the discrete modulation coherent state training and prediction of the quantum k-nearest neighbor algorithm, the problems of high device complexity and high time complexity in continuous variable quantum key distribution are solved, and efficient and secure key distribution is achieved.
Patent Information
- Application Number
- CN202310033932.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-10
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2043-01-10
AI Technical Summary
Existing continuous-variable quantum key distribution technologies have high equipment complexity when using Gaussian modulation and high time complexity when using discrete modulation, and the learning process is easily eavesdropped, making it difficult to meet the requirements of real-time performance and security.
A continuous-variable quantum key distribution method based on the quantum k-nearest neighbor algorithm is adopted. By preparing labeled and unlabeled discrete modulated coherent states, and combining quantum computing distance calculation and nearest neighbor search, training and prediction are performed. Quantum machine learning is used to improve the efficiency and security of key distribution.
It improves the key rate, enhances security and reliability, reduces computational complexity, and promptly terminates communication in the event of eavesdropping, ensuring secure key transmission.
Smart Images

Figure CN116318655B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the field of quantum communication, and particularly relates to a continuous variable quantum key distribution method based on a quantum k-neighbor algorithm. BACKGROUND
[0002] Quantum key distribution is a branch of quantum secure communication. According to the different signal sources used, quantum key distribution can be divided into discrete variable quantum key distribution and continuous variable quantum key distribution. Among them, continuous variable quantum key distribution has developed rapidly in recent years due to its higher code rate, easier signal source preparation, and compatibility with modern communication technologies, and has entered the practical promotion stage.
[0003] The signal modulation technology of continuous variable quantum key distribution can be divided into two types: one is continuous Gaussian modulation, and the other is discrete modulation. Gaussian modulation continuous variable quantum key distribution encodes information onto two orthogonal components of a coherent state, which is the most commonly used modulation method for continuous variable quantum key distribution technology. However, when considering specific implementation, Gaussian modulation technology often requires higher device sensitivity and more complex operations, making it more difficult to deploy. Discrete modulation continuous variable quantum key distribution discretely encodes information onto multiple non-orthogonal coherent states. This modulation technology is easier to implement, and the raw key data generated can be directly corrected using linear block error correction codes without the need for discrete multi-dimensional negotiation, simplifying the data post-processing steps and reducing device costs and resource consumption. Classical machine learning algorithms can be combined with discrete modulation continuous variable quantum key distribution technology to utilize the powerful learning and prediction capabilities of machine learning algorithms, enabling the key distribution system to further distinguish abnormal signal states caused by attacks, thereby reducing the probability of successful eavesdropping by attackers and achieving the purpose of improving the final code rate and ensuring secure key distribution.
[0004] The classical k-neighbor algorithm belongs to the classification algorithm in machine learning. By adding this algorithm, the communication parties can freely agree on their encoding rules, which is the learning process, and ensure that this process is not eavesdropped by attackers. After completing the learning process securely, the receiver Bob can predict the quantum states sent by the sender Alice through the characteristics of coherent quantum states, which is the prediction process. After completing the prediction process, the two parties perform data post-processing on the two raw key strings obtained, thereby obtaining the same key.
[0005] However, when the feature dimension of quantum states and the number of samples increase, the time consumed by the k-neighbor algorithm will increase dramatically, resulting in an almost unacceptable time complexity, which cannot meet the real-time quantum key distribution requirements. In addition, the communication parties must ensure that the learning process is not eavesdropped during learning, but this condition is difficult to meet. SUMMARY
[0006] The application aims to provide a continuous variable quantum key distribution method based on quantum k-neighbor algorithm, which has higher key rate, better security and higher reliability.
[0007] The continuous variable quantum key distribution method based on quantum k-neighbor algorithm provided by the application comprises the following steps:
[0008] S1. The sending end prepares discrete modulation coherent states with labels and sends them to the receiving end;
[0009] S2. The receiving end measures and extracts features of the received coherent states, and encodes the extracted features into quantum states; these coherent states with labels are called a training sample set;
[0010] S3. The receiving end uses a part of the coherent states as a training set and a test set respectively to train a suitable quantum k-neighbor algorithm classifier model, and completes a coherent state learning process;
[0011] S4. The sending end prepares discrete modulation coherent states without labels and sends them to the receiving end;
[0012] S5. The receiving end measures and extracts features of the received coherent states, and encodes the extracted features into quantum states; these coherent states without labels are called a sample set to be classified;
[0013] S6. The receiving end adopts the trained quantum k-neighbor algorithm classifier model to predict the sample set to be classified obtained in step S4, and completes a coherent state prediction process;
[0014] S7. The receiving end performs several rounds of prediction to obtain a string of original keys;
[0015] S8. The receiving end and the sending end perform post-processing to finally obtain two strings of identical keys, and complete the continuous variable quantum key distribution based on the quantum k-neighbor algorithm.
[0016] The continuous variable quantum key distribution method based on the quantum k-neighbor algorithm further comprises the following steps:
[0017] In the coherent state learning or coherent state prediction process, if an attacker performs eavesdropping, the sending end and the receiving end will find it and perform corresponding processing; the processing includes discarding the stolen keys or terminating the communication.
[0018] The sending end prepares discrete modulation coherent states with labels and sends them to the receiving end in step S1, which specifically comprises the following steps:
[0019] The sending end prepares a discrete modulation coherent state with a label, sends it to the receiving end through a lossy quantum channel, and sends the corresponding label to the receiving end through a classical channel; the label is a binary string modulated by n states, and n is a positive integer.
[0020] The receiving end in step S2 measures and extracts features of the received coherent state, and encodes the extracted features into a quantum state, specifically, an superposition quantum state Store the feature information of the training sample set, where M is the number of training sample sets, v j is the feature vector of the training sample, D is the feature dimension of the feature vector, and v ji is the i-th feature value of the vector v j .
[0021] The sending end in step S4 prepares a discrete modulation coherent state without a label, and sends it to the receiving end, specifically, the sending end prepares a discrete modulation coherent state without a label, and sends it to the receiving end through a lossy quantum channel.
[0022] The receiving end in step S5 measures and extracts features of the received coherent state, and encodes the extracted features into a quantum state, specifically, an superposition quantum state Store the information of the sample set to be classified, where v0 is the feature vector of the sample to be classified, and v 0i is the i-th feature value of the vector v0.
[0023] The process of coherent state prediction in step S6, specifically includes distance calculation, nearest neighbor search and classification prediction.
[0024] The distance calculation and nearest neighbor search, specifically include the following steps:
[0025] The distance calculation and nearest neighbor search are completed by quantum calculation;
[0026] The distance calculation specifically includes the following steps:
[0027] For any two quantum states, the distance between the quantum states is measured by the fidelity between the quantum states; the fidelity of the training sample set and the sample set to be classified is obtained by using a quantum control swap gate c-SWAP circuit, SWAP(|φ>|ψ>) = |ψ>|φ>, wherein SWAP(|φ>|ψ>) is a unitary gate exchange operation, |ψ> is a quantum state for storing the characteristics of the training sample set, and |φ> is a quantum state for storing the characteristics of the sample set to be classified; the c-SWAP circuit adds an input of a quantum bit on the top of the SWAP gate, and when the bit is |0>, the function of the SWAP gate is not executed, and when the bit is |1>, the function of the SWAP gate is executed;
[0028] Finally, the first quantum bit of the measurement circuit is measured, and the probability of the measurement result being |0> is P(0) = (1 + |<φ|ψ>| 2 ) / 2, <φ|ψ> is an inner product;
[0029] The calculation formula of the fidelity of the two quantum states is F(φ, ψ) = |<φ|ψ>| 2 , and the fidelity calculation formula is F(φ, ψ) = 2P(0) - 1;
[0030] The greater the fidelity, the greater the similarity between the two, and the closer the distance;
[0031] After the distance is calculated and the distance is encoded into a quantum state, the quantum state is a superposition state, and is represented as |σ> = M -1 / 2 ∑ j |j>||v j -v0|> wherein M is the number of training sample sets, |j> is a quantum state for storing j as a binary string, and ||v j -v0|> is a quantum state containing a quantum bit string representing the distance.
[0032] The nearest neighbor search specifically includes the following steps:
[0033] The nearest neighbor search is performed based on a quantum minimum search algorithm; after the distance is calculated and the distance is encoded into a quantum state, k nearest neighbors are found; the specific steps include:
[0034] Randomly select k distances from the distance quantum state |σ> as a set K;
[0035] Find the minimum distance V min outside the set K by using a quantum minimum search algorithm; max If the maximum distance K min in the set K is greater than V min , then K max is replaced; otherwise, it is not replaced;
[0036] Repeat the above step until K max is less than Vmin ;
[0037] The search of the minimum distance set K is completed, and k nearest neighbor points are obtained.
[0038] The receiving end adopts heterodyne measurement, and the calculation formula of mutual information of the sending end and the receiving end in the heterodyne measurement is:
[0039]
[0040] In the formula, V is the variance of the two-mode squeezed state, and V=V m +1, V m is the modulation variance of the sending end; χ tot is the total noise of the channel, and ξ is the excess noise, v el is the detector electronic noise, η is the detector efficiency, T is the channel transmission efficiency, and T=10 -0.02L , and L is the transmission distance.
[0041] The key rate K is calculated by using the following formula: Q :
[0042] K Q =βΛ Q I AB -p(y i )χ BE
[0043] In the formula, β is the negotiation efficiency; Λ Q is the accuracy rate when the quantum state is predicted by using the quantum k-nearest neighbor algorithm; p(y i ) is the probability that y i is measured by the receiving end, when n-state modulation is adopted, χ BE is the mutual information of the eavesdropper and the receiving end, and S(ρ E ) is the von Neumann entropy of the quantum state ρ E , is the auxiliary quantum state of the eavesdropper, and
[0044] The continuous variable quantum key distribution method based on the quantum k-nearest neighbor algorithm provided by the application applies the quantum k-nearest neighbor algorithm in quantum machine learning to discrete modulation continuous variable quantum key distribution, classifies and predicts the discrete modulation coherent state, improves the efficiency of data processing, and at the same time improves the secure transmission distance and the key rate of the continuous variable quantum key distribution; therefore, the method has a higher key rate, better security and higher reliability. BRIEF DESCRIPTION OF DRAWINGS
[0045] Figure 1 is a method flowchart of the method of the application.
[0046] Figure 2 Performance comparison between the method of the present application and the prior art.
[0047] Figure 3 Query complexity comparison between the method of the present application and the prior art. DETAILED DESCRIPTION
[0048] As Figure 1 shown is a method flowchart of the method of the present application: the continuous variable quantum key distribution method based on the quantum k-nearest neighbor algorithm provided by the present application includes the following steps (the "quantum state" described below is the quantum state used in the quantum k-nearest neighbor algorithm, and the "coherent state" is the quantum state used to generate the key in the quantum key distribution) :
[0049] S1. The sending end prepares a discrete modulation coherent state with a label and sends it to the receiving end; specifically including the following steps:
[0050] The sending end prepares a discrete modulation coherent state with a label and sends it to the receiving end through a lossy quantum channel, and sends the corresponding label to the receiving end through a classical channel; the label is a binary string modulated by n states, and n is a positive integer set;
[0051] S2. The receiving end measures and extracts features from the received coherent state, and encodes the extracted features into a quantum state; these coherent states with labels are called a training sample set; specifically, the extracted features are encoded into a quantum state, specifically, an superposition quantum state is prepared Store the feature information of the training sample set, where M is the number of training sample sets, v j is the feature vector of the training sample, D is the feature dimension of the feature vector, and v ji is the i-th feature value of the vector v j
[0052] S3. The receiving end uses a part of the coherent state as a training set and a test set, respectively, to train a suitable quantum k-nearest neighbor algorithm classifier model, and completes the coherent state learning process;
[0053] S4. The sending end prepares a discrete modulation coherent state without a label and sends it to the receiving end; specifically, the sending end prepares a discrete modulation coherent state without a label and sends it to the receiving end through a lossy quantum channel;
[0054] S5. The receiving end measures and extracts features from the received coherent state, and encodes the extracted features into a quantum state; these coherent states without labels are called a sample set to be classified; specifically, the extracted features are encoded into a quantum state, specifically, a superposition quantum state is prepared Store the information of the sample set to be classified, where v0 is the feature vector of the sample to be classified, v 0i is the i-th feature value of the vector v0
[0055] S6. The receiving end uses the trained quantum k-nearest neighbor algorithm classifier model to classify the sample set to be classified obtained in step S5, to complete the process of coherent state prediction; the coherent state prediction process specifically includes distance calculation, nearest neighbor search and classification prediction;
[0056] The distance calculation and nearest neighbor search are completed by quantum calculation;
[0057] The distance calculation specifically includes the following steps:
[0058] For any two quantum states, the distance between the quantum states is measured by the fidelity between the quantum states; the fidelity of the training sample set and the sample set to be classified is obtained by using a quantum control swap gate c-SWAP circuit, SWAP(|φ>|ψ>) = |ψ>|φ>, where SWAP(|φ>|ψ>) is a unitary gate exchange operation, |ψ〉 is a quantum state storing the features of the training sample set, and |φ〉 is a quantum state storing the features of the sample set to be classified; the c-SWAP circuit adds an input of a quantum bit on the top of the SWAP gate, and when the bit is |0>, the SWAP gate does not perform the function, and when the bit is |1>, the SWAP gate performs the function;
[0059] Finally, the first quantum bit of the measurement circuit is measured, and the probability of the measurement result being |0> is P(0) = (1 + |<φ|ψ>| 2 ) / 2, <φ|ψ> is an inner product;
[0060] The calculation formula of the fidelity of two quantum states is F(φ, ψ) = |<φψ>| 2 , and the fidelity calculation formula is F(φ, ψ) = 2P(0) - 1;
[0061] The greater the fidelity, the greater the similarity between the two, and the closer the distance;
[0062] After the distance is calculated and encoded into a quantum state, the quantum state is a superposition state, represented as |σ> = M -1 / 2 ∑ j |j>||v j -v0|>, where M is the number of training set samples, |j> is a quantum state storing j as a binary string, and ||v j -v0|> is a quantum state containing a quantum bit string representing the distance;
[0063] The nearest neighbor search specifically includes the following steps:
[0064] Nearest neighbor search is performed based on the quantum minimum search algorithm; after calculating the distance and encoding it into a quantum state, k nearest neighbors are found; the specific steps include:
[0065] Choose k arbitrary distances from the distance quantum state |σ> as a set K;
[0066] Use the quantum minimum search algorithm to find the minimum distance V outside set K. min If the maximum distance K in set K max >V min Then V min K max Replace; otherwise, do not replace.
[0067] Repeat the previous step until K. max <V min ;
[0068] The search for the minimum distance set K is complete, yielding k nearest neighbor points;
[0069] S7. The receiving end performs several rounds of prediction to obtain a string of original keys;
[0070] S8. The receiver and transmitter perform post-processing to obtain two identical keys, thus completing the continuous variable quantum key distribution based on the quantum k-nearest neighbor algorithm.
[0071] In the continuous variable quantum key distribution method based on the quantum k-nearest neighbor algorithm provided by this invention, if an attacker eavesdrops during the coherent state learning or coherent state prediction process, the coherent state must be measured to extract features. According to the no-cloning theorem and the Heisenberg uncertainty principle, this behavior will be detected by the sender and receiver and will be dealt with accordingly. The processing includes discarding the stolen key or terminating the communication.
[0072] In the method of this invention, the receiving end employs heterodyne measurement. In heterodyne measurement, the formula for calculating the mutual information between the transmitting and receiving ends is:
[0073]
[0074] In the formula, V is the variance of the two-mode compressed state, and V = V m +1, V m χ represents the modulation variance at the transmitting end. tot The total noise of the channel and ξ represents excessive noise, v el Let η be the detector electronic noise, η be the detector efficiency, and T be the channel transmission efficiency, where T = 10. -0.02L L is the transmission distance;
[0075] The key rate K is calculated using the following formula. Q :
[0076] K Q = βΛ Q I AB -p(y i )χ BE
[0077] where β is the negotiation efficiency; Λ Q is the accuracy rate when predicting the quantum state by using the quantum k-neighbor algorithm; p(y i ) is the probability of the measurement result of the receiving end being y i , when using n-state modulation, χ BE is the mutual information of the eavesdropper and the receiving end, and S(ρ E ) is the von Neumann entropy of the quantum state ρ E , ρ E|yi is the auxiliary quantum state of the eavesdropper and
[0078] Generally, when the sending end and the receiving end communicate, the discrete coherent state has a fixed corresponding classical label, and this information is public; due to the coherent state learning process, the sending end and the receiving end can redefine the relationship between the discrete coherent state and the classical label, for example, in the 4-state protocol, |α0>, |α1>, |α2> and |α3> represent 11, 01, 00 and 10 respectively, so even if the eavesdropper intercepts the coherent state, he does not know the corresponding label and can only make a guess, and the probability of correct guessing is
[0079] Comparing the formula K Q = βΛ Q I Q -p(y AB )χ i for calculating the key rate K BE in the method of the application with the key rate calculation formula K = βI AB -χ BE of the traditional method, it can be obviously seen that the application greatly improves the key rate by reducing the amount of information that can be stolen by the eavesdropper.
[0080] Meanwhile, compared with using the classical k-neighbor algorithm to improve the key rate, the quantum k-neighbor algorithm used in the method of the application can greatly reduce the time complexity of the calculation. In quantum calculation, the time complexity is replaced by the query complexity because the Oracle needs to be queried. For M training set vectors with N-dimensional features, the time complexity of the classical k-neighbor algorithm is O(NM), and the time complexity of the quantum k-neighbor algorithm is The analysis is as follows:
[0081] For the classical k-NN algorithm, it needs to traverse all the training set samples to calculate the distance, and the time complexity is O(M), while for the vector with N-dimensional features, the time complexity of calculating the distance is O(N), so the total time complexity is O(NM).
[0082] For the quantum k-NN algorithm, the time complexity is concentrated in encoding the distance information into the quantum state and searching for k nearest neighbors. First, R times of Grover iteration is needed to realize amplitude estimation to encode the distance information into the quantum state |σ>, and second, k times of queries are needed to find k nearest neighbors, so the total time complexity is
[0083] For the coherent state learning and coherent state prediction process that needs a large data set, i.e. M is very large, the time complexity of the quantum k-NN algorithm is significantly reduced, which can effectively improve the efficiency of data processing.
[0084] The method of the present application is compared with the prior art as follows:
[0085] The semi-definite programming (SDP) method is used to compare the key rate of different schemes and protocols with the change of transmission distance, and the comparison result is shown in Figure 2 The solid lines (line 4, line 5 and line 6) are the existing continuous variable quantum key distribution protocol, the dashed lines (line 1, line 2 and line 3) are the scheme proposed in the present application, and line 7 is the PLOB limit. The parameters used are: detector efficiency η = 0.6, electronic noise v el = 0.05, excess noise ξ = 0.01, negotiation efficiency β = 0.98, and prediction accuracy Λ Q = 0.8906. It can be seen that compared with the existing traditional continuous variable quantum key distribution protocol, the scheme proposed in the present application greatly improves the key rate. Figure 2
[0086] Figure 3 The query complexity comparison diagram of the classical k-NN algorithm and the quantum k-NN algorithm is shown in Figure 3 It can be seen that as the number of training set vectors increases, the complexity of the quantum k-NN algorithm increases at a significantly slower rate than the classical k-NN algorithm, which can significantly improve the efficiency of data processing and reduce the time consumption of the quantum key distribution system based on machine learning.
Claims
1. A continuous-variable quantum key distribution method based on the quantum k-nearest neighbor algorithm, comprising the following steps: S1. The transmitting end prepares a tagged discrete modulated coherent state and sends it to the receiving end; S2. The receiving end measures and extracts features from the received coherent states, and encodes the extracted features into quantum states. These labeled coherent states are called the training sample set. S3. The receiving end uses a portion of the coherent states as the training set and the test set, respectively, to train a suitable quantum k-nearest neighbor algorithm classifier model and complete the coherent state learning process; S4. The transmitting end prepares an untagged discrete modulated coherent state and sends it to the receiving end; S5. The receiving end measures and extracts features from the received coherent states, and encodes the extracted features into quantum states. These unlabeled coherent states are called the sample set to be classified. S6. The receiving end uses a trained quantum k-nearest neighbor algorithm classifier model to predict the sample set to be classified obtained in step S4, thus completing the process of coherent state prediction. S7. The receiving end performs several rounds of prediction to obtain a string of original keys; S8. The receiver and transmitter perform post-processing to obtain two identical keys, thus completing the continuous variable quantum key distribution based on the quantum k-nearest neighbor algorithm.
2. The continuous variable quantum key distribution method based on the quantum k-nearest neighbor algorithm according to claim 1, characterized in that... The continuous variable quantum key distribution method based on the quantum k-nearest neighbor algorithm further includes the following steps: If an attacker eavesdrops during coherent state learning or coherent state prediction, the sender and receiver will detect it and take corresponding actions; these actions include discarding the stolen key or terminating communication.
3. The continuous variable quantum key distribution method based on the quantum k-nearest neighbor algorithm according to claim 2, characterized in that... Step S1, which involves the transmitter preparing a tagged discrete modulated coherent state and transmitting it to the receiver, specifically includes the following steps: The transmitting end prepares a tagged discrete modulated coherent state and sends it to the receiving end through a lossy quantum channel, and sends the corresponding tag to the receiving end through a classical channel; the tag is a binary string modulated by n-state, where n is a set positive integer.
4. The continuous variable quantum key distribution method based on the quantum k-nearest neighbor algorithm according to claim 3, characterized in that... Step S2 describes the receiving end measuring and extracting features from the received coherent state, and encoding the extracted features into a quantum state. Specifically, encoding the extracted features into a quantum state involves preparing a superposition quantum state. Store the feature information of the training sample set, where M is the number of training samples, and v j Let v be the feature vector of the training sample, D be the feature dimension of the feature vector, and v be the feature vector of the training sample. ji For vector v j The i-th eigenvalue.
5. The continuous variable quantum key distribution method based on the quantum k-nearest neighbor algorithm according to claim 4, characterized in that... In step S4, the transmitting end prepares an untagged discrete modulation coherent state and sends it to the receiving end. Specifically, the transmitting end prepares an untagged discrete modulation coherent state and sends it to the receiving end through a lossy quantum channel.
6. The continuous variable quantum key distribution method based on the quantum k-nearest neighbor algorithm according to claim 5, characterized in that... Step S5 describes the receiving end measuring and extracting features from the received coherent state, and encoding the extracted features into a quantum state. Specifically, encoding the extracted features into a quantum state means preparing a superposition quantum state. Store the information of the sample set to be classified, where v0 is the feature vector of the sample to be classified, v 0i Let be the i-th eigenvalue of vector v0.
7. The continuous variable quantum key distribution method based on the quantum k-nearest neighbor algorithm according to claim 6, characterized in that... The coherent state prediction process described in step S6 specifically includes distance calculation, nearest neighbor search, and classification prediction.
8. The continuous variable quantum key distribution method based on the quantum k-nearest neighbor algorithm according to claim 7, characterized in that... The distance calculation and nearest neighbor search specifically include the following steps: Distance calculation and nearest neighbor search are performed using quantum computing; Distance calculation specifically includes the following steps: For any two quantum states, the distance between them is measured by the fidelity between the quantum states. A quantum-controlled swapping gate c-SWAP circuit is used to obtain the fidelity between the training sample set and the sample set to be classified, SWAP(|φ>|ψ>)=|ψ>|φ〉, where SWAP(|φ〉|ψ〉) is a unitary gate swapping operation, |ψ> is the quantum state storing the features of the training sample set, and |φ〉 is the quantum state storing the features of the sample set to be classified. The c-SWAP circuit adds a qubit input at the top of the SWAP gate. When the bit is |0>, the SWAP gate function is not executed, and when the bit is |1>, the SWAP gate function is executed. Finally, the probability that the measurement result of the first qubit of the measurement circuit is |0> is P(0)=(1+|<φ|ψ>| 2 ) / 2, where <φ|ψ> is the inner product; The formula for calculating the fidelity between two quantum states is F(φ,ψ)=|<φ|ψ>| 2 The fidelity calculation formula is F(φ,ψ)=2P(0)-1; The higher the fidelity, the greater the similarity between the two, and the closer they are. After calculating the distance and encoding it into a quantum state, which is a superposition state, it is represented as |σ>=M -1 / 2 ∑ j |j>||v j -v0|>, where M is the number of training set samples, |j> is the quantum state where j is stored as a binary string, and ||v j -v0|> represents a quantum state containing a string of qubits representing the distance.
9. The continuous variable quantum key distribution method based on the quantum k-nearest neighbor algorithm according to claim 8, characterized in that... Nearest neighbor search specifically includes the following steps: Nearest neighbor search is performed based on the quantum minimum search algorithm; after calculating the distance and encoding it into a quantum state, k nearest neighbors are found; the specific steps include: Choose k arbitrary distances from the distance quantum state |σ> as a set K; Use the quantum minimum search algorithm to find the minimum distance V outside set K. min If the maximum distance K in set K max >V min Then V min K max Replace; otherwise, do not replace. Repeat the previous step until K. max <V min ; The search for the minimum distance set K is complete, yielding k nearest neighbor points; The receiver uses heterodyne measurement. In heterodyne measurement, the formula for calculating the mutual information between the transmitter and receiver is: In the formula, V is the variance of the two-mode compressed state, and V = V m +1, V m χ represents the modulation variance at the transmitting end. tot The total noise of the channel and ξ represents excessive noise, v el Let η be the detector electronic noise, η be the detector efficiency, and T be the channel transmission efficiency, where T = 10. -0.02L L is the transmission distance; The key rate K is calculated using the following formula. Q : K Q =βΛ Q I AB -p(y i )x BE In the formula, β represents the negotiation efficiency; Λ Q p(y) represents the accuracy of predicting quantum states using the quantum k-nearest neighbor algorithm. i ) is the measurement obtained by the receiver. i The probability of this when n-state modulation is used. χ BE For the mutual information between the eavesdropping party and the receiving party, and S(ρ) E ) is the quantum state ρ E von Neumann entropy, For the eavesdropping party's subordinate quantum state and