Coding error detection device and method for QKD system
By adopting the combination of optical path switching and detection modules in the QKD system, the problems of low coding error detection efficiency and high operation difficulty in the prior art are solved, and efficient detection and real-time adjustments are realized to adapt to different coding methods, reducing costs and complexity sex.
Patent Information
- Application Number
- CN202411266571.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-11
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-09-11
AI Technical Summary
The coding error detection scheme of the existing QKD system has low detection efficiency, low compatibility, high equipment cost, high operation difficulty, and different encoding methods require different detection environments, making it difficult to achieve efficient detection and real-time adjustment of coding errors.
Using an encoding error detection device including a first optical path, a second optical path and a third optical path, the optical path is switched through the first optical switching module and the second optical switching module, combined with an unequal arm interferometer and a polarization beam splitter, according to the QKD system The encoding method switches the optical path, uses the detection module and control module to calculate the encoding error, and simplifies the operation process.
Implement coding error detection suitable for different encoding methods, reduce detection costs, improve detection efficiency, simplify operation difficulty, avoid double loading of electrical signals on round-trip optical signals, and ensure the accuracy and real-time detection. .
Smart Images

Figure CN118802009B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of quantum communication technology, and in particular to a coding error detection device, method, quantum communication system, storage medium and electronic equipment for a QKD system. Background Art
[0002] The Quantum Key Distribution (QKD) system is a core branch of quantum information science. It uses the principles of quantum mechanics to achieve secure communication key distribution, ensuring that even if the information is captured, the communicating parties cannot have their keys stolen by a third party. The special thing about the QKD system is that its security is based on the physical properties of the quantum state, such as quantum addition and the non-cloning principle. The advantages of the QKD system include: Theoretical unconditional security: Based on the principles of quantum mechanics, any eavesdropping will be detected because the eavesdropper must measure the quantum system, thereby changing the quantum state, which the sender and receiver will notice.
[0003] A complete QKD system consists of two parts: the transmitter and the receiver. The transmitter needs to encode the quantum state. The existing mainstream encoding methods are mainly polarization encoding, phase encoding and time-phase encoding. In actual systems, encoding is usually achieved using unequal-arm interferometers (such as MZ interferometers, FM interferometers and sagnac interferometers). Due to the imperfection of the device or the influence of external environmental noise, the actual quantum state encoding is not the encoding state required by the BB84 protocol, that is, the encoding state is not completely accurate and has a certain deviation. However, when the deviation is too large, the bit error rate of the QKD system will increase, the secure coding rate will decrease, or even the coding will not be possible. In the existing coding error detection scheme, when the coding method is polarization coding, the coding error is detected by detecting the polarization angle through a polarization analyzer; when the coding method is phase coding, the coding error is detected by adding a reflector at the output end of the encoder to interfere with the input optical pulse and the return optical pulse. The timing of the optical signal and the electrical signal needs to be strictly aligned. Different test environments must be built for encoders with different modulation frequencies, and the requirements for the test environment construction are high. It can be seen that in the existing coding error detection scheme, different coding methods use different detection schemes. One detection scheme is only applicable to one coding method, with low detection efficiency, poor compatibility, high equipment cost, and the need to load two electrical signals on the round-trip pulse optical signal at the same time, which is difficult to operate. Therefore, it is particularly important to achieve efficient detection of the coding error of the QKD system and simplify the operational difficulty of detecting the coding error of the QKD system. When the coding error of the QKD system is detected to be too large, it can be adjusted in real time to avoid large coding errors in the QKD system. Summary of the invention
[0004] The embodiments of the present invention provide a coding error detection device, method, storage medium and electronic device for a QKD system, so as to at least partially solve the defects in the prior art.
[0005] In order to achieve the above-mentioned purpose, the coding error detection device, method, quantum communication system, storage medium and electronic device for the QKD system provided by the embodiments of the present invention adopt the following technical solutions:
[0006] In a first aspect, a coding error detection device for a QKD system provided by an embodiment of the present invention includes:
[0007] The first optical path includes an unequal-arm interferometer.
[0008] The second optical path includes a polarization beam splitter.
[0009] The third optical path includes a first optical switching module and a second optical switching module.
[0010] A detection module is used to detect single photons output by the second optical switching module and obtain a count of the single photons, wherein the input end of the first optical switching module is optically connected to the output end of the QKD system transmitting end, and the output end of the second optical switching module is optically connected to the input end of the detection module.
[0011] The control module is electrically connected to the first optical switching module, the second optical switching module and the detection module, respectively, and is used to control the first optical switching module and the second optical switching module according to the encoding method of the transmitting end of the QKD system, and switch the first optical switching module and the second optical switching module to the first optical path, the second optical path or the third optical path.
[0012] The control module is further used to calculate the coding errors of different coding states under different coding modes based on the counting of the single photons.
[0013] In some examples, the control module is further configured to:
[0014] When the encoding method of the transmitting end of the QKD system is polarization encoding, the first optical switching module and the second optical switching module are controlled so that the first optical switching module and the second optical switching module are optically connected to the polarization beam splitter respectively, and the first optical switching module and the second optical switching module are switched to the second optical path.
[0015] In some examples, the control module is further configured to:
[0016] When the encoding method of the transmitting end of the QKD system is phase encoding, the first optical switching module and the second optical switching module are controlled so that the unequal-arm interferometer is optically connected to the first optical switching module and the second optical switching module respectively, and the first optical switching module and the second optical switching module are switched to the first optical path.
[0017] In some examples, the control module is further configured to:
[0018] When the encoding method of the QKD system transmitter is time encoding, the first optical switching module and the second optical switching module are controlled to optically connect the first optical switching module with the second optical switching module, and the first optical switching module and the second optical switching module are switched to the third optical path.
[0019] In some examples, an adjustable delay device is provided on one arm of the unequal-arm interferometer, and the adjustable delay device is used to adjust the optical path difference between the pulsed lights input into the two arms of the unequal-arm interferometer, so that the optical path difference between the pulsed lights input into the two arms of the unequal-arm interferometer is consistent with the optical path difference between the pulsed lights output from the two arms of the unequal-arm interferometer.
[0020] In a second aspect, an embodiment of the present invention provides a coding error detection method for a coding error detection device for a QKD system based on the first aspect, the execution subject is a control module, and includes the following steps:
[0021] Get the encoding method of the QKD system sender.
[0022] When it is determined that the encoding method of the transmitting end of the QKD system is polarization encoding, the first optical switching module and the second optical switching module are controlled so that the first optical switching module and the second optical switching module are optically connected to the polarization beam splitter respectively, and the first optical switching module and the second optical switching module are switched to the second optical path.
[0023] When it is determined that the encoding method of the transmitting end of the QKD system is phase encoding, the first optical switching module and the second optical switching module are controlled so that the unequal-arm interferometers are optically connected to the first optical switching module and the second optical switching module respectively, and the first optical switching module and the second optical switching module are switched to the first optical path.
[0024] When it is determined that the encoding method of the QKD system transmitter is time encoding, the first optical switching module and the second optical switching module are controlled to make the first optical switching module optically connected to the second optical switching module, and the first optical switching module and the second optical switching module are switched to the third optical path.
[0025] In a third aspect, a quantum communication system provided by an embodiment of the present invention includes a QKD system transmitter, a QKD system receiver, and a coding error detection device for a QKD system disclosed in the first aspect.
[0026] In a fourth aspect, a computer-readable storage medium disclosed in an embodiment of the present invention stores a computer program, and the computer program is used to execute the coding error detection method disclosed in the second aspect.
[0027] In a fifth aspect, an electronic device disclosed in an embodiment of the present invention includes:
[0028] processor;
[0029] a memory for storing instructions executable by the processor;
[0030] The processor is used to read the executable instructions from the memory and execute the instructions to implement the coding error detection method disclosed in the second aspect.
[0031] Compared with the prior art, the coding error detection device, method, storage medium and electronic device for a QKD system provided by the embodiments of the present invention have the following beneficial effects:
[0032] (1) By adopting the first optical switching module and the second optical switching module, it is only necessary to simply switch the optical path to be applicable to the detection of coding errors of QKD systems with different coding methods. There is no need to build different detection environments for different coding methods, and no expensive testing equipment is required, which reduces the detection cost and improves the detection efficiency.
[0033] (2) It avoids the need for the electrical signal in the existing scheme to load voltage twice on the round-trip optical signal at the same time, reduces the difficulty of timing adjustment, and simplifies the difficulty of operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] 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 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.
[0035] Figure 1 A schematic diagram of the structure of a coding error detection device for a QKD system provided in an embodiment of the present invention.
[0036] Figure 2 A schematic flow chart of a coding error detection method for a QKD system provided in an embodiment of the present invention.
[0037] Figure 3The figure is a block diagram of the structural principle of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0039] Example 1 Figure 1 As shown, the coding error detection device for a QKD system provided by an embodiment of the present invention includes:
[0040] The first optical path includes an unequal-arm interferometer, wherein the first optical path is used to detect a phase coding error at a transmitting end of a QKD system.
[0041] Specifically, the unequal-arm interferometer includes two beam splitters BS, and an adjustable delay device is provided on one arm of the unequal-arm interferometer, and the adjustable delay device is used to adjust the optical path difference between the pulse light signals input into the two arms of the unequal-arm interferometer. When detecting the phase coding error of the QKD system transmitter, the control module is used to set different delays for the adjustable delay device, so that the optical path difference between the pulse light signals input into the two arms of the unequal-arm interferometer is consistent with the optical path difference between the pulse light signals output from the two arms of the unequal-arm interferometer, that is, the optical path difference between the pulse light signals output from the two arms of the unequal-arm interferometer in the encoder at the QKD system transmitter is consistent with the optical path difference between the pulse light signals output from the two arms of the unequal-arm interferometer in the coding error detection device for the QKD system provided in the embodiment of the present invention, that is, the interference effect generated by the unequal-arm interferometer is consistent with the interference effect generated by the unequal-arm interferometer in the QKD system transmitter, thereby ensuring the accuracy of the detection result. The control module is used to adjust the gating signal of the single-photon detector so that the single-photon detector can detect the counting information of single photons in different phase coding states and obtain the accurate coding error of the phase coding at the transmitting end of the QKD system through the formula calculation of quantum optics theory based on the counting information and display the coding error in the upper computer interface. Among them, the adjustable delay device can be an optical fiber delay line of different lengths or a directly electric optical fiber delay device.
[0042] Specifically, when the delay between the pulse light signals output by the two arms of the unequal-arm interferometer in the encoder at the transmitting end of the QKD system is 1ns, it is only necessary to set the delay of the adjustable delay device to 1ns through the control module. At this time, the delay between the pulse light signals output by the two arms of the unequal-arm interferometer is also 1ns, and interference is generated at the output end of the unequal-arm interferometer after passing through the same optical path difference.
[0043] Specifically, the unequal-arm interferometer is an MZ interferometer, and may also be an FM interferometer.
[0044] The second optical path includes a polarization beam splitter PBS, wherein the second optical path is used to detect the polarization coding error at the transmitting end of the QKD system.
[0045] Specifically, when a pulse light signal containing H polarization state and V polarization state is received, the polarization beam splitter PBS only allows the pulse light signal of H (or V) polarization state to pass. Take H polarization state as an example, that is, the single photon detector can only detect the pulse light signal of H polarization state. When detecting the polarization coding error of the QKD transmitter, for the pulse light signal encoded as H polarization state, the count CH obtained by the single photon detector is recorded. For the pulse light signal encoded as V polarization state, the count Cv obtained by the single photon detector is recorded. When encoded as P or N polarization state, the single photon detector counts CP or CN at this time, and tests the dark count Cd of the single photon detector. The control module obtains accurate coding error based on the counting information obtained by the single photon detector under different polarization coding states and based on the counting information, through the formula of quantum optics theory, and displays the coding error in the upper computer interface.
[0046] The third optical path includes a first optical switching module and a second optical switching module.
[0047] A detection module is used to detect single photons output by the second optical switching module and obtain a count of the single photons, wherein the input end of the first optical switching module is optically connected to the output end of the QKD system transmitting end, and the output end of the second optical switching module is optically connected to the input end of the detection module.
[0048] The control module is electrically connected to the first optical switching module, the second optical switching module and the detection module, respectively, and is used to control the first optical switching module and the second optical switching module according to the encoding method of the transmitting end of the QKD system, and switch the first optical switching module and the second optical switching module to the first optical path, the second optical path or the third optical path.
[0049] Specifically, the control module obtains the count of single photons detected by the single-photon detector in real time, and sets the delay value of the gate signal delay device in the single-photon detector according to the frequency of the pulse light signal output by the QKD system transmitter, and delays the synchronization light output by the QKD system transmitter until the single-photon detector finds the maximum detection count. At this time, the gate signal of the single-photon detector is time synchronized with the pulse light signal to be detected.
[0050] The control module is also used to calculate the coding errors of different coding states under different coding modes based on the counting of single photons.
[0051] In some examples, the control module is specifically configured to:
[0052] When the encoding method of the QKD system transmitting end is polarization encoding, the first optical switching module and the second optical switching module are controlled so that the first optical switching module and the second optical switching module are optically connected to the polarization beam splitter respectively, and the first optical switching module and the second optical switching module are switched to the second optical path.
[0053] In some examples, the control module is further configured to:
[0054] When the encoding method of the transmitting end of the QKD system is phase encoding, the first optical switching module and the second optical switching module are controlled so that the unequal-arm interferometers are optically connected to the first optical switching module and the second optical switching module respectively, and the first optical switching module and the second optical switching module are switched to the first optical path.
[0055] In some examples, the control module is further configured to:
[0056] When the encoding method of the QKD system transmitter is time encoding, the first optical switching module and the second optical switching module are controlled to optically connect the first optical switching module with the second optical switching module, and the first optical switching module and the second optical switching module are switched to the third optical path.
[0057] Specifically, the first optical switching module and the second optical switching module are both optical switches.
[0058] The coding error detection device for a QKD system provided in an embodiment of the present invention can adapt to coding error detection of a QKD system with different coding modes. It only requires simple optical path switching, and there is no need to build the complexity of different detection environments for different coding modes, nor does it require expensive testing equipment, which greatly reduces the detection cost and improves the detection efficiency. At the same time, there is no need to load two electrical signals on the round-trip pulse optical signal at the same time, which reduces the difficulty of timing adjustment and greatly reduces the difficulty of operation.
[0059] In particular, the first optical switch module or the second optical switch module can be a splitter / 3 splitter and the first optical switch module and the second optical switch module cannot be a splitter / 3 splitter at the same time. When the first optical switch module or the second optical switch module is a splitter / 3 splitter, it is not electrically connected to the control module.
[0060] Example 2 Figure 2 As shown, the coding error detection method for a QKD system provided by an embodiment of the present invention is executed by the control module in the coding error detection device for a QKD system disclosed in Embodiment 1, and includes the following steps:
[0061] S101, obtaining the encoding method of the QKD system transmitter.
[0062] S102, when it is determined that the encoding method of the QKD system transmitter is polarization encoding, control the first optical switching module and the second optical switching module, so that the first optical switching module and the second optical switching module are optically connected to the polarization beam splitter respectively, and switch the first optical switching module and the second optical switching module to the second optical path.
[0063] S103, when it is determined that the encoding method of the QKD system transmitter is phase encoding, control the first optical switching module and the second optical switching module, so that the unequal-arm interferometer is optically connected to the first optical switching module and the second optical switching module respectively, and switch the first optical switching module and the second optical switching module to the first optical path.
[0064] S104, when it is determined that the encoding method of the QKD system transmitter is time encoding, control the first optical switching module and the second optical switching module to optically connect the first optical switching module to the second optical switching module, and switch the first optical switching module and the second optical switching module to the third optical path.
[0065] Embodiment 3 The quantum communication system provided in the embodiment of the present invention includes a QKD system transmitter, a QKD system receiver and the coding error detection device for the QKD system disclosed in Embodiment 1.
[0066] Figure 3 It is a schematic diagram of an electronic device that implements the coding error detection method for a QKD system provided in an embodiment of the present application. The electronic device may include a processor 601 and a memory 602 storing computer program instructions. When the processor 601 executes the computer program instructions, it implements the process or function of any of the above-mentioned embodiments.
[0067] As an example, the processor 601 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application. The memory 602 may include a large-capacity memory for data or instructions. For example, the memory 602 may be at least one of the following: a hard disk drive (HDD), a read-only memory (ROM), a random access memory (RAM), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a tape, a universal serial bus (USB) drive, or other physical / tangible memory storage device. For another example, the memory 602 may include a removable or non-removable (or fixed) medium. For another example, the memory 602 may be inside or outside the integrated gateway disaster recovery device. The memory 602 may be a non-volatile solid-state memory. In other words, the memory 602 generally includes a tangible (non-transitory) computer-readable storage medium (such as a memory device) encoded with computer executable instructions, and when the software is executed (such as executed by one or more processors), the operations described in the method of the embodiment of the present application can be performed. The processor 601 implements the process or function of any method in the above embodiments by reading and executing the computer program instructions stored in the memory 602.
[0068] In one example, Figure 3 The electronic device shown may also include a communication interface 603 and a bus 610. The processor 601, the memory 602, and the communication interface 603 are connected through the bus 610 and communicate with each other. The communication interface 603 is mainly used to implement the communication between the modules, devices, units and / or devices in the embodiment of the present application. The bus 610 includes hardware, software or both, and can couple the components of the online data traffic billing device to each other.
[0069] An embodiment of the present application further provides a computer storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the process or function of any one of the methods in the above embodiments is implemented.
[0070] In addition, an embodiment of the present application further provides a computer program product, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the process or function of any one of the methods in the above embodiments is implemented.
[0071] The above exemplarily describes a flowchart and / or block diagram of a coding error detection method, device, storage device, and electronic device for a QKD system in an embodiment of the present application, and describes various related aspects. It should be understood that each box or combination of boxes in the flowchart and / or block diagram can be implemented by computer program instructions, or by dedicated hardware that performs specified functions or actions, or by a combination of dedicated hardware and computer instructions. For example, these computer program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to form a machine that enables these instructions executed by such a processor to enable the implementation of the functions / actions specified in each box or combination of boxes in the flowchart and / or block diagram. Such a processor may be a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit.
[0072] The functional blocks shown in the structural block diagram of the embodiment of the present application can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc.; when implemented in software, it is a program or code segment used to perform the required task. The program or code segment can be stored in a memory, or transmitted on a transmission medium or a communication link via a data signal carried in a carrier. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0073] The basic principles disclosed in the present invention are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present invention are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment disclosed in the present invention. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, and are not limiting. The above details do not limit the present invention to being implemented by adopting the above specific details.
[0074] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0075] The block diagrams of the devices, apparatuses, equipment, and systems involved in the disclosure of the present invention are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open words, referring to "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the words "and / or" and can be used interchangeably with them, unless the context clearly indicates otherwise. The word "such as" used here refers to the phrase "such as but not limited to", and can be used interchangeably with it.
[0076] The method and apparatus disclosed in the present invention may be implemented in many ways. For example, the method and apparatus disclosed in the present invention may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above sequence of steps for the method is for illustration only, and the steps of the method disclosed in the present invention are not limited to the sequence specifically described above, unless otherwise specifically stated. In addition, in some embodiments, the present invention may also be implemented as a program recorded in a recording medium, which includes machine-readable instructions for implementing the method disclosed in the present invention. Therefore, the present invention also covers a recording medium storing a program for executing the method disclosed in the present invention.
[0077] It should also be noted that in the apparatus, equipment and method disclosed in the present invention, each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes disclosed in the present invention. The above description of the disclosed aspects is provided to enable any technician in the field to make or use the present invention. Various modifications to these aspects are very obvious to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of the present invention. Therefore, the present invention is not intended to be limited to the aspects shown here, but to the widest range consistent with the principles and novel features disclosed herein.
[0078] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments disclosed in the present invention to the forms disclosed herein. Although a number of example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.
[0079] It is understandable that the related features in the above methods and devices can be referenced to each other. In addition, the "first", "second" and the like in the above embodiments are used to distinguish the embodiments, but do not represent the advantages and disadvantages of the embodiments.
[0080] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
[0081] It should be noted that the above embodiments do not limit the present invention in any form, and any technical solutions obtained by equivalent replacement or equivalent transformation shall fall within the protection scope of the present invention.
Claims
1. A coding error detection device for a QKD system, characterized in that: include: A first optical path, including an unequal-arm interferometer; a second optical path including a polarization beam splitter; The third optical path includes a first optical switching module and a second optical switching module; A detection module, used to detect the single photons output by the second optical switching module and obtain the count of the single photons, wherein the input end of the first optical switching module is optically connected to the output end of the QKD system transmitting end, and the output end of the second optical switching module is optically connected to the input end of the detection module; A control module, electrically connected to the first optical switch module, the second optical switch module and the detection module, respectively, and configured to control the first optical switch module and the second optical switch module according to the encoding mode of the transmitting end of the QKD system, and switch the first optical switch module and the second optical switch module to the first optical path, the second optical path or the third optical path; The control module is further used to calculate the coding errors of different coding states under different coding modes based on the counting of the single photons; The control module is further used to control the first optical switch module and the second optical switch module when the encoding mode of the QKD system transmitting end is polarization encoding, so that the first optical switch module and the second optical switch module are respectively optically connected to the polarization beam splitter, and the first optical switch module and the second optical switch module are switched to the second optical path; The control module is further used to control the first optical switching module and the second optical switching module when the encoding mode of the QKD system transmitting end is phase encoding, so that the unequal-arm interferometer is optically connected to the first optical switching module and the second optical switching module respectively, and the first optical switching module and the second optical switching module are switched to the first optical path; The control module is also used to control the first optical switching module and the second optical switching module when the encoding method of the QKD system transmitting end is time encoding, so that the first optical switching module is optically connected to the second optical switching module, and the first optical switching module and the second optical switching module are switched to the third optical path.
2. The coding error detection device for a QKD system according to claim 1, characterized in that: An adjustable delay device is provided on one arm of the unequal-arm interferometer, and the adjustable delay device is used to adjust the optical path difference between the pulse lights input into the two arms of the unequal-arm interferometer, so that the optical path difference between the pulse lights input into the two arms of the unequal-arm interferometer is consistent with the optical path difference between the pulse lights output from the two arms of the unequal-arm interferometer.
3. A coding error detection method based on the coding error detection device for a QKD system according to claim 1 or 2, characterized in that: The following steps are involved: Get the encoding method of the QKD system transmitter; When it is determined that the encoding mode of the transmitting end of the QKD system is polarization encoding, controlling the first optical switching module and the second optical switching module so that the first optical switching module and the second optical switching module are optically connected to the polarization beam splitter respectively, and switching the first optical switching module and the second optical switching module to the second optical path; When it is determined that the encoding mode of the transmitting end of the QKD system is phase encoding, controlling the first optical switching module and the second optical switching module so that the unequal-arm interferometer is optically connected to the first optical switching module and the second optical switching module respectively, and switching the first optical switching module and the second optical switching module to the first optical path; When it is determined that the encoding method of the QKD system transmitter is time encoding, the first optical switching module and the second optical switching module are controlled to make the first optical switching module optically connected to the second optical switching module, and the first optical switching module and the second optical switching module are switched to the third optical path.
4. A quantum communication system, characterized in that: It includes a QKD system transmitter, a QKD system receiver and the coding error detection device for the QKD system as claimed in claim 1 or 2.
5. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is used to execute the coding error detection method described in claim 3 above.
6. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the coding error detection method described in claim 3.
