A quantum circuit watermarking method

By embedding watermarks and encrypting the latent variables of the quantum circuit generation model, the problem of the misuse of quantum circuit generation model knowledge assets is solved, and high-accuracy traceability verification and intellectual property protection are achieved.

CN120744890BActive Publication Date: 2025-12-09ANHUI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511266488.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-05
Publication Date
2025-12-09
Estimated Expiration
2045-09-05

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively identify the origin of quantum circuits, leading to the misuse or theft of knowledge assets related to quantum circuit generation models, and the generated circuits do not carry obvious characteristics of their origin.

Method used

By performing anti-attack encoding and encryption on the original watermark information, an encrypted watermark is generated and embedded into the initial latent variables of the quantum circuit generation model. The watermarked quantum circuit is generated using the latent variables with the embedded watermark, and the source is verified by extracting the similarity between the watermark and the original watermark.

Benefits of technology

This enables accurate tracing of the origin of quantum circuits without affecting the performance of the quantum circuit generation model, thereby enhancing the intellectual property protection capabilities of quantum circuits.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120744890B_ABST
    Figure CN120744890B_ABST
Patent Text Reader

Abstract

The application discloses a quantum circuit watermark marking method and relates to the technical field of information processing. Specifically, the following steps are included: performing attack-resistant coding and encryption processing on original watermark information to generate encrypted watermark; embedding the encrypted watermark into initial latent variables of a quantum circuit generation model to generate watermark-embedded latent variables, so that the embedded latent variables and the original latent variables are subject to the same probability distribution; generating a quantum circuit with watermark by using the watermark-embedded latent variables and through the quantum circuit generation model; and extracting watermark information from a quantum circuit to be detected and verifying the source according to the similarity between the extracted watermark and the original watermark. The application aims to mark the quantum circuit with watermark and facilitate the tracing of the quantum circuit.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of information processing, and in particular to a quantum circuit watermarking method. BACKGROUND

[0002] As a disruptive information processing paradigm, quantum computing is gradually changing the basic pattern of the computing field. Compared with classical computing, quantum computing can achieve exponential parallel acceleration in certain specific computing tasks by virtue of the superposition and entanglement of quantum bits. It has great application potential in the fields of cryptography, combinatorial optimization, material science, quantum chemistry, and machine learning. With the continuous maturation of quantum hardware platforms, the demand for innovation of corresponding software and algorithm systems is also growing rapidly, especially in the design of quantum circuits, which has become a key technology path to promote the landing of quantum applications.

[0003] In traditional methods, the design of quantum circuits often requires a large amount of human involvement, relying on researchers' deep understanding of specific problems, target algorithms, and underlying quantum architecture. This manual design method is not only low in efficiency, but also difficult to obtain optimal solutions when facing complex or multi-objective optimization problems. In order to overcome the above bottlenecks, in recent years, with the help of technological progress in generative artificial intelligence, a new type of quantum circuit generation model (QCGMs) has emerged. This type of model uses artificial intelligence technologies such as deep learning, autoregressive models, generative adversarial networks (GANs), or variational autoencoders (VAEs) to automatically construct quantum circuits that meet specific functions or constraints, thereby showing significant advantages in design efficiency, scalability, and optimization capabilities.

[0004] The widespread application of quantum circuit generation models has greatly accelerated the design iteration process of quantum algorithms, promoted the development of quantum software tool chains and compilation systems, and lowered the threshold for quantum computing research. However, as QCGMs gradually move from the research stage to engineering and landing, the large amount of technical details, model parameters, structural design, and training strategies inherent in them have gradually become important knowledge assets for enterprises and research institutions. These generation models often condense deep algorithm design foundations and long-term model tuning experience, and once improperly acquired, copied, or used in unauthorized application scenarios, it will directly harm the interests of developers.

[0005] More complex is that the quantum circuits generated by QCGMs do not directly carry the characteristic information of their generation source in form, so if the generated circuits are extracted from the model and reused, current technical means are difficult to effectively identify their source. This "model abuse" or "circuit theft" problem is increasingly prominent.

