A Design Method of Generative Adversarial Network Based on Quantum Coupling
By adopting the method of quantum coupling and parameter layer sharing strategies in the quantum generation adversarial network, the problems of high training cost and low efficiency are solved, and efficient and accurate data generation and classification are achieved in domain adaptation and cross-domain classification tasks.
Patent Information
- Application Number
- CN202510490604.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-18
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2045-04-18
AI Technical Summary
In the field of quantum machine learning, it is difficult to design a quantum generative adversarial network with low training cost and high training efficiency, especially in domain adaptation and cross-domain classification tasks.
By building a quantum machine learning model based on quantum coupling, two quantum patch generators and two classic discriminators are adopted, combining parameter layer sharing strategies and optimized quantum circuit design, significantly reduce training complexity and improve the accuracy of domain adaptation classifiers.
It realizes significantly reducing training complexity and improving accuracy in domain adaptation and cross-domain classification tasks, generating high-quality handwritten data sets, and effectively utilizing limited quantum computing resources.
Smart Images

Figure CN120031075B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of the application of quantum machine learning in domain adaptation, and specifically relates to a design method of a generative adversarial network based on quantum coupling. Background Art
[0002] With the development of machine learning, domain adaptation between different data domains has become a major problem. A classifier trained using hand-drawn images often has a low classification effect on real photos. At this time, the problem of the joint distribution between domains becomes the focus. The joint distribution of multi-domain images is a probability density function that assigns a density value to each pair of matching images in different domains. For example, images of the same scene in different modalities (such as color images and grayscale images), or images of the same person in different emotional states (such as happy and sad). Once the joint distribution of multi-domain videos is learned, it can be used to generate new image tuples. In addition to movie and game production, the learning of the joint distribution of images can be applied to domain adaptation.
[0003] Quantum computing, as a technology that uses the principles of quantum mechanics for information processing, has been proven to be able to provide solutions that exceed traditional computing methods in certain specific problems; however, the practical application of quantum computers still faces many challenges, such as the stability of hardware, the design complexity of algorithms, and the sensitivity to noise, etc.
[0004] In the field of quantum machine learning, generative adversarial networks (GANs), as a powerful data generation and processing tool, have shown great potential in image processing, data simulation, etc.; however, applying it to the quantum field, especially for domain adaptation by combining the advantages of quantum computing, is a brand-new research direction. The quantum version of the generative adversarial network (QGANs) can utilize the superposition and entanglement characteristics of quantum states and theoretically provide more efficient data processing capabilities. However, due to the limitation of the number of qubits in quantum networks, a large number of qubits will bring a huge training burden. Therefore, how to design a quantum network with low training cost and high training efficiency is a problem considered by the quantum network model of the generative adversarial network based on quantum coupling.
[0005] The technical differences compared with the prior art are as follows:
[0006] Technical comparison with the patent CN116263972A "Image generation method and device based on quantum generative adversarial network";
[0007] Patent CN116263972A proposes an image generation method and device based on a quantum generative adversarial network, aiming to generate images using the quantum generative adversarial network, which is applied to the field of image processing technology and is used to generate expected images in a quantum computing system. This application proposes a design method for a generative adversarial network based on quantum coupling. Through optimized quantum circuit design and algorithms, it significantly reduces the training complexity and improves the accuracy of the domain adaptation classifier. It is mainly applied to the scenario of domain adaptation in quantum machine learning to achieve high-quality generation of handwritten data and cross-domain classification, etc. There are essential differences in their application scenarios.
[0008] Patent CN116263972A extracts the feature vectors of the sample images in the training sample set, uses a quantum encoder to convert the feature vectors into quantum states to obtain the image feature quantum states, and trains the generator and discriminator according to the image feature quantum states. During the training process, the matrix density distance between the image feature quantum state and the generated quantum state and the discriminant quantum state fidelity are calculated to determine whether the convergence condition is met. This application constructs a quantum machine learning model of a generative adversarial network based on quantum coupling, including two quantum patch generators and two classical discriminators; inputs the real and false pixel information into the classical discriminator to observe the judgment probability; adopts a parameter layer sharing strategy, and forces the coupled network to share some parameters when updating the gradient to learn the common features, enabling the coupled generator to learn synthetic image pairs, and adding a softmax layer after the classical discriminator as a classifier to achieve the domain adaptation classification accuracy. There are essential differences in their technical solutions.
[0009] Patent CN116263972A uses a quantum encoder to calculate the distance between the feature vector and the standard feature vector in the standard database to determine the image feature quantum state, inputs it into the discriminator, and uses the Pauli Z gate to measure the quantum bits to obtain the discriminant result, and judges the convergence condition based on the matrix density distance between the image feature quantum state and the generated quantum state and the discriminant quantum state fidelity. In this application, the quantum patch generator consists of at least 2 quantum sub-generators, performs single-qubit transformation and embeds quantum entanglement by adjusting the rotation angle parameter θ; the classical discriminator is constructed using a classical neural network; when training and optimizing, a parameter layer sharing strategy is adopted to force the first layer of the generator and the last few layers of the discriminator in the coupled network to share weights; the optimization algorithm involves loading data into quantum registers, calculating the losses of the discriminator and the generator, and updating parameters, etc. There are essential differences in their technical means.
[0010] The training of Patent CN116263972 can express quantum states using a small number of qubits, solve problems such as difficult convergence, instability, and too small gradients in training, and make the discriminator and generator stable. This application builds a quantum patch generator through the patch method, generates a clearer handwritten dataset, captures and shares high-level features of images, and improves the accuracy in domain adaptation; optimizes the quantum circuit design, utilizes limited quantum computing resources, reduces the computing time, and lowers the computational complexity. There are essential differences in their technical effects.
[0011] Technical comparison with Patent CN115700614A, "A Quantum Generator, Control Method, and Quantum Generative Adversarial Network";
[0012] Patent CN115700614A proposes a quantum generator, control method, and quantum generative adversarial network, aiming to generate data using the quantum generator and quantum generative adversarial network, solve the computational delay problem brought by the generation model based on classical computers in classical generative adversarial networks, and is applicable to scenarios that require efficient data generation, such as data simulation, image processing, and other fields. This application proposes a design method for a generative adversarial network based on quantum coupling, focusing on significantly reducing the training complexity and improving the accuracy of the domain adaptation classifier through optimized quantum circuit design and algorithms, mainly applied to the scenario of quantum machine learning in domain adaptation, and realizing high-quality handwritten data generation and cross-domain classification, etc. There are essential differences in their application scenarios.
[0013] The quantum generator of Patent CN115700614A includes a random initialization module based on quantum logic gates and at least one layer of entanglement module. The random initialization module generates random variables, and the entanglement module performs entanglement operations to determine the generated data; the quantum generative adversarial network includes this quantum generator and a discriminator, and the generator and discriminator can be trained separately while fixing the parameters of the other party. This application constructs a quantum machine learning model of a generative adversarial network based on quantum coupling, including two quantum patch generators and two classical discriminators; inputs real and fake pixel information into the classical discriminator and observes the judgment probability; adopts a parameter layer sharing strategy, and forces the coupled network to share some parameters when updating the gradient to learn common features, so that the coupled generator learns synthetic image pairs; adds a softmax layer after the classical discriminator as a classifier to achieve domain adaptation classification. There are essential differences in their training means.
[0014] In the patent CN115700614A, a quantum circuit with randomly initialized parameters is added to the quantum generator to generate a random data distribution. The problem of the calculation speed delay of the classical generator network is solved by using the circuit composed of quantum gates. In this application, a quantum patch generator is built by the patching method to generate a clearer handwritten dataset. The quantum generative adversarial network is applied to the domain adaptation work to capture and share the high-level features of the pictures, improving the accuracy in domain adaptation. The quantum circuit design is optimized to reduce the calculation time and the computational complexity. There are essential differences between the two in terms of technical effects and output content. Summary of the Invention
[0015] To solve the above technical problems, the present invention proposes a design method of a generative adversarial network based on quantum coupling, which focuses on achieving, through optimized quantum circuit design and algorithms, a significant reduction in training complexity and an improvement in the accuracy of the domain adaptation classifier while maintaining high performance.
[0016] To achieve the above object, the technical solution adopted by the present invention is as follows:
[0017] A design method of a generative adversarial network based on quantum coupling includes the following steps:
[0018] S1. Construct a quantum machine learning model of a generative adversarial network based on quantum coupling, including two quantum patch generators G1 and G2 for generating false pixel information, and two classical discriminators D1 and D2 for discriminating real and false pixel information;
[0019] S2. Input the real pixel information and the false pixel information generated by the quantum patch generator into the classical discriminator, and observe the judgment probability of the classical discriminator after inputting the real pixel data and the false data generated by the quantum patch generator;
[0020] S3. Adopt a parameter layer sharing strategy during training optimization. The parameter layers of G1, G2 and D1, D2 are all divided into a shared layer and a common layer. During the training optimization process, when updating the gradient, the forced coupling network respectively shares the parameters of the shared layers of the corresponding parameter layers of G1, G2 and D1, D2 and carry out sharing;
[0021] S4. After repeating steps S2 - S3 until the maximum number of iterations mum_epochs is reached, an optimized quantum machine learning model of the quantum generative adversarial network based on quantum coupling is obtained. After the coupled generator is trained, without the corresponding supervision, it learns to synthesize the corresponding image pairs;
[0022] S5. Add a softmax layer after the classical discriminator to obtain two classifiers C1 and C2, and achieve the domain adaptation classification accuracy.
[0023] As a further improvement of the present invention, in step S1, the adversarial network is composed of two identical patch generation adversarial networks, and each patch generation adversarial network is composed of a quantum patch generator and a classical discriminator.
[0024] As a further improvement of the present invention, in step S2, the quantum patch generator is composed of at least 2 quantum sub-generators, each sub-generator uses five quantum bits, one of which is used as a redundant bit to provide non-linear characteristics for the measurement result, and each bit is input into the parameterized quantum circuit after passing through the encoding layer;
[0025] The circuit structure of the quantum patch generator includes a Y rotation gate and a controlled Z gate. By adjusting the rotation angle parameter θ, various single-qubit transformations are performed, and quantum entanglement is embedded. The classical discriminator is constructed using a classical neural network, and its basic architecture includes an input layer, L hidden layers, and an output layer, where L≥1 in the L hidden layers.
[0026] As a further improvement of the present invention, it is characterized in that: in step S3, the parameter layer is defined as follows. Let and be images respectively sampled from the marginal distribution of the first domain and the marginal distribution of the second domain. Let and be the generators of GAN1 and GAN2 respectively, being the random input of the generator;
[0027] ;
[0028] Here and are the layer parameters of the generator, and are and the number of parameter layers of, and the generator gradually decodes from the abstract high-level feature information to the more specific detailed information. The first layer decodes high-level semantics, and the last layer decodes low-level details, forcing and to have the same structure in the first layer and share weights. The constraint of sharing weights forces the high-level semantics to be decoded in the same way in and , and there is no constraint in the last layer, and the shared high-level features are implemented in different ways to deceive their respective discriminators;
[0029] Similarly, let and be the discriminant models of GAN1 and GAN2, and are and For the layer parameters, the discriminator maps the input image to a probability score, estimating the probability that the input image is real data. The first layer of the discriminative model extracts low-level features, and the last layer extracts high-level features, forcing and to have the same last few layer parameters, which is achieved by sharing the weights of the last few layers;
[0030] .
[0031] As a further improvement of the present invention, in step S4, the optimization algorithm of the quantum machine learning model is as follows.
[0032] S4-1. Initialize the general layer parameters of the quantum generators G1 and G2 , , and the shared layer parameters . Initialize the general parameters of the discriminators D1 and D2 , , and the shared layer parameters ;
[0033] S4-2. Load the real picture data real_data1 and real_data2 into the quantum registers and . Set two quantum registers with a size of N qubits. After normalizing the data, load the data into the two registers through quantum amplitude encoding to obtain the real data quantum state . Load the random noise fake_data1 and fake_data2 into the quantum registers and ;
[0034] S4-3. The random quantum state passes through the two generators to generate a pair of fake quantum states ;
[0035] S4-4. Evaluate the two pairs of real and fake data with the discriminator respectively. and are the discrimination scores of the discriminator for the real data and the output of the generator. represents the overall parameters of the discriminator, and "=" represents assignment:
[0036] ;
[0037] S4-5. Antinormalize the two generated fake quantum states to obtain two classical data generate_data generated by the generator 1、2;
[0038] S4-6. Calculate the discriminator loss ;
[0039] ;
[0040] Calculate the generator loss ;
[0041] ;
[0042] S4-7. Update the parameters of the generator's ordinary layer and the parameters of the discriminator's ordinary layer , is the learning rate, are the gradient values updated for the generator's ordinary layer, discriminator's ordinary layer, generator's shared layer, and discriminator's shared layer respectively:
[0043] ;
[0044] Update the parameters of the generator's and discriminator's shared layers and ;
[0045] ;
[0046] S4-8. Repeat S4-2 to S4-7 until all data in the training set has been input;
[0047] S4-9. Repeat S4-2 to S4-8 until the maximum number of iterations mum_epochs is reached.
[0048] As a further improvement of the present invention, in step S5, the classifier classifies the images as follows. A softmax layer is added after the last layer of the discriminator. By jointly solving the digit classification problem in the MNIST domain including using the images and labels in the MNIST domain and the QCoGAN learning problem including using the images in the MNIST domain and the USPS domain to train QCoGAN, two classifiers are respectively used to classify C1 in the MNIST domain and C2 in the USPS domain. During the training process, the label information of the USPS domain is not used. The adaptation of the classifier from USPS to MNIST is achieved by the same method.
[0049] The beneficial effects of the present invention are as follows:
[0050] 1) The method of the present invention builds a quantum patch generator through the patch method and uses a classical neural network to build a discriminator. Compared with the traditional generative adversarial network, the widened deep patch network architecture in this paper can capture more detailed information and generate a clearer handwritten dataset;
[0051] 2) The method of the present invention inherits the powerful functions of traditional GANs and applies quantum generative adversarial networks to domain adaptation work for the first time. The QCoGAN framework can effectively capture and share high-level features of pictures, and can also effectively identify low-level features. Compared with traditional methods in terms of domain adaptation, the accuracy rate has been improved;
[0052] 3) The present invention introduces quantum computing methods to bring new possibilities to domain adaptation, especially in the context where the computing power of classical computers is approaching its bottleneck; after the future development and maturity of quantum computing technology, the method of the present invention will greatly improve the application speed and effect in machine learning;
[0053] 4) By optimizing the quantum circuit design, the method of the present invention can make more effective use of limited quantum computing resources, reduce the computing time, and lower the overall computing complexity, making the quantum machine learning technology more practical and efficient in channel estimation in the field of wireless communication. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 is the network logic diagram of the generative adversarial network based on quantum coupling in the embodiment of the present invention;
[0055] Figure 2 is the basic structure of the quantum patch generator in the embodiment;
[0056] Figure 3 is the schematic diagram of the quantum patch generator generating the number 0 in the embodiment;
[0057] Figure 4 is the classical discriminator structure in the embodiment;
[0058] Figure 5 is the schematic diagram of the coupling network parameter sharing in the embodiment;
[0059] Figure 6 is the result of the model iterating 100 times to generate the number zero in the embodiment;
[0060] Figure 7 is the effect of generating the number 1 in the embodiment;
[0061] Figure 8 is the effect of generating the number 2 in the embodiment;
[0062] Figure 9 is the change curve of the loss functions of the generator and the discriminator in the embodiment;
[0063] Figure 10 is the advantage of domain adaptation compared with classical methods in the embodiment. DETAILED DESCRIPTION OF THE INVENTION
[0064] The present invention will be further described in detail below in conjunction with the drawings and the specific embodiments:
[0065] A design method of a generative adversarial network based on quantum coupling according to the present invention is as follows Figure 1 shown, and includes the following steps:
[0066] S1. Construct a quantum machine learning model of a generative adversarial network based on quantum coupling, including two quantum patch generators for generating false pixel information and two classical discriminators for discriminating real and false pixel information;
[0067] S2. Input the real pixel information and the false pixel information generated by the quantum patch generator into the classical discriminator, and observe the judgment probability of the classical discriminator after inputting the real pixel data and the false data generated by the quantum patch generator;
[0068] A method based on a parameterized quantum circuit is used to design the quantum patch generator. As shown in Figure 2 it, five qubits are used, where the first qubit is used as a redundant qubit to provide non-linear characteristics for the measurement result, and each qubit is input into the parameterized quantum circuit after passing through the encoding layer. The circuit structure mainly includes a Y rotation gate and a controlled-Z gate. By adjusting the rotation angle parameter , this structure can perform various single-qubit transformations. This structure successfully embeds quantum entanglement, which is a key quantum mechanism that allows rich interactions between qubits. This entanglement not only enhances the representation ability of the circuit, but also enables it to accurately describe complex data distributions.
[0069] Considering that the single-layer structure may have limitations in representation ability, we adopt a multi-layer stacking strategy, which can more effectively approximate and represent various complex quantum states. When this basic layer structure is repeated many times and approaches an infinite number of layers, it achieves universality in quantum computing, which means that, from a theoretical perspective, it has the ability to generate or discriminate any quantum state.
[0070] At the same time, since too few qubits cannot capture the specific features of the image, but if we want to generate an image with clear features, while increasing the number of qubits, the training cost is also greatly increased.
[0071] Therefore, the quantum patch generator is optimized by using a quantum patch structure. The patch method greatly reduces the requirement of the quantum device for the number of bits. The quantum patch generator in the above text is used as a sub-generator, that is, a patch. Each sub-generator is responsible for generating a specific part of the final image, and finally the outputs of each sub-generator are spliced into the final output of the generator and input to the discriminator. Figure 3 What is shown is a handwritten 0 image of 8*8 generated by 4 sub-generators.
[0072] It is worth noting that since this structure uses simple quantum gates based on Pauli operators, these gates can be easily implemented on current quantum hardware. This not only ensures its theoretical rationality but also means that it has high feasibility on actual quantum computing hardware.
[0073] The discriminator D is constructed by using a classical neural network. The fully connected neural network, as a biologically inspired computational model, is the mainstay of deep learning. By combining the FCNN with techniques such as convolutional layers, residual connections, or attention mechanisms, various advanced deep learning models can be designed. The FCNN and its variants have surpassed other computational models in many machine learning tasks and achieved state-of-the-art performance.
[0074] The basic architecture of the FCNN is as Figure 4 shown, including an input layer, L hidden layers and an output layer. The nodes in each layer are called "neurons". A typical feature of the FCNN is that the neurons in a layer are only allowed to connect to the neurons in the adjacent layer. The left panel shows the basic structure of a fully connected neural network composed of an input layer, one hidden layer, and an output layer. There are 2 neurons in the input layer and 5 neurons in the first hidden layer respectively. The right panel shows the calculation rule of a single neuron. The neuron highlighted in the gray area is calculated through where represents the weights, refers to the output of the blue neuron, and
[0075] S3. When training and optimizing, adopt the parameter layer sharing strategy, and force the coupled network to share a part of the parameters when updating the gradient, so that they can learn the common features;
[0076] As Figure 5 shown, the coupled network structure consists of a pair of identical networks - GAN1 and GAN2. Each GAN is responsible for synthesizing images in one domain. Each white square represents a parameter layer. The first half represents the generator, and the second half represents the discriminator. During the training process, we force them to share a part of the parameters, which enables them to learn to synthesize paired corresponding images without corresponding supervision.
[0077] Let and be the images sampled from the marginal distribution of the first domain and the marginal distribution of the second domain respectively. Let and be the generators of GAN1 and GAN2 respectively, Random input for the generator;
[0078] ;
[0079] Here and are the layer parameters of the generator, and is and The number of parameter layers of, the generator gradually decodes from the abstract high-level feature information to the more specific detailed information, the first layer decodes the high-level semantics, and the last layer decodes the low-level details.
[0080] Because the same high-level features need to be shared for images in two different domains, we enforce and The first layer of to have the same structure and share weights. This constraint enforces that the high-level semantics are decoded in the same way in and , and there is no constraint on the last layer, which implements the shared high-level features in different ways to deceive their respective discriminators.
[0081] Similarly, let and be the discriminant models of GAN1 and GAN2, and are and The layer parameters of.
[0082] As Figure 6 shown, the network outputs excellent results after only 100 iterations. The effects of generating numbers 1 and 2 are as shown in Figure 7 and Figure 8 shown, the change of the network loss is as shown in Figure 9 shown, where the blue line and the yellow line are the loss curves of the generators G1 and G2 respectively, and the green line and the red line are the loss curves of the discriminators D1 and D2 respectively, and both reach the convergence effect at about 150 iterations. The adaptation performance of the present invention in the field is compared with other methods as shown in Figure 10 shown, and the present invention is superior to the general method in terms of classification accuracy.
[0083] The above are only the preferred embodiments of the present invention, and do not impose any other form of limitation on the present invention. Any modification or equivalent change made according to the technical essence of the present invention still belongs to the scope protected by the present invention.
Claims
1. A method for designing a generative adversarial network based on quantum coupling, characterized in that: The following steps are involved: S1. Build a quantum machine learning model based on quantum coupling generative adversarial network, including two quantum patch generators G1 and G2 for generating false pixel information, and two classical discriminators D1 and D2 for distinguishing real and false pixel information; S2, inputting the real pixel information and the false pixel information generated by the quantum patch generator into the classical discriminator, and observing the classical discriminator's judgment probability after inputting the real pixel data and the false data generated by the quantum patch generator; S3. The parameter layer sharing strategy is adopted during training optimization. The G1, G2 and D1, D2 parameter layers are divided into shared layers and common layers. During the training optimization process, the coupled network is forced to share the shared layer parameters of the corresponding parameter layers of G1, G2 and D1, D2 when updating the gradient. and Share; S4. After repeating steps S2-S3 to reach the maximum number of iterations mum_epochs, an optimized quantum machine learning model based on quantum coupled quantum generative adversarial device is obtained. After the training is completed, the coupled generator learns to synthesize the corresponding image pairs without corresponding supervision; S5. Add a softmax layer after the classic discriminator to obtain two classifiers C1 and C2 to achieve domain adaptation classification accuracy.
2. The method for designing a quantum coupling-based generative adversarial network according to claim 1, characterized in that: In step S1, the adversarial network consists of two identical patch-generated adversarial networks, each of which consists of a quantum patch generator and a classical discriminator.
3. The method for designing a quantum coupling-based generative adversarial network according to claim 1, characterized in that: In step S2, the quantum patch generator is composed of at least two quantum sub-generators, each sub-generator uses five quantum bits, one of which is used as a redundant bit to provide nonlinear characteristics for the measurement result, and each bit is input into the parameterized quantum circuit after passing through the coding layer; The circuit structure of the quantum patch generator includes a Y rotation gate and a controlled Z gate. By adjusting the rotation angle parameter θ, various single quantum bit transformations are performed and quantum entanglement is embedded. The classical discriminator is constructed using a classical neural network. The basic architecture includes an input layer, L hidden layers and an output layer, where L in the L hidden layers is ≥ 1.
4. The method for designing a quantum coupling-based generative adversarial network according to claim 1, characterized in that: The parameter layer in step S3 is defined as follows: and They are respectively distributed from the edge of the first field and the marginal distribution of the second domain The image extracted from and They are the generators of GAN1 and GAN2 respectively, is the random input of the generator; ; here and are the layer parameters of the generator, and yes and The number of parameter layers, the generator gradually decodes abstract high-level feature information to more specific details, the first layer decodes high-level semantics, and the last layer decodes low-level details, forcing and The first layer of has the same structure and shares weights. The shared weight constraint enforces the high-level semantics in and The last layer is unconstrained and implements the shared high-level features in different ways to deceive their respective discriminators. Similarly, suppose and It is the discriminant model of GAN1 and GAN2. and yes and The layer parameters of the discriminator map the input image to a probability score, estimating the probability that the input image is real data. The first layer of the discriminant model extracts low-level features, and the last layer extracts high-level features, forcing and Having the same parameters of the last few layers is achieved by sharing the weights of the last few layers; 。 5. The method for designing a generative adversarial network based on quantum coupling according to claim 1, characterized in that: In step S4, the optimization algorithm of the quantum machine learning model is as follows, S4-1. Initialize the common layer parameters of quantum generators G1 and G2 , , shared layer parameters , initialize the common parameters of discriminators D1 and D2 , , shared layer parameters ; S4-2. Load the real image data real_data1 and real_data2 into the quantum register and Set up two quantum registers with a size of N quantum bits. After normalizing the data, load the data into the two registers through quantum amplitude encoding to obtain the real data quantum state. , load random noise fake_data1 and fake_data2 into quantum registers and ; S4-3. Random quantum states A pair of false quantum states are generated through two generators ; S4-4, use the discriminator to evaluate two pairs of true and false data respectively, and is the discrimination score of the discriminator for the real data and the generator output, Represents the overall parameters of the discriminator, "=" indicates assignment: ; S4-5. The two generated false quantum states Denormalization obtains two classic data generated by the generator generate_data 1、2; S4-6. Calculate the discriminator loss ; ; Calculating the generator loss ; ; S4-7. Update the parameters of the common layer of the generator and the discriminator normal layer parameters , is the learning rate, They are the updated gradient values for the generator common layer, the discriminator common layer, the generator shared layer, and the discriminator shared layer: ; Update the parameters of the shared layers of the generator and discriminator and ; ; S4-8, repeat S4-2 to S4-7 until all data in the training set are input; S4-9. Repeat S4-2 to S4-8 until the maximum number of iterations mum_epochs is reached.
6. The method for designing a quantum coupling-based generative adversarial network according to claim 1, characterized in that: In step S5, the classifier classifies the image as follows: a softmax layer is added after the last layer of the discriminator, and the digital classification problem in the MNIST domain is solved jointly, including using images and labels in the MNIST domain and the QCoGAN learning problem, including using images in the MNIST domain and the USPS domain to train the QCoGAN. The two classifiers are used to classify C1 in the MNIST domain and C2 in the USPS domain, respectively. The label information of the USPS domain is not used in the training process. The adaptation of the classifier from USPS to MNIST is achieved in the same way.