Privacy protection method and system based on quantum circuit equivalent homomorphic encryption algorithm
Through the quantum circuit equivalent homomorphic encryption algorithm, the problem of insufficient privacy protection of data, parameters and models in quantum computing is solved, and efficient security protection of data and models is achieved, and it is suitable for quantum computing algorithms and multiple data sets.
Patent Information
- Application Number
- CN202411115068.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-14
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2044-08-14
AI Technical Summary
The prior art is difficult to protect the privacy of data sets, training parameter sets and models simultaneously in quantum computing and services, and often it is difficult to achieve a good balance between privacy and model accuracy, and small key space leads to limited security.
Using the quantum line equivalent homomorphic encryption algorithm, data and parameters are encoded through quantum state encoding and variational training layer rules, and the quantum line equivalent replacement homomorphic encryption algorithm is used for encryption to ensure the data and model during transmission and processing. Security.
It effectively protects the privacy of data, parameters and models, maintains the efficiency and wide applicability of models, and ensures the security and privacy of data and models in quantum computing.
Smart Images

Figure CN119106439A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of quantum computing privacy protection, and in particular to a privacy protection method and system based on a quantum circuit equivalent homomorphic encryption algorithm. Background Art
[0002] In the current context of Machine Learning as a Service (MLaaS), Cloud Service Providers (CSPs) provide data holders with machine learning-based data processing, model training, and prediction services, attracting users interested in machine learning to deploy applications on cloud platforms without having to build their own large-scale infrastructure and computing resources. In this process, the CSP can be an external application, a partner company, or even the company itself. Data holders, such as governments, banks, hospitals, insurance companies, or e-commerce websites, can choose to store and process data on cloud platforms, or use the services provided by cloud platforms.
[0003] Although MLaaS provides many benefits, the privacy issues of data holders are very serious. Data sets, training parameter sets, and models are all facing various threats. From the perspective of application scenarios, data holders can use MLaaS in three ways: 1) The data holder provides their dataset to the CSP, expecting the CSP to select a machine learning model and train it using the dataset.
[0004] 2) Data holders not only provide datasets but also training parameters and models to CSPs, expecting CSPs to provide computing power to train models.
[0005] 3) Data owners deploy the trained models to CSPs and expect CSPs to provide machine learning services to end users.
[0006] For the above three application scenarios, if there is no privacy protection, malicious CSPs or third-party attackers will easily obtain the data sets, parameters, and models of data holders, posing a huge threat to user privacy information.
[0007] It is difficult for ordinary users to own quantum computers or quantum devices, and most of them can only turn to quantum cloud service providers to participate in quantum computing. Therefore, the demand for quantum cloud service providers (QCaaS) will exceed MLaaS in traditional computing. This leads to QCSP having a more important position than CSP. The application scenarios of QCaaS are similar to MLaaS, but because users are more dependent on QCSP, they face greater privacy threats when facing malicious QCSPs and third-party attackers. Therefore, in QCaaS, it is crucial to protect the security and privacy of user data, training parameters, and models.
[0008] Quantum neural network is a typical hybrid quantum-classical algorithm model that contains a large amount of private information. In this model, users input their data, training parameters, and model algorithms into the quantum cloud server. The quantum cloud server provides quantum computing power and returns measurement results to the user, who then updates the parameters locally, repeatedly until the model converges or reaches the end condition. In this process, users are not only threatened by the privacy of malicious QCSPs, but are also more vulnerable to eavesdropping attacks by third-party attackers in repeated communication interactions.
[0009] At present, there are few methods for protecting all private information of users in quantum computing and service research. They usually focus on only one aspect. For example, in order to protect the privacy of data sets, homomorphic encryption and secure multi-party computation methods are usually used. Most secure multi-party computation schemes based on homomorphic encryption can process encrypted data in the first application scenario without affecting its original accuracy, thus well solving the privacy threat of data sets in quantum computing and services. The existing technologies cannot simultaneously protect the privacy of data sets, parameter sets, and models in the second and third application scenarios. It is difficult for methods based on traditional homomorphic encryption to effectively protect parameter sets and models at the same time. Differential privacy methods can protect parameter sets and models by adding noise at appropriate locations, but this method may have a negative impact on the accuracy of the original model, thereby affecting its availability. The larger the privacy budget, the greater the negative impact. The existing technologies are typical solutions that protect privacy at the expense of availability.
[0010] In summary, for existing research, methods based on homomorphic encryption can solve the problem of data set privacy protection, but cannot simultaneously protect the privacy of parameter sets and models. Although methods based on differential privacy can fully protect data sets, parameter sets, and models, they will have a negative impact on the results. Therefore, how to protect the privacy of data sets, parameter sets, and models without affecting accuracy is a very important issue.
[0011] Therefore, the problems and defects of the prior art are: 1. Insufficient protection of data, parameter and model privacy: Most existing technologies only focus on protecting data privacy, but ignore the privacy protection of training parameters and model structure itself, which is insufficient in many scenarios.
[0012] 2. Difficulty in balancing privacy, complexity, and usability: Although differential privacy technology protects data privacy to some extent, it is often difficult to achieve a good balance between protecting privacy and maintaining the usability of algorithm models.
[0013] 3. Small key space and limited security: In existing privacy protection technologies, the key space is small, which limits its security, especially in the face of complex attacks. Summary of the invention
[0014] In view of the above-mentioned deficiencies in the prior art, the present invention provides a privacy protection method and system based on a quantum circuit equivalent homomorphic encryption algorithm, which solves the problem of insufficient privacy protection of data, parameters and models in the prior art.
[0015] In order to achieve the above-mentioned object of the invention, according to a first aspect of the present invention, a privacy protection method based on a quantum circuit equivalent homomorphic encryption algorithm is provided, comprising the following steps: S1, obtaining an original sample set, and normalizing the original sample set to obtain a preprocessed data set; S2, dividing the preprocessed data set into a sample set and a test set; S3, encoding the sample set into the quantum state according to the quantum state encoding rule, and encoding the training parameters into the variational training layer according to the variational training layer rule, to obtain the quantum circuit; S4, inputting the quantum circuit into the quantum circuit equivalent replacement homomorphic encryption algorithm, and outputting the encrypted quantum circuit through the quantum circuit equivalent replacement homomorphic encryption algorithm; S5, upload the encrypted quantum circuit to the quantum cloud server and run it to obtain the measurement results; S6. Post-process the measurement results according to the original algorithm to obtain the true results of the original model.
[0016] The beneficial effects of the above scheme are: (1) The present invention not only protects data privacy, but also protects training parameters and model structure, which is very important for application scenarios that need to protect the algorithm itself as well as the data.
[0017] (2) The present invention can process complex data quickly through the high efficiency of quantum computing, while protecting the security of data and parameters through quantum circuit equivalent homomorphic encryption.
[0018] (3) The present invention is applicable to any quantum computing algorithm and a variety of data sets and tasks, showing broad application potential.
[0019] Further, in step S3, the quantum state encoding rule is angle encoding.
[0020] Furthermore, in step S3, the variational training layer is TwoLocal.
[0021] Further, in step S4, the quantum circuit is equivalently replaced with the homomorphic encryption algorithm to output the encrypted quantum circuit, which specifically includes: S41, dividing the quantum circuit into at least two sub-quantum circuits according to the unitary time, and obtaining at least two unitary matrices corresponding to the at least two sub-quantum circuits respectively; S42, generating at least two random global phases according to the at least two unitary matrices, and multiplying the at least two random global phases and the at least two unitary matrices according to a preset formula to obtain at least two global unitary matrices; wherein the number of at least two random global phases, the number of at least two unitary matrices, and the number of at least two global unitary matrices are the same; S43, according to the unitary matrix decomposition algorithm, each of the at least two global unitary matrices is constructed into at least two sub-quantum encryption circuits; S44. Reorganize at least two sub-quantum encryption circuits according to the unitary time to obtain an encrypted quantum circuit, and output the encrypted quantum circuit.
[0022] Furthermore, in step S42, the preset formula is:
[0023] in, represents the global unitary matrix, represents a sub-quantum circuit, represents a random global phase, represents a unitary matrix.
[0024] The beneficial effect of the above further scheme is that by encrypting the complete quantum circuit on the client side and uploading it to the server side for operation, this method does not require decryption and ensures the security of quantum data, parameters and model structure during transmission and processing.
[0025] Furthermore, the method further comprises: Use ad-hoc dataset for testing.
[0026] According to a second aspect of the present invention, a privacy protection system based on a quantum circuit equivalent homomorphic encryption algorithm is provided, the system comprising: The data preprocessing module is used to obtain an original sample set and normalize the original sample set to obtain a preprocessed data set; and divide the preprocessed data set into a sample set and a test set; The original quantum circuit construction module is used to encode the sample set into the quantum state according to the quantum state encoding rule, and encode the training parameters into the variational training layer according to the variational training layer rule to obtain the quantum circuit; A homomorphic encryption module, used to input the quantum circuit into a quantum circuit equivalent replacement homomorphic encryption algorithm, and output the encrypted quantum circuit through the quantum circuit equivalent replacement homomorphic encryption algorithm; The post-processing module is used to upload the encrypted quantum circuit to the quantum cloud server and run it to obtain the measurement result; according to the original algorithm, the measurement result is post-processed to obtain the true result of the original model.
[0027] According to a third aspect of the present invention, there is provided an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method of the first aspect.
[0028] According to a fourth aspect of the present invention, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the method according to the first aspect.
[0029] According to a fifth aspect of the present invention, there is provided a computer program product, comprising a computer program, wherein the computer program implements the method according to the first aspect when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 This is a flowchart of a privacy protection method based on a quantum circuit equivalent homomorphic encryption algorithm; Figure 2 A schematic diagram of the process of users in a cloud environment using quantum circuit equivalent replacement homomorphic encryption algorithm to interact with quantum servers; Figure 3 A schematic diagram of the specific process of encrypting quantum circuits using a homomorphic encryption algorithm that is equivalent to replacing quantum circuits; Figure 4 It is a comparison diagram of the original HHL circuit and the encrypted HHL circuit; Figure 5 It is a schematic diagram comparing the original VQC circuit and the encrypted original VQC circuit; Figure 6Schematic diagram of the comparison of accuracy and loss between VQC and the method described in the present invention on an ad-hoc dataset. DETAILED DESCRIPTION
[0031] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.
[0032] like Figure 1 As shown, a privacy protection method based on quantum circuit equivalent homomorphic encryption algorithm includes the following steps: S1. Obtain the original sample set and normalize the original sample set to obtain a preprocessed data set.
[0033] S2. Divide the preprocessed data set into a sample set and a test set.
[0034] S3. Encode the sample set into the quantum state according to the quantum state encoding rule, and encode the training parameters into the variational training layer according to the variational training layer rule to obtain the quantum circuit.
[0035] In this embodiment, in step S3, the quantum state encoding rule is angle encoding.
[0036] In this embodiment, in step S3, the variational training layer is TwoLocal.
[0037] Optionally, in the client, the user can normalize the input data. And the data can be converted into quantum states using the quantum state preparation method, and the original quantum circuit model (that is, the quantum circuit) can be constructed using the model structure and measurement method corresponding to the HHL algorithm.
[0038] Optionally, step S3 can be performed in the client. In the client, the input data (ie, the sample set) can be normalized. And the data can be converted into quantum states using the quantum state preparation method, or the model structure and measurement method corresponding to the quantum neural network algorithm can be used to construct the original quantum circuit model (ie, construct the quantum circuit).
[0039] In this embodiment, the number of inputs of the sample set may be 16 bits, the number of quantum states may be 4 bits, and the number of training parameters may be 32.
[0040] In this embodiment, the acquisition of the quantum circuit in step S3 can be expressed as follows:
[0041] in, represents a quantum circuit, represents the quantum circuit model itself, represents the sample set, Represents a set of training parameters.
[0042] In this embodiment, the design of homomorphic encryption allows the user to run it locally or on any classical computer, which minimizes the quantum capability requirements for the user.
[0043] S4. Input the quantum circuit into the quantum circuit equivalent replacement homomorphic encryption algorithm, and output the encrypted quantum circuit through the quantum circuit equivalent replacement homomorphic encryption algorithm.
[0044] In this embodiment, in step S4, the quantum circuit is equivalently replaced by the homomorphic encryption algorithm to output the encrypted quantum circuit, which specifically includes: S41, dividing the quantum circuit into at least two sub-quantum circuits according to the unitary time, and obtaining at least two unitary matrices corresponding to the at least two sub-quantum circuits respectively; S42, generating at least two random global phases according to the at least two unitary matrices, and multiplying the at least two random global phases and the at least two unitary matrices according to a preset formula to obtain at least two global unitary matrices; wherein the number of at least two random global phases, the number of at least two unitary matrices, and the number of at least two global unitary matrices are the same; S43, according to the unitary matrix decomposition algorithm, each of the at least two global unitary matrices is constructed into at least two sub-quantum encryption circuits; S44. Reorganize at least two sub-quantum encryption circuits according to the unitary time to obtain an encrypted quantum circuit, and output the encrypted quantum circuit.
[0045] Furthermore, in step S42, the preset formula is:
[0046] in, represents the global unitary matrix, represents a sub-quantum circuit, represents a random global phase, represents a unitary matrix.
[0047] For example, Figure 2 As shown, Figure 2 This is a flow chart of how users in a cloud environment use quantum circuit equivalent substitution homomorphic encryption algorithms to interact with quantum servers. Figure 2In the paper, the privacy protection process of users in quantum algorithms using the Quantum Circuit Equivalence Homomorphic Encryption (QCEHE) method in a cloud environment is demonstrated. The user first inputs classical data and training parameters into the quantum computing model to form a complete quantum circuit. The circuit is then encrypted using the QCEHE method to generate an equivalent encrypted circuit. The user uploads the encrypted circuit to the quantum cloud server for execution. The result returned by the encrypted circuit is mathematically equivalent to the result of the original unencrypted circuit, and the user can directly perform subsequent processing without decryption.
[0048] like Figure 3 As shown, Figure 3 The specific process diagram of quantum circuit equivalent replacement homomorphic encryption algorithm to encrypt quantum circuit. Figure 3 In the paper, the quantum circuit equivalent substitution algorithm (QESA) process for enhancing the security of quantum circuits is presented. The process can first start from the circuit decomposition module, where the input quantum circuit is decomposed into subcircuits, each of which is represented as a subunitary matrix. In the global phase module, a random global phase is added to each subunitary matrix, representing the first round of homomorphic encryption. Finally, in the unitary matrix decomposition module, different decomposition algorithms are applied to further change the data, parameters, and structure of each subunitary matrix to complete the second round of homomorphic encryption. The encryption of these two steps ensures the security and privacy of the quantum circuit when it is processed on a classical computer or server.
[0049] like Figure 4 As shown, Figure 4 This is a comparison diagram of the original HHL circuit and the encrypted HHL circuit.
[0050] like Figure 5 As shown, Figure 5 Schematic diagram comparing the original VQC circuit and the encrypted original VQC circuit.
[0051] Optionally, users can perform homomorphic encryption of the original quantum circuit model on the local client and upload the encrypted quantum circuit to the quantum server for operation. The encrypted quantum circuit protects the user's data and model structure.
[0052] In this embodiment, the user can perform homomorphic encryption of the original quantum circuit model on the local client, ensuring the privacy and security of user data and model structure, and utilizing the advantages of quantum computing to improve the efficiency of data processing and analysis.
[0053] S5. Upload the encrypted quantum circuit to the quantum cloud server and run it to obtain the measurement results.
[0054] Optionally, after the quantum cloud server is finished running, the quantum server can return the measurement results to the user. At the same time, due to the characteristics of this homomorphic encryption method, the user does not need to decrypt, but only needs to process the obtained measurement results according to the post-processing method of the quantum neural network model itself to obtain the classification results of the data.
[0055] In this embodiment, the original quantum circuit model is constructed through the model structure and measurement method corresponding to the quantum neural network algorithm, and the measurement results are processed according to the post-processing method of the quantum neural network model itself, which can ensure the privacy and security of user data and model structure, and take advantage of quantum computing to improve the efficiency of data processing and analysis. It shows the strong application potential of the quantum computing privacy protection method based on the quantum circuit equivalence class homomorphic encryption algorithm in processing sensitive data, especially in areas where data privacy and security need to be ensured. By combining quantum computing and encryption technology, not only the efficiency of data processing is improved, but also the security and privacy of data are ensured.
[0056] S6. Post-process the measurement results according to the original algorithm to obtain the true results of the original model.
[0057] In this embodiment, after step S6, the method further includes: Use ad-hoc dataset for testing.
[0058] Optionally, the Iris data set can also be used for testing. In the test, the angle encoding method is used to encode the classical data into quantum states, and the number of classical data inputs is set to 8 bits, that is, the number of quantum states is 4 bits.
[0059] like Figure 6 As shown, Figure 6 Schematic diagram of the comparison of accuracy and loss between VQC and the method described in the present invention on an ad-hoc dataset. Figure 6 By comparison, it can be seen that the loss and accuracy of the scheme with privacy protection are similar to those of the scheme without privacy protection. Therefore, the privacy protection scheme described in the present invention has no effect on machine learning training.
[0060] In this embodiment, a unitary matrix decomposition algorithm based on classical mathematical methods is used, which can decompose any unitary matrix into a series of single-qubit rotations and two-qubit gates, and all quantum circuits are unitary matrices. This means that for any unitary matrix composed of quantum circuits, it can be decomposed into different forms, and similarly, any quantum circuit can be converted into an encrypted quantum circuit with different compositions and different parameters. Therefore, the client does not need to have any quantum capabilities, because the circuit used to encode classical data can be decomposed, and this scheme can be used in the circuit to protect private data, training parameters, and model structures. And the test method described in this embodiment can realize the feasibility of pure classical user privacy protection and the comprehensive effect evaluation of privacy protection.
[0061] Furthermore, in this embodiment, by hiding parameters, it is ensured that even if the quantum server is attacked, the key model parameters will not be leaked. By encrypting the quantum gate operation, the data and model in the training process are further protected.
[0062] The method described in the present invention is applicable to pure quantum computing models (such as the HHL model), and can also be applied to hybrid quantum-classical quantum machine learning models (such as quantum neural network models), showing its universality for quantum computing models. It is not only applicable to small-scale data sets (such as ad hoc), but also to more complex data sets (such as MNIST), showing its wide applicability.
[0063] The method described in the present invention uses the open source libraries Qiskit and Pyqpanda to conduct experiments, demonstrating the compatibility of the method with existing quantum computing tools, making the method easier to be adopted and applied by the quantum computing community.
[0064] In an exemplary embodiment, the embodiment of the present invention further provides a privacy protection system based on a quantum circuit equivalent homomorphic encryption algorithm, which can be used to implement the privacy protection method based on a quantum circuit equivalent homomorphic encryption algorithm as described in the above embodiment. The system includes: The data preprocessing module is used to obtain the original sample set and normalize the original sample set to obtain a preprocessed data set; the preprocessed data set is divided into a sample set and a test set; The original quantum circuit construction module is used to encode the sample set into the quantum state according to the quantum state encoding rule, and encode the training parameters into the variational training layer according to the variational training layer rule to obtain the quantum circuit; A homomorphic encryption module is used to input the quantum circuit into the quantum circuit equivalent replacement homomorphic encryption algorithm, and output the encrypted quantum circuit through the quantum circuit equivalent replacement homomorphic encryption algorithm; The post-processing module is used to upload the encrypted quantum circuit to the quantum cloud server and run it to obtain the measurement results; according to the original algorithm, the measurement results are post-processed to obtain the true results of the original model.
[0065] According to an embodiment of the present invention, the present invention also provides an electronic device, a readable storage medium, and a computer program product.
[0066] In an exemplary embodiment, an electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method described in the above embodiments.
[0067] In an exemplary embodiment, the readable storage medium may be a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the method according to the above embodiments.
[0068] In an exemplary embodiment, a computer program product includes a computer program, and when the computer program is executed by a processor, the method according to the above embodiments is implemented.
[0069] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0070] In the context of the present invention, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0071] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0072] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0073] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0074] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention, and should be understood that the protection scope of the present invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific variations and combinations that do not deviate from the essence of the present invention based on the technical revelations disclosed by the present invention, and these variations and combinations are still within the protection scope of the invention.
Claims
1. A privacy protection method based on quantum circuit equivalent homomorphic encryption algorithm, characterized in that: The method comprises: S1. Obtain an original sample set, and normalize the original sample set to obtain a preprocessed data set; S2, dividing the preprocessed data set into a sample set and a test set; S3, encoding the sample set into the quantum state according to the quantum state encoding rule, and encoding the training parameters into the variational training layer according to the variational training layer rule, to obtain a quantum circuit; S4, inputting the quantum circuit into a quantum circuit equivalent replacement homomorphic encryption algorithm, and outputting the encrypted quantum circuit through the quantum circuit equivalent replacement homomorphic encryption algorithm; S5, uploading the encrypted quantum circuit to the quantum cloud server and running it to obtain the measurement result; S6. Post-process the measurement results according to the original algorithm to obtain the true results of the original model.
2. The method according to claim 1, characterized in that In the step S3, the quantum state encoding rule is angle encoding.
3. The method according to claim 1, characterized in that In step S3, the variational training layer is TwoLocal.
4. The method according to claim 1, characterized in that: In step S4, the step of outputting the encrypted quantum circuit by equivalently replacing the homomorphic encryption algorithm with the quantum circuit specifically includes: S41, dividing the quantum circuit into at least two sub-quantum circuits according to unitary time, and obtaining at least two unitary matrices corresponding to the at least two sub-quantum circuits respectively; S42, generating at least two random global phases according to the at least two unitary matrices, and multiplying the at least two random global phases and the at least two unitary matrices according to a preset formula to obtain at least two global unitary matrices; wherein the at least two random global phases, the at least two unitary matrices and the at least two global unitary matrices are the same in number; S43, according to the unitary matrix decomposition algorithm, each of the at least two global unitary matrices is constructed into at least two sub-quantum encryption circuits; S44, reorganizing the at least two sub-quantum encryption circuits according to unitary time to obtain the encrypted quantum circuit, and outputting the encrypted quantum circuit.
5. The method according to claim 1, characterized in that In step S42, the preset formula is: in, represents the global unitary matrix, represents a sub-quantum circuit, represents a random global phase, represents a unitary matrix.
6. The method according to claim 1, characterized in that The method further comprises: Use ad-hoc dataset for testing.
7. A privacy protection system based on quantum circuit equivalent homomorphic encryption algorithm, characterized in that: The system comprises: The data preprocessing module is used to obtain an original sample set and normalize the original sample set to obtain a preprocessed data set; and divide the preprocessed data set into a sample set and a test set; The original quantum circuit construction module is used to encode the sample set into the quantum state according to the quantum state encoding rule, and encode the training parameters into the variational training layer according to the variational training layer rule to obtain the quantum circuit; A homomorphic encryption module, used to input the quantum circuit into a quantum circuit equivalent replacement homomorphic encryption algorithm, and output the encrypted quantum circuit through the quantum circuit equivalent replacement homomorphic encryption algorithm; The post-processing module is used to upload the encrypted quantum circuit to the quantum cloud server and run it to obtain the measurement result; according to the original algorithm, the measurement result is post-processed to obtain the true result of the original model.
8. An electronic device comprising: at least one processor; And a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor executes the method described in any one of claims 1-6.
9. A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Method for realizing Isin solution by variable component sub-line and system for realizing Isin model
CN114444702A
Cross quantum homomorphic encryption method based on quantum network coding
CN116318619A
Quantum federal learning method and system
CN116366250A
Federal learning privacy protection system and method based on quantum noise
CN117407922A
Quantum neural network privacy protection method and system for protecting input data and parameters
CN117675196A