[0006] Therefore, how to realize watermarking of the quantum circuit and facilitate the traceability of the quantum circuit has become a technical problem to be solved. SUMMARY

[0007] The main purpose of the present application is to provide a quantum circuit watermarking method, which aims to realize watermarking of the quantum circuit and facilitate the traceability of the quantum circuit.

[0008] In order to achieve the above purpose, the present application provides a quantum circuit watermarking method, comprising the following steps:

[0009] The original watermark information is subjected to attack-resistant coding and encryption processing to generate an encrypted watermark;

[0010] The encrypted watermark is embedded in the initial latent variable of the quantum circuit generation model to generate a latent variable with embedded watermark, so that the embedded latent variable and the original latent variable are subject to the same probability distribution;

[0011] The latent variable with embedded watermark is used to generate a quantum circuit with watermark through the quantum circuit generation model;

[0012] The watermark information is extracted from the quantum circuit to be detected, and the source is verified according to the similarity between the extracted watermark and the original watermark.

[0013] Further, the attack-resistant coding comprises:

[0014] The original watermark is subjected to times diffusion replication to generate bit diffusion watermark;

[0015] The diffusion watermark is encrypted by bit XOR using a stream cipher key.

[0016] Further, the stream cipher key is generated by a pseudo-random number generator, and the seed of the pseudo-random number generator is bound to a user key.

[0017] Further, the symmetric region and are defined, which satisfy and ;

[0018] Each bit of the encrypted watermark is sampled ;

[0019] ;

[0020] wherein, represents the probability of the event occurring; represents the th bit of the encrypted watermark.one bit; denotes a noise variable randomly sampled from a standard Gaussian distribution; denotes the latent variable after watermark embedding; denotes a random variable; denotes the encrypted watermark bit determined region selection.

[0021] Further, the step of generating a watermarked quantum circuit by a quantum circuit generative model using the watermark-embedded latent variable comprises:

[0022] diffusing the watermark-embedded latent variable by a diffusion model is performed step iteration, whose formula is as follows:

[0023] ;

[0024] wherein, , ;

[0025] the final output is input into a decoder to generate a quantum circuit;

[0026] wherein, and denote the latent variables of the diffusion model at time steps t and t-1; denotes the noise strength at step t; denotes the proportion of the signal retained; denotes the output of the noise prediction network, with parameters θ; denotes the scaling coefficient of the random noise; denotes a standard Gaussian noise; denotes the proportion of the “signal component” retained at the time step in the diffusion process; denotes the cumulative proportion of the signal retained from step 1 to step .

[0027] Further, the step of extracting watermark information from the to-be-detected quantum circuit and performing source verification according to the similarity between the extracted watermark and the original watermark comprises:

[0028] mapping the to-be-detected quantum circuit into a latent representation by an encoder ;

[0029] performing synchronization recovery modulation on to generate a candidate latent variable set;

[0030] performing inverse diffusion operation on each candidate variable:

[0031] ;

[0032] wherein, represents the watermark potential variable recovered by the inverse diffusion process; represents the compensated potential variable; represents the cumulative noise attenuation coefficient; represents the standard Gaussian noise.

[0033] Further, the synchronization recovery modulation comprises:

[0034] constructing a zero matrix ;

[0035] inserting into each column position of the zero matrix , to generate ;

[0036] wherein, represents the synchronization-recovered potential variable of the th candidate; represents the sub-matrix of the first column to the th column; represents the sub-matrix of the th column to the th column.

[0037] Further, extracting the watermark information from the to-be-detected quantum circuit further comprises:

[0038] performing inverse sampling on , to obtain by the following formula:

[0039]

[0040] wherein, represents the extracted watermark bits; represents the th element of the recovered watermark potential variable.

[0041] Further, the source verification according to the similarity between the extracted watermark and the original watermark further comprises:

[0042] decrypting using the stream cipher key, and the calculation formula is:

[0043]

[0044] performing majority decision on , and the judgment formula is as follows:

[0045]

[0046] in, This represents the extracted binary watermark sequence; This represents the stream cipher key, which, like the encryption phase, is generated by a pseudo-random number generator. Indicates a bitwise XOR operation; Indicates the decrypted first... One original watermark bit; Indicates the first The original watermark bits in the _ ... The value in each copy Indicates the diffusion factor; This represents the diffusion watermark sequence obtained after decryption.

[0047] Furthermore, the source verification is achieved by comparing Hamming distances; if ≥ If the verification passes, then the following applies: Indicates the original watermark With watermark extraction The similarity measurement function, This represents a predefined similarity threshold.

[0048] By employing the above technical solution, the original watermark information undergoes anti-attack encoding and encryption, enabling the embedded watermark to possess strong fault tolerance and anti-attack capabilities, allowing for accurate extraction even under attack scenarios such as quantum circuit structure perturbations. By embedding the encrypted watermark into the latent variables of the quantum circuit generation model and maintaining consistency between the probability distribution of the embedded latent variables and the original variables, it is ensured that the watermark embedding process does not affect the output performance and generation quality of the quantum circuit generation model. Watermarked quantum circuits are generated using the watermark latent variables, achieving effective labeling of the generation results. Furthermore, by extracting the watermark information from the quantum circuit to be tested and comparing it with the original watermark, high-accuracy traceability verification can be achieved. Thus, effective identification of quantum circuit generation results is achieved without affecting the function and performance of the quantum circuit. Attached Figure Description

[0049] The present invention will now be described in detail with reference to specific embodiments and accompanying drawings, wherein:

[0050] Figure 1 This is a schematic flowchart of the first embodiment of the present invention. Detailed Implementation

[0051] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the following specific embodiments are only used to explain the invention and do not constitute a limitation thereof.

[0052] likeFigure 1 The present application proposes a quantum circuit watermarking method, which embeds watermark without affecting the function and performance of the quantum circuit generation model, and extracts watermark from the quantum circuit with high accuracy in the case of quantum circuit attack or non-attack, so as to achieve the effect of protecting the intellectual property of the quantum circuit generation model and the quantum circuit.

[0053] The watermark embedding and extraction process of the detectable watermark method of the quantum circuit generation model is as follows:

[0054] Step one, first encode the original watermark, and The original watermark of the bit Use error correction coding mechanism to encode the original watermark into an bit encrypted watermark ;

[0055] In the process of transmission or processing, the embedded watermark information may be bit error or partial information loss, which directly leads to the failure of watermark extraction and detection, so it is necessary to use error correction coding to introduce redundant information in advance to make the watermark system have fault tolerance.

[0056] Specifically:

[0057] The original watermark information is a bit binary sequence :

[0058] ;

[0059] Copy and recombine the through the diffusion encoder to generate a diffusion watermark with redundancy characteristics, with a length of bit:

[0060] ;

[0061] Wherein, is the th diffusion copy of the original watermark ; is the diffusion factor, which determines the number of diffusion; The diffusion coding enhances the anti-local attack ability of the watermark and improves the spatial distribution uniformity of the watermark information.

[0062] Then, in order to avoid the diffusion watermark from presenting predictable statistical characteristics, stream cipher key encryption is used for randomization processing to obtain encrypted watermark :

[0063] ;

[0064] where the stream cipher key is generated by a pseudo-random number generator, and the seed can be associated with the user key; denotes the bitwise XOR operation;

[0065] The encoding watermark is defined as To accurately extract the watermark while not reducing the generation quality of the quantum circuit generation model, satisfies two key properties: pseudo-randomness, i.e. is computationally indistinguishable from a uniformly distributed random sequence; and error correction, ensuring that even a certain number of bit errors can be reliably recovered to the original information.

[0066] Step two, distribution-preserving watermark embedding: for apply the symmetric sampling mechanism to generate the watermark-embedded starting latent variable .

[0067] Given that the original latent variable of the quantum circuit generation model is derived from random Gaussian noise, in order to ensure the accuracy of watermark extraction and maintain the generation performance of the model, a special sampling method needs to be used to convert the watermark into random Gaussian noise, thereby realizing watermark embedding without affecting the generation quality of the model.

[0068] Specifically:

[0069] For each bit , we sample a value . If , we set ; otherwise, we flip its sign and set . The symmetric sampling mechanism is defined as follows:

[0070] ;

[0071] where is a standard Gaussian variable, is a pseudo-random bit uniformly sampled, and are symmetric and equally divisible parts of the Gaussian distribution relative to the origin, i.e. .

[0072] The proof is as follows:

[0073] To prove , it is sufficient to prove that for any ∈ , the cumulative distribution function (CDF) satisfies:

[0074] ;

[0075] wherein, .

[0076] According to the symmetry sampling mechanism, we can get:

[0077] ;

[0078] According to the symmetry of Gaussian distribution and the equal probability of partition, we can know:

[0079] ;

[0080] Therefore, we get:

[0081] ;

[0082] and the cumulative distribution function of , therefore, .

[0083] Therefore, by designing a symmetric sampling space, we ensure that watermark embedding will not cause statistical bias of the generated content; the watermark information is uniformly distributed in the latent space and will not affect the generation quality; the symmetric design makes the watermark resistant to common post-processing operations.

[0084] Step three, quantum circuit generation containing watermark: generate the final latent representation by replacing the random noise variable input by the original generation model, after sampling steps of quantum circuit generation model (QCGM). Finally, generate the watermark quantum circuit through the decoder D.

[0085] Specifically:

[0086] Starting from the latent variable embedded with watermark, sampling is carried out through the following steps:

[0087] ;

[0088] wherein, . is a hyperparameter that controls the strength of noise added at each step. , . Learn the parameters, is a prediction network used to predict the noise added to . When When this occurs, it is called deterministic sampling; when... This process is called random sampling. By iterating through the above steps, a latent representation is eventually generated. .

[0089] Quantum circuits via decoder get:

[0090] ;

[0091] Step 4: Synchronization Recovery of Latent Variable Modulation: To extract the watermark from the generated watermarked quantum circuit, the quantum circuit is first encoded using an encoder to obtain the latent representation. Subsequently, regarding potential representations Perform synchronization recovery modulation and perform The diffusion model is inversely operated on to recover the latent variables. This latent variable approximates the original watermarked latent variable. .

[0092] In practical deployments, the generated quantum circuits Structural equivalent transformations (replacing local quantum gates but altering the overall functionality of the quantum circuit) may be performed to accommodate hardware-specific constraints. These transformations result in changes to the encoded latent representation. Beyond structural equivalent transformations, there are malicious attack scenarios where attackers intentionally attempt to remove watermarks embedded in the quantum circuit while maintaining its functional correctness. These include: appending attacks involving appending quantum gates to the ends of non-measured qubits; insertion attacks inserting consecutive identical quantum gates in the middle of the quantum circuit; and deletion attacks removing selected quantum gates from the circuit while ensuring the final qubit measurement remains unchanged. These three types of attacks introduce structural perturbations that significantly affect the latent representation of the quantum circuit, leading to noticeable desynchronization, especially in the column dimension. Given that structural equivalent transformations and malicious attacks can alter the encoded latent representation, we introduce synchronization recovery modulation to mitigate the effects of structural equivalent transformations. Furthermore, in the standard extraction procedure, synchronization recovery modulation does not affect the extracted functionality.

[0093] Specifically:

[0094] The recovery of the latent representation of the quantum circuit is as follows: ;

[0095] in, A watermarked quantum circuit with an unknown state may experience one of the following situations: (1) undergoing a structural equivalent transformation; (2) suffering from three different types of malicious attacks; or (3) remaining in its original state without any transformation. This represents a quantum circuit encoder.

[0096] Synchronization Recovery Mechanism (SRM) aims to proactively correct positional desynchronization and achieve reliable watermark extraction under adversarial conditions. To recover the misalignment of the latent representation, we construct a zero-initialization matrix. This is systematically inserted into different positions in the potential representation. For each candidate index... ,we will Insert in No. Columns to generate potential representations :

[0097] ;

[0098] This process generates a set of compensated latent variables. Then, the latent variables are recovered through T-step diffusion model inverse operation. :

[0099] ;

[0100] Step 5, Decoupling the watermark while maintaining its distribution: For For each element, perform an inverse sampling procedure to obtain a binary sequence. ;

[0101] Specifically:

[0102] for For each element, we sample one value. .if We set Otherwise, we set Its definition is as follows:

[0103] ;

[0104] Finally, extract the binary sequence. .

[0105] Step Six: Decoding the Watermark: Using the decoder mechanism corresponding to the encoder, the binary sequence is decoded to obtain... Then extract the watermark. With the original watermark A comparison and verification process is performed. If the similarity exceeds a predefined threshold... The generated quantum circuit is then identified as a successfully watermarked quantum circuit.

[0106] Channel interference or malicious attacks may cause the extracted watermark to be lost. and the original watermark There are differences, so by quantifying indicators, setting fault tolerance boundaries, avoiding misjudgment, only when watermark exists.

[0107] Specifically:

[0108] In order to restore the watermark that can be counted, first decode the binary sequence using stream cipher key K

[0109]

[0110] Among them, .

[0111] Then, by statistical method, extract the correct watermark from , the specific method is as follows:

[0112] ;

[0113] The final extracted watermark is:

[0114] ;

[0115] Compare the extracted watermark with the original watermark to verify whether the similarity is greater than the threshold value .If the similarity exceeds the predefined threshold value , the generated quantum circuit is identified as a quantum circuit successfully watermarked.

[0116] As shown in Table 1, which shows the impact of different attack methods on watermark extraction.

[0117] Table 1 Influence of different attack methods on watermark extraction

[0118]

[0119] According to steps one to six, the embodiment is based on the initial watermark to perform diffusion and encryption processing to obtain an encrypted watermark; the encrypted watermark is subjected to distribution to maintain watermark embedding, so as to obtain a latent representation conforming to Gaussian distribution; the original latent representation of the quantum circuit generation model is replaced by the latent representation containing the watermark, embedding is completed, and a quantum circuit containing the watermark is generated. The extraction process of the detectable watermark framework is as follows: based on the quantum circuit to be detected, the latent representation is obtained; the latent representation is subjected to denoising, transformation and decryption, etc., so as to extract the watermark information. The watermark framework does not need to be trained, does not damage the performance of the original generation model, and has the ability to resist attacks.

[0120] This invention proposes a quantum circuit watermarking annotation method, comprising the following steps:

[0121] The original watermark information is subjected to anti-attack encoding and encryption processing to generate an encrypted watermark;

[0122] The encrypted watermark is embedded into the initial latent variables of the quantum circuit generation model to generate watermark-embedded latent variables, such that the embedded latent variables and the original latent variables follow the same probability distribution.

[0123] By utilizing the latent variables embedded with watermarks, watermarked quantum circuits are generated through a quantum circuit generation model.

[0124] Watermark information is extracted from the quantum circuit to be tested, and the source is verified based on the similarity between the extracted watermark and the original watermark.

[0125] By employing the above technical solution, the original watermark information undergoes anti-attack encoding and encryption, enabling the embedded watermark to possess strong fault tolerance and anti-attack capabilities, allowing for accurate extraction even under attack scenarios such as quantum circuit structure perturbations. By embedding the encrypted watermark into the latent variables of the quantum circuit generation model and maintaining consistency between the probability distribution of the embedded latent variables and the original variables, it is ensured that the watermark embedding process does not affect the output performance and generation quality of the quantum circuit generation model. Watermarked quantum circuits are generated using the watermark latent variables, achieving effective labeling of the generation results. Furthermore, by extracting the watermark information from the quantum circuit to be tested and comparing it with the original watermark, high-accuracy traceability verification can be achieved. Thus, effective identification of quantum circuit generation results is achieved without affecting the function and performance of the quantum circuit.

[0126] Furthermore, the anti-attack coding includes:

[0127] right Bit original watermarking Secondary diffusion replication generates Bit-based diffusion watermarking;

[0128] The diffusion watermark is encrypted bitwise XORed using a stream cipher key.

[0129] By adopting the above technical solution, through the The original watermark of bits is performed Secondary diffusion replication generates Diffusion watermarking introduces redundant information into the watermark, enhancing its fault tolerance and robustness in the face of quantum circuit structure disturbances, information loss, or bit errors. Furthermore, stream cipher keys are used to perform bitwise XOR encryption on the diffusion watermark, making the generated watermark sequence statistically have good pseudo-randomness, making it difficult to reverse-engineer the original watermark content, thus enhancing the system's security and resistance to attacks.

[0130] Further, the stream cipher key is generated by a pseudo-random number generator, and the seed thereof is bound to the user key.

[0131] By generating the stream cipher key by a pseudo-random number generator and binding the seed thereof to the user key, the watermark sequence generated by each user has uniqueness and unpredictability, which not only improves the security and anti-counterfeiting capability of the watermark, but also effectively prevents the watermark content from being illegally copied or tampered with in a multi-user scenario.

[0132] Further, the symmetric region and are defined, satisfying and ;

[0133] Each bit of the encrypted watermark is sampled ;

[0134] ;

[0135] wherein, represents the probability of an event occurring; represents the bit of the encrypted watermark; represents a noise variable randomly sampled from a standard Gaussian distribution; represents the latent variable after embedding the watermark; represents a random variable; represents the region selected by the encrypted watermark bit .

[0136] By constructing the symmetric regions and , satisfying and corresponding sampling probabilities are equal, the mapping relationship between the encrypted watermark bit and the latent variable is established with an equal-probability symmetric structure; further, by judging whether each standard Gaussian sampling value falls into the region corresponding to the bit , and adjusting the sign according to the falling region to obtain the embedded latent variable , lossless embedding of the encrypted watermark is realized. This design completes watermark carrying while keeping the overall Gaussian distribution unchanged, effectively avoiding interference with the output results of the quantum circuit generation model.

[0137] Further, the step of generating a quantum circuit with a watermark by the quantum circuit generation model using the latent variable with the embedded watermark comprises:

[0138] The latent variable with the embedded watermark is diffused by a diffusion model conduct The iterative process is as follows:

[0139] ;

[0140] in, , ;

[0141] Final output The input decoder generates the quantum circuit;

[0142] in, and This represents the latent variables in the diffusion model at time steps t and t-1; This represents the noise intensity at step t; Indicates the proportion of the retained signal; This represents the output of the noise prediction network, with parameter θ. The scaling factor represents the random noise; Indicates standard Gaussian noise; Indicating the first step in the diffusion process The proportion of signal components retained in each time step; This indicates the sequence from step 1 to step 2. The cumulative percentage of the signal that has been retained up to the last step.

[0143] Using the above technical solution, a diffusion model is used to analyze the latent variables with watermarks. conduct Step-by-step iterative sampling, gradually denoising to recover the final latent representation. The data is then input into the decoder to generate a watermarked quantum circuit. Leveraging the powerful noise modeling and progressive sampling capabilities of the diffusion model, the robustness of the watermark embedding process and the quality of the generated circuit are effectively improved. Key parameters in the diffusion process, such as noise intensity... Signal retention ratio Standard Gaussian noise and noise prediction networks The output prediction information together constitutes a high-precision sampling control mechanism, ensuring that the evolution of latent variables at each step retains the watermark information and maintains the consistency of the generated distribution.

[0144] Furthermore, the step of extracting watermark information from the quantum circuit to be detected and verifying the source based on the similarity between the extracted watermark and the original watermark includes:

[0145] The quantum circuit to be detected is mapped to a potential representation using an encoder. ;

[0146] right Perform synchronization recovery modulation to generate a set of candidate latent variables;

[0147] Perform inverse diffusion operation on each candidate variable:

[0148] ;

[0149] in, This represents the watermarked latent variable recovered through the reverse diffusion process; Represents the latent variables after compensation; This represents the cumulative noise attenuation coefficient; This represents standard Gaussian noise.

[0150] Using the above technical solution, the encoder maps the quantum circuit to be detected into a potential representation. In conjunction with a synchronization recovery modulation mechanism, multiple candidate latent variables are systematically generated to effectively address the problem of misaligned positional information caused by structural disturbances or attacks. Then, an inverse diffusion operation is performed on each candidate latent variable to restore a watermarked latent variable that approximates the original embedding based on the above formula, ensuring that the reconstruction process is both repeatable and random.

[0151] Furthermore, the synchronization recovery modulation includes:

[0152] Constructing the zero matrix ;

[0153] Will Slide Insert For each column position, generate ;

[0154] in, Indicates the first One candidate latent variable after synchronization recovery; Indicates the first column to the second column. Submatrices of columns; Indicates the first Listed to number Submatrices of columns.

[0155] Furthermore, extracting watermark information from the quantum circuit under test also includes:

[0156] right Perform inverse sampling, and obtain the result using the following formula. :

[0157]

[0158] in, Indicates extraction One watermark bit; The first watermarked latent variable obtained after recovery represents the... Each element.

[0159] Using the above technical solution, the latent variables obtained through reverse diffusion are recovered. Perform inverse sampling operation, based on its first... Does each element fall within a predefined symmetric region? and To extract the corresponding watermark bits This method utilizes regional symmetry and the consistency of embedding rules to accurately restore watermark information. It does not rely on traditional neural network classifiers for bit determination, avoiding the introduction of additional noise or misjudgments, and can effectively adapt to potential variables after distribution perturbations.

[0160] Furthermore, source verification based on the similarity between the extracted watermark and the original watermark also includes:

[0161] Decrypt using stream cipher key The calculation formula is:

[0162]

[0163] right The majority decision is made using the following formula:

[0164]

[0165] in, This represents the extracted binary watermark sequence; This represents the stream cipher key, which, like the encryption phase, is generated by a pseudo-random number generator. Indicates a bitwise XOR operation; Indicates the decrypted first... One original watermark bit; Indicates the first The original watermark bits in the _ ... The value in each copy Indicates the diffusion factor; This represents the diffusion watermark sequence obtained after decryption.

[0166] By adopting the above technical solution, a stream cipher key consistent with that used in the encryption phase is employed. Extracted watermark sequence Perform bitwise XOR decryption to recover the original diffusion watermark. This ensures key consistency and security during the decryption process; furthermore, a majority decision is made on the diffused copies by statistically analyzing the values ​​of each watermark bit across its multiple diffused copies, selecting the majority value as the final determination result. The fault tolerance capability can be significantly improved when noise interference, bit flip or attack causes partial bit error.

[0167] Further, the source verification is realized by comparing the Hamming distance, if ≥ , the verification is passed, wherein, represents the similarity measure function of the original watermark and the extracted watermark , and represents the predefined similarity threshold.

[0168] By using the above technical solution, the Hamming distance between the original watermark and the extracted watermark is calculated as the similarity measure standard, and the predefined similarity threshold is set, when the similarity satisfies ≥ , it is determined that the verification is passed, the scheme can effectively tolerate a small amount of bit error caused by channel interference or structure disturbance in the extraction process, avoids the problem of false or missed judgment of the existence of the watermark, and maintains high verification accuracy.

[0169] The above only describes the preferred embodiments of the present application, and does not limit the patent scope of the present application, any equivalent structural transformation made under the inventive concept of the present application, or direct / indirect application in other related technical fields is included in the patent protection scope of the present application.

Claims

1. A quantum circuit watermarking method, characterized by, The method comprises the following steps: Anti-attack coding and encryption processing is performed on the original watermark information to generate encrypted watermark; The encrypted watermark is embedded into an initial latent variable of a quantum circuit generation model to generate a latent variable with embedded watermark, so that the latent variable after embedding and the original latent variable are subject to the same probability distribution; A quantum circuit with watermark is generated by using the latent variable with embedded watermark and the quantum circuit generation model; Watermark information is extracted from the quantum circuit to be detected, and source verification is performed according to the similarity between the extracted watermark and the original watermark; The step of generating a quantum circuit with watermark by using the latent variable with embedded watermark and the quantum circuit generation model comprises: By diffusion model on watermarking latent variables Proceeding Step iteration, whose formula is as follows: ; wherein , ; The final output The input decoder generates a quantum circuit; where, and denotes the latent variable of the diffusion model at time steps t and t-1; denotes the noise strength at step t; denotes the proportion of signal that is preserved; denotes the output of the noise prediction network, parameterized by Θ; denotes the scaling factor of the random noise; denotes the standard Gaussian noise; denotes the proportion of "signal component" that is preserved at the time step of the diffusion process; denotes the cumulative proportion of signal that is preserved from step 1 to step t.

2. The quantum circuit watermarking method of claim 1, wherein, The anti-attack coding comprises: to performing sub-diffusion copying, generating a diffused watermark of bits; The diffusion watermark is encrypted by bit-wise XOR operation using a stream cipher key.

3. The quantum circuit watermarking method of claim 2, wherein, The stream cipher key is generated by a pseudo-random number generator, and the seed of the pseudo-random number generator is bound to a user key.

4. The quantum circuit watermarking method of claim 1, wherein, defining a symmetric region and satisfying and ; each bit of the encrypted watermark ; sampling ; ; where, denotes the probability of an event occurring; denotes the i-th bit of the encrypted watermark; denotes the i-th bit of the encrypted watermark; denotes a noise variable randomly sampled from a standard Gaussian distribution; denotes the latent variable after embedding the watermark; denotes a random variable; denotes the i-th bit of the encrypted watermark determines the region selection.

5. The quantum circuit watermarking method of claim 4, wherein, The step of extracting watermark information from the quantum circuit to be detected and performing source verification according to the similarity between the extracted watermark and the original watermark comprises: mapping a quantum circuit to be detected into a latent representation by an encoder ; To perform a synchronization recovery modulation to generate a candidate set of latent variables; An inverse diffusion operation is performed on each candidate variable: ; wherein, denotes a watermark potential variable recovered by a reverse diffusion process; denotes a compensated potential variable; denotes a cumulative noise attenuation coefficient; denotes a standard Gaussian noise.

6. The quantum circuit watermarking method of claim 5, wherein, The synchronization recovery modulation comprises: Constructing zero matrix ; To Sliding insertion For each column position, generate ; wherein, represents the potential variable after synchronization recovery of the candidate; represents the sub-matrix of the first column to the column; represents the sub-matrix of the column to the column.

7. The quantum circuit watermarking method of claim 5, wherein, The step of extracting watermark information from the quantum circuit to be detected further comprises: To perform inverse sampling, obtain : wherein, represents the extracted watermark bits; represents the recovered element of the watermarked latent variable.

8. The quantum circuit watermarking method of claim 7, wherein, The step of performing source verification according to the similarity between the extracted watermark and the original watermark further comprises: Decryption with stream cipher key The calculation formula is: right The majority decision is made using the following formula: in, This represents the extracted binary watermark sequence; This represents the stream cipher key, which, like the encryption phase, is generated by a pseudo-random number generator. Indicates a bitwise XOR operation; Indicates the decrypted first... One original watermark bit; Indicates the first The original watermark bits in the _ ... The value in each copy Indicates the diffusion factor; This represents the diffusion watermark sequence obtained after decryption.

9. The quantum circuit watermarking method of claim 1, wherein, The provenance verification is achieved by comparing Hamming distances, if ≥ then the verification is passed, where, denotes the original watermark and a similarity measure function, denotes a predefined similarity threshold.​

Citation Information

Patent Citations

  • Quantum color image watermarking method based on quantum error correction coding

    CN116957896A

  • No-reference quality evaluation method and system for invisible watermark image

    CN118898611A