Quantum generative adversarial network medical image generation method based on adaptive selection

By adaptively adjusting the circuit structure and parameters of the quantum generative adversarial network, the problems of unstable training and insufficient generation quality of the quantum generative adversarial network in medical image generation are solved, and efficient and stable medical image generation is achieved.

CN120635676APending Publication Date: 2025-09-12UNIV OF ELECTRONICS SCI & TECH OF CHINA +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510988036.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-17
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

Existing quantum generative adversarial networks have problems such as training instability, gradient vanishing, and mode collapse in medical image generation tasks, and lack adaptive adjustment capabilities, making it difficult to meet high-precision generation requirements.

Method used

By evaluating the complexity of the input medical image, adaptively adjusting the number of circuit layers and entanglement mode of the quantum generator, combining the structural parameter optimization of the quantum discriminator, and using the quantum approximate optimization algorithm (QAOA) to optimize the angle parameters of the revolving door, stable training and efficient generation of quantum generative adversarial networks are achieved.

Benefits of technology

It significantly improves the quality and computational efficiency of medical image generation, improves the generation quality and discrimination robustness of the model, adapts to different image distributions and task switching, and meets high-precision generation requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120635676A_ABST
    Figure CN120635676A_ABST
Patent Text Reader

Abstract

The invention discloses a quantum generative adversarial network medical image generation method based on adaptive selection, a quantum generative adversarial network comprises a quantum generator and a quantum discriminator, and the method comprises a quantum generative adversarial network generation step; the method comprises a quantum generative adversarial network generation step which comprises the following sub-steps: performing complexity evaluation on an input medical image for training; dividing each image into complexity grades according to a complexity evaluation result; and establishing an entanglement mode of the circuit layer number and the entanglement gate in the quantum generator according to the average complexity of all the training images. In an exemplary embodiment of the invention, a regulation and control mechanism of a quantum generator driven by image structure complexity is introduced, grading is performed through calculation complexity, and the depth (layer number), quantum gate layout and entanglement path structure of a quantum circuit are adaptively adjusted according to the grading, so that circuit resource configuration better meets the image content expression requirement, and the image content expression efficiency is improved. Therefore, the generation quality and the operation efficiency are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of quantum generative adversarial networks, and in particular to a quantum generative adversarial network medical image generation method based on adaptive selection. Background Art

[0002] In recent years, generative adversarial networks (GANs) have made significant progress in tasks such as image generation, image restoration, and style transfer. In medical image processing, GANs are widely used for tasks such as data augmentation, artifact removal, and lesion synthesis to alleviate challenges such as data acquisition difficulties and high annotation costs. However, in practical applications, classic GAN models still face challenges such as training instability, vanishing gradients, and mode collapse. This is particularly true for medical image generation tasks, which require extremely high image quality and structural fidelity, where performance still faces significant bottlenecks.

[0003] With the development of quantum computing, quantum generative adversarial networks (QGANs) have emerged. By incorporating quantum circuits as the core architecture of the generator and discriminator, QGANs leverage the expressive power of quantum superposition, entanglement, and high-dimensional Hilbert spaces. In theory, they can efficiently model complex data distributions at a relatively small scale. A typical implementation employs variational quantum circuits (VQCs) to construct the generator and discriminator, with quantum measurement results driving model training and parameter optimization. While QGANs have shown promise in theoretical research and preliminary experiments, several key technical hurdles remain for their practical application.

[0004] First, the current quantum circuit architecture design in QGANs relies heavily on empirical rules, often constructed from fixed topological templates. This lacks the ability to adapt to input data characteristics or task complexity, leading to significant fluctuations in model performance and poor generalization when faced with varying image distributions or task switching. Second, QGANs rely heavily on quantum measurement feedback during training. However, due to the inherent stochasticity of quantum state measurements, gradient estimation suffers from significant errors, resulting in inefficient parameter optimization and unstable training. Traditional optimization strategies often struggle to effectively address this issue, particularly in high-dimensional parameter spaces. Furthermore, the generator and discriminator in current QGANs are often designed independently, lacking a dynamic coordination mechanism for interaction during training. This can lead to training imbalances, model crashes, or degradation in generation quality, hindering overall performance. Finally, while QGANs have the potential to handle complex high-dimensional distributions, their generated results in the specialized field of medical image generation still struggle to fully meet practical application requirements in terms of fidelity, structural consistency, and discriminative robustness. The model architecture and training process require in-depth customization and optimization based on the specific characteristics of medical images.

[0005] In summary, QGAN, as an important research direction integrating quantum computing and generative modeling, has theoretical advantages and development potential. However, it still faces a series of common technical bottlenecks in quantum circuit design, parameter optimization, collaborative training mechanism, and actual adaptability, which restricts its widespread application in high-precision generation tasks such as medical images. Summary of the Invention

[0006] The purpose of the present invention is to overcome the shortcomings of the existing technology and provide a quantum generative adversarial network medical image generation method based on adaptive selection.

[0007] The object of the present invention is achieved through the following technical solutions: A first aspect of the present invention provides a method for generating medical images using a quantum generative adversarial network based on adaptive selection, wherein the quantum generative adversarial network includes a quantum generator and a quantum discriminator, and the method includes a quantum generative adversarial network generation step; The method includes a quantum generative adversarial network generation step, including the following sub-steps: Perform complexity evaluation on input medical images used for training; Divide each image into a complexity level according to the complexity evaluation results; The number of circuit layers in the quantum generator and the entanglement mode of the entanglement gate are established according to the average complexity of all training images.

[0008] Furthermore, the complexity evaluation of the input medical image for training includes: Use edge detection operators to extract edge features from each image , count the number and intensity of edge pixels, and calculate the edge score after normalization; The spatial distribution characteristics of the grayscale of each image are analyzed based on the grayscale co-occurrence matrix, and the texture indicators of contrast, energy, and uniformity are calculated. The texture score is calculated according to the preset weights. The image segmentation method is used to extract the region set of each image to count the number, size and boundary complexity of the connected regions, and the hierarchical score is calculated according to the preset weights; The edge score, texture score and layer score are calculated according to the preset weights to obtain the complexity score of the complexity assessment.

[0009] Furthermore, classifying each image into a complexity level according to the complexity evaluation result includes: Normalize the structural complexity scores of all images; Set three complexity division thresholds and divide the complexity level into four levels: low complexity level, medium complexity level, medium-high complexity level, and high complexity level; The method of establishing the number of layers of the rotation gate and the entanglement mode of the entanglement gate in the quantum generator according to the average complexity of all training images includes: For average complexity in the low complexity level range: number of circuit layers Maintain the most basic circuit layers Right now The entanglement gate uses local entanglement or chain entanglement, that is, only entanglement is established between adjacent quantum bits. For average complexity in the medium complexity level range: the number of circuit layers is set to The entanglement gate uses partial full-connection entanglement, that is, full interconnection entanglement is performed only in a specific area or subset; For average complexity in the medium and high complexity level range: the number of circuit layers is set to ,in The entanglement gate uses a denser fully connected entanglement method to achieve full interconnection between all quantum bits. For the average complexity in the high complexity level range: the number of circuit layers is set to ,in ; The entanglement method of the entanglement gate adopts a multi-level nested entanglement structure.

[0010] Furthermore, the quantum generative adversarial network generation step further includes the following sub-steps: The meta-parameterizer module builds the structural parameter vector of the quantum discriminator circuit based on the circuit summary sent by the quantum generator.

[0011] Furthermore, the circuit summary includes the current circuit layer number of the quantum generator and the entanglement topology encoding The meta-parameter module is implemented by a quantum variational circuit.

[0012] Furthermore, the method further includes a quantum generative adversarial network training step located after the quantum generative adversarial network generation step, and the quantum generative adversarial network training step includes the following sub-steps: A batch of input medical images to be trained is encoded into a first quantum state image, the quantum generator encodes the input noise into a second quantum state image, and the quantum discriminator discriminates the first quantum state image and the second quantum state image to obtain a discrimination result; The parameters of the quantum generator and the quantum discriminator are optimized using the discrimination results, the loss function of the quantum generator, and the loss function of the quantum discriminator to obtain a trained quantum generative adversarial network; wherein, during the training process, the number of circuit layers and the entanglement mode of the quantum generator and the quantum discriminator are frozen, and only the angle parameters of the revolving gates in the quantum generator and the quantum discriminator are adjusted.

[0013] Furthermore, the adjusting the angle parameters of the revolving gates in the quantum generator and the quantum discriminator includes: Set the initial angle parameters for the rotation gates in the quantum circuits of the quantum generator and quantum discriminator; The total loss function is obtained by using the adversarial loss function of the quantum generator and the discrimination error loss function of the quantum discriminator. The parameters of the trained quantum generator and quantum discriminator are obtained by minimizing the total loss function. Execute the quantum circuit using the current angle parameters and perform quantum measurements to obtain output data; Calculate the loss value corresponding to the total loss function based on the output data; Based on the learning rate and the gradient of the loss function, the loss value is used to update the angle parameters of the revolving gate in the quantum generator and quantum discriminator until convergence.

[0014] Furthermore, the method further includes a quantum generative adversarial network using step located after the quantum generative adversarial network training step, and the quantum generative adversarial network using step includes the following sub-steps: Generate a third quantum state image using the quantum generator in the trained quantum generative adversarial network; The third quantum state image is subjected to quantum measurement to obtain a classical adversarial image.

[0015] Furthermore, the input medical images for training are images of the same category.

[0016] The beneficial effects of the present invention are: In an exemplary embodiment of the present invention, a quantum generator control mechanism driven by image structure complexity is introduced. The generator is graded according to computational complexity, and the depth (number of layers) of the quantum circuit, quantum gate layout, and entanglement path structure are adaptively adjusted accordingly. This allows the circuit resource configuration to better meet the requirements of image content expression, thereby significantly improving generation quality and computational efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 This is a flowchart of a method for medical image generation based on a quantum generative adversarial network with adaptive selection provided in an exemplary embodiment of the present invention; Figure 2 A schematic diagram of a quantum generative adversarial network provided in an exemplary embodiment of the present invention; Figure 3 A schematic diagram of a quantum circuit of a quantum generator provided in an exemplary embodiment of the present invention; Figure 4 Schematic diagram of a quantum circuit of a quantum discriminator provided in an exemplary embodiment of the present invention. DETAILED DESCRIPTION

[0018] The technical solution of the present invention is described clearly and completely below with reference to the accompanying drawings. It is apparent that the embodiments described are only a portion of the embodiments of the present invention, not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without inventive effort are intended to fall within the scope of protection of the present invention.

[0019] In the description of the present invention, it should be noted that the directions or positional relationships indicated by terms such as "center," "up," "down," "left," "right," "vertical," "horizontal," "inside," and "outside" are based on the directions or positional relationships described in the accompanying drawings and are intended solely to facilitate and simplify the description of the present invention. They are not intended to indicate or imply that the devices or components referred to must have a specific orientation, be constructed, or operate in a specific orientation. Therefore, they should not be construed as limitations on the present invention. Furthermore, terms such as "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0020] In the description of the present invention, it should be noted that, unless otherwise expressly specified or limited, the terms "mounted," "connected," and "connected" should be understood in a broad sense. For example, they may refer to fixed connections, detachable connections, or integral connections; mechanical connections or electrical connections; direct connections or indirect connections through an intermediate medium; and internal communication between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention.

[0021] In addition, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0022] See also Figure 1 , Figure 1 FIG1 shows a flowchart of a method for generating medical images using a quantum generative adversarial network based on adaptive selection according to an exemplary embodiment of the present invention. Figure 2 As shown, the quantum generative adversarial network includes a quantum generator and a quantum discriminator, and the method includes a quantum generative adversarial network generation step; The method includes a quantum generative adversarial network generation step, including the following sub-steps: Perform complexity evaluation on input medical images used for training; Divide each image into a complexity level according to the complexity evaluation results; The number of circuit layers in the quantum generator and the entanglement mode of the entanglement gate are established according to the average complexity of all training images.

[0023] First, it's important to note that quantum generative adversarial networks (GANs) consist of a quantum generator and a quantum discriminator. The GAN generation step primarily focuses on the generation of the quantum generator. The quantum generator, whose input is random noise, primarily generates new images with similar characteristics to real medical images, particularly in specific application scenarios such as medical image analysis and lesion identification.

[0024] In this exemplary embodiment, a control mechanism for a quantum generator driven by image structure complexity is introduced for the first time. The generator is graded according to the complexity of the calculation, and the depth (number of layers) of the quantum circuit, the layout of quantum gates, and the entanglement path structure are adaptively adjusted accordingly, so that the circuit resource configuration is more in line with the needs of image content expression, thereby significantly improving the generation quality and computing efficiency.

[0025] More preferably, in an exemplary embodiment, performing complexity evaluation on the input medical image for training includes: Use edge detection operators to extract edge features from each image , count the number and intensity of edge pixels, and calculate the edge score after normalization; The spatial distribution characteristics of the grayscale of each image are analyzed based on the grayscale co-occurrence matrix, and the texture indicators of contrast, energy, and uniformity are calculated. The texture score is calculated according to the preset weights. The image segmentation method is used to extract the region set of each image to count the number, size and boundary complexity of the connected regions, and the hierarchical score is calculated according to the preset weights; The edge score, texture score and layer score are calculated according to the preset weights to obtain the complexity score of the complexity assessment.

[0026] Specifically, in this exemplary embodiment, when performing complexity evaluation on a batch of input medical images, the complexity score is calculated for each image individually to ensure the accuracy of the quantitative results. Specifically: (1) First, use edge detection operators (such as Canny operators) to extract edge features for each image. , count the number and intensity of edge pixels. The richer the edges, the more complex the image structure.

[0027] represents the number of edge pixels in the m-th image, represents the sum of edge strengths in the mth image, Representing an image The edge response value at position (x,y), Represents the brightness intensity of the pixel, x represents the image The two-dimensional pixel horizontal coordinates and y images in The two-dimensional pixel vertical coordinate in , e represents the type of edge detection operator used, and m represents the image number or index; Calculate edge score after normalization : in, is the total number of pixels in the image, is the maximum possible pixel intensity, , is the weight coefficient.

[0028] (2) Based on the gray-level co-occurrence matrix (GLCM), the spatial distribution characteristics of grayscale are analyzed and the texture indices of contrast, energy, and uniformity are calculated to reflect the richness of the image surface texture.

[0029] in, represents the texture contrast of the mth image, Represents the pixel pairs with gray levels i and j in the image The probability of the CCP appearing represents the texture energy of the mth image, represents the texture uniformity of the mth image, i represents the row index in the gray-level co-occurrence matrix, j represents the column index in the gray-level co-occurrence matrix, and m represents the image number or index; Texture score Calculated as: in, , , is the weight coefficient.

[0030] (3) Again, extract the region set through image segmentation method , the number, size and boundary complexity of connected regions are counted to reflect the regional structural hierarchy.

[0031] in is the length of the boundary of the kth region, is the perimeter of its convex hull. represents the number of connected regions in the m-th image, represents the average area of ​​all regions in the mth image, Indicates area , represents the boundary complexity score of the mth image, r represents the region number, and m represents the image number; in, , , is the weight coefficient.

[0032] (4) The three types of features of each image are scored separately. Finally, the comprehensive complexity score of the image is obtained in the form of weighted linear combination. Among them, α, β, and γ are weight coefficients that adjust the contribution ratio of different features to the score.

[0033] (5) Finally, the complexity scores of all images in the batch are calculated to obtain the complexity set: Where M is the number of batches. By calculating the complexity score for all images in a batch, we can quantify the complexity distribution of the image collection, assisting with subsequent image processing and analysis tasks. When processing a batch of images, we extract the above features and calculate the complexity score for each image in turn, thus obtaining the complexity distribution of all images in the batch.

[0034] More preferably, in an exemplary embodiment, classifying each image into a complexity level according to the complexity evaluation result includes: Normalize the structural complexity scores of all images; Set three complexity division thresholds to divide the complexity level into four levels: low complexity level, medium complexity level, medium-high complexity level, and high complexity level; Establish the number of layers of rotation gates and the entanglement method of entanglement gates in the quantum generator according to the average complexity of all training images, including: For the average complexity within the low complexity level range: the number of circuit layers Maintain the most basic number of circuit layers That is ; The entanglement method of the entanglement gate adopts local entanglement or chain entanglement, that is, an entanglement relationship is established only between adjacent qubits; <​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ High complexity level: The specific value of the threshold can be set and dynamically adjusted according to the actual application scenario and the distribution of training samples.

[0038] Through the above-mentioned division of complexity levels, the quantum generator can dynamically adjust its circuit depth, number of parameters and operation complexity according to the complexity of the image structure, so as to achieve adaptive and efficient generation of images of different complexities, thereby improving the generation effect and resource utilization efficiency.

[0039] (2) Quantum basic circuit structure The quantum generator adopts a circuit structure in which rotation gates and entanglement gates are stacked alternately.

[0040] Revolving gates: Revolving gates such as RX, RY, and RZ are used to adjust the phase and amplitude of quantum bits. Their rotation angles serve as learnable parameters and are directly involved in the model training process.

[0041] Entanglement gates (such as CNOT, CZ, iSWAP) are used to introduce non-local dependencies between quantum bits to enhance the expressive power of the quantum state space.

[0042] Typically, a base number of layers, L0, is set first. This base number, L0, can be determined based on the generator's baseline capabilities or hardware limitations, ensuring the generator possesses basic generation capabilities under low-complexity conditions. Subsequently, by stacking multiple layers of rotation gates and entanglement gates, the generator can simulate high-dimensional distributions to support complex image generation tasks, further improving its expressive power and generation results.

[0043] (3) Dynamically adjust the number of quantum circuit layers To achieve a flexible and efficient circuit configuration mechanism during the adaptive structural adjustment of the quantum generator, a dynamic adjustment strategy for the number of quantum circuit layers based on the image structural complexity level is adopted. This strategy dynamically sets the number of circuit layers used by the quantum generator based on the complexity level corresponding to the structural complexity score C of the input medical image, thereby improving model generation capabilities while rationally controlling quantum resource consumption.

[0044] Specifically, the quantum generator's basic circuit layer number is L0, which is used to process images with simple structures and small feature changes. When the image is divided into different complexity levels, the number of circuit layers will be adaptively adjusted according to the following strategy: Low complexity level: The image structure is simple, with few texture details, and only the most basic circuit layers need to be maintained , to reduce redundant interference between quantum bits and save computing resources; Medium complexity level: The image has certain structural features and detail changes. Based on L0, the number of circuit layers is appropriately increased. For example, it is set to , to enhance the nonlinear expression capability of quantum generators, thereby better capturing key structural information in moderately complex images; Medium to high complexity level: The image presents more complex spatial structure and texture features, and the circuit depth needs to be further improved. The number of circuit layers is set to ,in , to improve the model's ability to model multi-scale information and spatial patterns; High complexity level: The image structure is the most complex, with high nonlinearity and dense texture distribution, requiring a deeper quantum circuit level, set to ,in , to maximize the modeling potential of quantum generators and ensure the full capture and realistic reconstruction of complex image structures.

[0045] In order to prevent the waste of resources and unstable training caused by the unconstrained growth of circuit depth, this exemplary embodiment further introduces a circuit depth upper limit constraint mechanism based on the above mechanism. That is, when adjusting the number of circuit layers, a preset maximum number of circuit layers is introduced. , ensure that the final circuit depth meets the following conditions: Among them, L0 is the basic circuit layer number of the quantum generator, are the number of layer extensions set for each complexity level, The maximum number of circuit layers allowed is set based on the upper limit of quantum hardware resources, training stability requirements, and computing budget.

[0046] (4) Entanglement method selection During the adaptive adjustment of the quantum generator's structure, in addition to classifying the complexity levels based on the structural complexity score C, it is also necessary to rationally select the entanglement method based on the image complexity. The choice of entanglement method directly affects the expressive power and generation performance of the quantum circuit, and therefore becomes a key indicator of adaptive adjustment.

[0047] Specifically, the present invention proposes the following dynamic selection strategy for entanglement mode based on complexity level: Low complexity: Images with simple structures and minimal texture information require less nonlinear modeling, making them suitable for local entanglement or linear entanglement. These structures only establish entanglement between adjacent qubits, effectively reducing the number of required entanglement gates and circuit depth, helping to mitigate noise impact and increase generation speed.

[0048] Medium complexity level: The image has a certain hierarchy and feature distribution, and it is suitable to use partial all-to-all entanglement, that is, full interconnection entanglement is only performed within a specific area or subset to improve the information flow between quantum bits and enhance the model's ability to model medium-complexity structures.

[0049] Medium-to-high complexity level: The image has a significant internal structure and rich information levels, which requires stronger modeling capabilities. It is suitable to adopt a denser all-to-all entanglement to achieve full interconnection between all quantum bits, strengthen global feature correlation modeling, and improve image structure restoration capabilities.

[0050] High complexity level: Images exhibit highly complex and multi-scale structures, making it suitable to adopt a hierarchical or multi-scale entangling structure. For example, different granularity entangling strategies can be set between different sub-modules or circuit layers to achieve collaborative modeling of local and global information, further enhancing the generator's perception of complex image features and nonlinear mapping capabilities.

[0051] The quantum circuit of one of the quantum generators constructed using this exemplary embodiment is as follows Figure 3 shown.

[0052] More preferably, in an exemplary embodiment, the quantum generative adversarial network generation step further includes the following sub-steps: The meta-parameterizer module builds the structural parameter vector of the quantum discriminator circuit based on the circuit summary sent by the quantum generator.

[0053] More preferably, in an exemplary embodiment, the circuit summary includes the current circuit layer number of the quantum generator and the entanglement topology encoding The meta-parameter module is implemented by a quantum variational circuit.

[0054] Specifically, the quantum discriminator inputs include pre-processed quantum-encoded real medical images and forged images generated by the quantum generator. It aims to distinguish between genuine and fake images and provide feedback for generator optimization. Its architecture uses a variational quantum circuit consisting of alternating rotation gates and entanglement gates to extract local features and capture global structure. In the above two exemplary embodiments, in order to improve the adaptability and robustness of the quantum discriminator to the diverse configuration of the quantum generator structure, this exemplary embodiment introduces a quantum discriminator-adapted metaparameter module. This module receives the circuit summary vector of the quantum generator. , which contains the current number of circuit layers of the quantum generator , entanglement topological coding And other key information, recorded as: Metaparameters via quantum variational circuits To achieve As input, generate the structural parameter vector of the quantum discriminator circuit in represents the recommended number of layers of the quantum discriminator circuit, This output is used to dynamically configure the quantum discriminator's circuit architecture, ensuring structural consistency and adaptability with the quantum generator. This mechanism allows the quantum discriminator to flexibly adjust its structure to changes in the quantum generator during each training batch, enhancing its feature extraction capabilities and discrimination accuracy, thereby improving the stability of adversarial training and overall generation quality.

[0055] Therefore, in the above two exemplary embodiments, a quantum generator-aware quantum discriminator collaborative structure control mechanism is realized: by innovatively proposing a perception and response mechanism of the discriminator structure to the generator state, a circuit summary vector is constructed to describe the quantum structural characteristics of the current quantum generator (such as layer depth, entanglement topology, etc.), and the meta-parameter module in the quantum discriminator decodes the summary information to realize the online structural adjustment of the quantum discriminator circuit, enhance the discrimination robustness and optimize the collaborative evolution efficiency in the generation-discrimination game.

[0056] In combination with the exemplary embodiment of complexity calculation, a dynamic control mechanism of quantum generator and quantum discriminator structure driven by image structure complexity is introduced for the first time. By calculating the characteristic indicators such as texture entropy and edge gradient density of the image, the image complexity is graded, and the depth (number of layers) and entanglement path structure of the quantum circuit are adaptively adjusted accordingly, so that the circuit resource configuration is more in line with the image content expression requirements, thereby significantly improving the generation quality and computing efficiency.

[0057] The quantum circuit of one of the quantum discriminators constructed using this exemplary embodiment is as follows: Figure 4 shown.

[0058] More preferably, in an exemplary embodiment, the method further includes a quantum generative adversarial network training step located after the quantum generative adversarial network generation step, and the quantum generative adversarial network training step includes the following sub-steps: A batch of input medical images to be trained is encoded into a first quantum state image, the quantum generator encodes the input noise into a second quantum state image, and the quantum discriminator discriminates the first quantum state image and the second quantum state image to obtain a discrimination result; The parameters of the quantum generator and the quantum discriminator are optimized using the discrimination results, the loss function of the quantum generator, and the loss function of the quantum discriminator to obtain a trained quantum generative adversarial network; wherein, during the training process, the number of circuit layers and the entanglement mode of the quantum generator and the quantum discriminator are frozen, and only the angle parameters of the revolving gates in the quantum generator and the quantum discriminator are adjusted.

[0059] Specifically, to prevent model training instability caused by frequent structural adjustments during quantum circuit training, this exemplary embodiment designed a batch-level structural freezing mechanism. Specifically, in each training iteration, all images in the current batch are first uniformly scored and graded for complexity. Then, based on the average complexity level of the batch of images, the adopted quantum generator and quantum discriminator structures are determined, including configurations such as the number of circuit layers, entanglement method, and parameter layout.

[0060] Throughout the entire batch, the determined quantum circuit structure remains frozen, and only the angle parameters of the adjustable rotation gate are optimized. This mechanism effectively prevents gradient fluctuations and training oscillations caused by frequent changes in the quantum generator and quantum discriminator structures during training, significantly improving the stability of the training process and the quality of the final generated results.

[0061] It should be noted that input noise refers to a set of random vectors or states input to the quantum generator.

[0062] More preferably, in an exemplary embodiment, adjusting the angle parameters of the revolving gates in the quantum generator and the quantum discriminator includes: Set the initial angle parameters for the rotation gates in the quantum circuits of the quantum generator and quantum discriminator; The total loss function is obtained by using the adversarial loss function of the quantum generator and the discrimination error loss function of the quantum discriminator. The parameters of the trained quantum generator and quantum discriminator are obtained by minimizing the total loss function. Execute the quantum circuit using the current angle parameters and perform quantum measurements to obtain output data; Calculate the loss value corresponding to the total loss function based on the output data; Based on the learning rate and the gradient of the loss function, the loss value is used to update the angle parameters of the revolving gate in the quantum generator and quantum discriminator until convergence.

[0063] Specifically, before optimizing quantum gate parameters, the quantum generator and quantum discriminator structures must be fixed, meaning the number of circuit layers and entanglement scheme remain unchanged. In this exemplary embodiment, based on this fixed structure, the present invention introduces a quantum approximate optimization algorithm (QAOA) for joint optimization of angular parameters. QAOA is used to adjust the angular parameters of rotation gates (such as RX, RY, and RZ) in the generator and discriminator, thereby enabling efficient training and optimization of the network. The following are the specific steps for adjusting these angular parameters: (1) Initialize angle parameters Set the initial angle parameters for the rotation gates (such as RX, RY, RZ) in the quantum circuit of the quantum generator , and set the initial angle parameters for the rotation gates (such as RX, RY, RZ) in the quantum circuit of the quantum discriminator These parameters can be initialized randomly or set empirically.

[0064] The initial angle parameter is defined as: in, and is the angle of each revolving gate in the quantum generator and quantum discriminator.

[0065] (2) Constructing the target optimization function The target optimization function is to quantify the model performance of the current parameter configuration through the weighted sum of the loss functions of the quantum generator and the quantum discriminator. Common loss functions include the adversarial loss of the quantum generator and the discrimination error of the quantum discriminator. Defined as: in, is the loss of the quantum generator, is the loss of the quantum discriminator. The goal is to minimize this loss function to obtain the optimal quantum generator and quantum discriminator parameters.

[0066] (3) Executing quantum circuits and measurements Use the current angle parameter and , execute the quantum circuit. The quantum state |θ)> generated by the quantum circuit can be expressed as: in, is a quantum operation consisting of a revolving door, is the initial state of all qubits. Execute the quantum circuit and perform quantum measurements to obtain output data.

[0067] (4) Calculate the loss value Calculate loss function based on quantum measurement results , which includes the error of the quantum generator (such as mean squared error) and the cross entropy loss of the quantum discriminator: in, and Denote the generated image and the real image respectively, and D(I) is the predicted value of the quantum discriminator for the image.

[0068] (5) QAOA iterative execution QAOA progressively optimizes angular parameters by iteratively executing quantum circuits. During each round of optimization, QAOA performs rotation and entanglement operations on the quantum circuit to explore different parameter configurations. The quantum state generated by the quantum circuit serves as the output of the quantum computation, and the parameters are adjusted through feedback from quantum measurements.

[0069] After each round of QAOA execution, the new angle parameters and will be updated according to the results of the current loss function. The specific update process is as follows: in, is the learning rate of QAOA, and is the gradient of the loss function (6) Quantum Approximate Optimization (QAOA) Implementation Details QAOA updates the angle parameters of the revolving door through multiple iterations of quantum circuits, exploring the parameter space and gradually approaching the optimal solution.

[0070] Each round of QAOA optimization generates a new quantum state, which is fed back through quantum measurements to generate a loss function. The QAOA algorithm minimizes the loss function by optimizing the angle parameters in the quantum circuit and adjusting the parameters based on the measurement results.

[0071] (7) Convergence and application of optimization parameters After multiple rounds of QAOA iterations, the angular parameters of the quantum generator and quantum discriminator gradually converged to the optimal configuration. The optimized angular parameters were finally determined and applied to the training process. The quantum generator was able to produce high-quality images, and the quantum discriminator was able to effectively distinguish between real and generated images.

[0072] Through iterative execution of QAOA, the rotation angles in quantum generative adversarial networks can be efficiently optimized, thereby improving the overall performance of the quantum generator and quantum discriminator. By alternating between quantum computation and quantum measurement, QAOA can explore large-scale parameter spaces to find the optimal angle configuration.

[0073] To summarize, in this exemplary embodiment, a rotation angle quantum gate joint optimization framework is integrated with QAOA: to address the challenges of difficult rotation gate parameter optimization and serious local optimality problems in traditional quantum generative adversarial networks, this exemplary embodiment introduces a quantum approximate optimization algorithm (QAOA) to construct a joint loss function shared by the quantum generator and the quantum discriminator, and iteratively optimizes the rotation angle configuration in the joint parameter space through a quantum measurement feedback mechanism, effectively improving the global convergence and stability of model training.

[0074] More preferably, in an exemplary embodiment, the method further includes a quantum generative adversarial network using step located after the quantum generative adversarial network training step, and the quantum generative adversarial network using step includes the following sub-steps: Generate a third quantum state image using the quantum generator in the trained quantum generative adversarial network; The third quantum state image is subjected to quantum measurement to obtain a classical adversarial image.

[0075] Specifically, in this exemplary embodiment, the output of the quantum generator in a QGAN is a quantum state. This quantum state requires quantum measurement to obtain classical information, thereby generating an image. The output of quantum computing is typically obtained by measuring the probability distribution of qubits in their ground state. These probabilities are then mapped to the pixel values ​​of the image. Through multiple measurements, a complete image data set can be obtained, completing the conversion of the quantum state into a medical image.

[0076] It's important to note that the trained network can be used to generate medical images with clinical reference value, enabling doctors to identify lesions and conduct structural comparative analysis. In other words, classic adversarial images can be used to provide auxiliary judgment and assist doctors in their clinical decision-making.

[0077] Specifically, a medical image or noise code of the same modality and anatomical location is input into a trained quantum generator to generate a corresponding quantum state image. After adversarial training using a generative adversarial network, this quantum state image is converted into a visual classical image through quantum measurement operations. This image is particularly suitable for constructing auxiliary reference images when the number of samples is limited, thereby improving diagnostic accuracy and early recognition efficiency.

[0078] Preferably, in an exemplary embodiment, the training input medical images are of the same category. For example, each training batch contains image samples with the same modality and anatomical location, such as a set of lung CT images or brain MRI images. This ensures uniformity in scoring and structural adjustments, and facilitates subsequent use of images of the same category.

[0079] More preferably, in an exemplary embodiment, an image pre-processing step is included before the medical image is input into the quantum discriminator.

[0080] Image preprocessing consists of multiple steps to ensure the quality and consistency of the input data.

[0081] Image normalization: Linearly scale the pixel values ​​of a batch of input medical images to the range [0, 1] to improve the consistency and stability of subsequent processing.

[0082] Denoising: Use denoising algorithms to remove noise from the image to ensure that the extracted features are more accurate and clear.

[0083] Quantum mapping: By mapping quantum states, the processed image information is converted into the state of quantum bits, providing suitable input for the quantum generator.

[0084] The purpose of this series of preprocessing steps is to ensure that the image data can be efficiently processed in the quantum circuit to produce high-quality medical images.

[0085] It should be noted that (1) the image preprocessing step is only applicable to real medical images input to the discriminator to ensure the quality and consistency of the input data; the input noise, as a random input variable of the quantum generator, does not contain structural information and therefore does not undergo image preprocessing operations.

[0086] (2) The real images used as input to the discriminator and the medical images used for adaptive generator structure design come from the same set of raw image data, but they each perform different functions in the system: on the one hand, after preprocessing, the images are input to the discriminator through quantum coding for authenticity discrimination with the generated images; on the other hand, the same images, before quantum mapping, are used as the object of structural complexity scoring to calculate indicators such as edges, textures, and regional levels to guide the structural adaptive adjustment of the generator. Therefore, the images achieve functional separation and reuse in the discriminator input and complexity scoring.

[0087] In this exemplary embodiment, special consideration is given to the diagnostic sensitivity and structural fidelity of medical images. Normalization, quantum state embedding, and noise reduction and de-artifacting are introduced in the preprocessing stage to ensure high-fidelity representation of images in quantum circuits. In the structural design, semantic features such as image spatial information, texture levels, and organ boundaries are integrated to achieve high-resolution and structurally consistent medical image generation results, providing a more practical quantum computing solution for clinical auxiliary diagnosis.

[0088] Obviously, the above embodiments are merely examples for clarity of explanation and are not intended to limit the implementation methods. Those skilled in the art will readily appreciate that other variations or modifications can be made based on the above descriptions. It is not necessary and impossible to enumerate all implementation methods here. Obvious variations or modifications derived therefrom remain within the scope of protection of the present invention.

Claims

1. A method for medical image generation based on a quantum generative adversarial network with adaptive selection, wherein the quantum generative adversarial network comprises a quantum generator and a quantum discriminator, and the method comprises a quantum generative adversarial network generation step; characterized in that: The method includes a quantum generative adversarial network generation step, including the following sub-steps: Perform complexity evaluation on input medical images used for training; Divide each image into a complexity level according to the complexity evaluation results; The number of circuit layers in the quantum generator and the entanglement mode of the entanglement gate are established according to the average complexity of all training images.

2. The method for medical image generation based on quantum generative adversarial networks with adaptive selection according to claim 1, characterized in that: The complexity evaluation of the input medical image for training includes: Use edge detection operators to extract edge features from each image , count the number and intensity of edge pixels, and calculate the edge score after normalization; The spatial distribution characteristics of the grayscale of each image are analyzed based on the grayscale co-occurrence matrix, and the texture indicators of contrast, energy, and uniformity are calculated. The texture score is calculated according to the preset weights. The image segmentation method is used to extract the region set of each image to count the number, size and boundary complexity of the connected regions, and the hierarchical score is calculated according to the preset weights; The edge score, texture score and layer score are calculated according to the preset weights to obtain the complexity score of the complexity assessment.

3. The method for medical image generation based on quantum generative adversarial networks with adaptive selection according to claim 2, characterized in that: The step of classifying each image into a complexity level according to the complexity evaluation result includes: The structural complexity scores of all images were normalized; Set three complexity division thresholds and divide the complexity level into four levels: low complexity level, medium complexity level, medium-high complexity level, and high complexity level; The method of establishing the number of layers of the rotation gate and the entanglement mode of the entanglement gate in the quantum generator according to the average complexity of all training images includes: For average complexity in the low complexity level range: number of circuit layers Maintain the most basic circuit layers Right now The entanglement gate uses local entanglement or chain entanglement, that is, only entanglement is established between adjacent quantum bits. For average complexity in the medium complexity level range: the number of circuit layers is set to The entanglement gate uses partial full-connection entanglement, that is, full interconnection entanglement is performed only in a specific area or subset; For average complexity in the medium and high complexity level range: the number of circuit layers is set to ,in The entanglement gate uses a denser fully connected entanglement method to achieve full interconnection between all quantum bits. For the average complexity in the high complexity level range: the number of circuit layers is set to ,in ; The entanglement method of the entanglement gate adopts a multi-level nested entanglement structure.

4. The method for medical image generation based on quantum generative adversarial networks with adaptive selection according to claim 1, characterized in that: The quantum generative adversarial network generation step further includes the following sub-steps: The meta-parameterizer module builds the structural parameter vector of the quantum discriminator circuit based on the circuit summary sent by the quantum generator.

5. The method for medical image generation based on quantum generative adversarial networks with adaptive selection according to claim 4, characterized in that: The circuit summary includes the current number of circuit layers of the quantum generator and the entanglement topology encoding The meta-parameter module is implemented by a quantum variational circuit.

6. The method for medical image generation based on quantum generative adversarial networks with adaptive selection according to claim 1 or 4, characterized in that: The method further includes a quantum generative adversarial network training step located after the quantum generative adversarial network generation step, and the quantum generative adversarial network training step includes the following sub-steps: A batch of input medical images to be trained is encoded into a first quantum state image, the quantum generator encodes the input noise into a second quantum state image, and the quantum discriminator discriminates the first quantum state image and the second quantum state image to obtain a discrimination result; The parameters of the quantum generator and the quantum discriminator are optimized using the discrimination results, the loss function of the quantum generator, and the loss function of the quantum discriminator to obtain a trained quantum generative adversarial network; wherein, during the training process, the number of circuit layers and the entanglement mode of the quantum generator and the quantum discriminator are frozen, and only the angle parameters of the revolving gates in the quantum generator and the quantum discriminator are adjusted.

7. The method for medical image generation based on quantum generative adversarial networks with adaptive selection according to claim 6, characterized in that: The adjusting the angle parameters of the revolving gates in the quantum generator and the quantum discriminator includes: Set the initial angle parameters for the rotation gates in the quantum circuits of the quantum generator and quantum discriminator; The total loss function is obtained by using the adversarial loss function of the quantum generator and the discrimination error loss function of the quantum discriminator. The parameters of the trained quantum generator and quantum discriminator are obtained by minimizing the total loss function. Execute the quantum circuit using the current angle parameters and perform quantum measurements to obtain output data; Calculate the loss value corresponding to the total loss function based on the output data; Based on the learning rate and the gradient of the loss function, the loss value is used to update the angle parameters of the revolving gate in the quantum generator and quantum discriminator until convergence.

8. The method for medical image generation based on quantum generative adversarial networks with adaptive selection according to claim 6 or 7, characterized in that: The method further includes a quantum generative adversarial network using step located after the quantum generative adversarial network training step, and the quantum generative adversarial network using step includes the following sub-steps: Generate a third quantum state image using the quantum generator in the trained quantum generative adversarial network; The third quantum state image is subjected to quantum measurement to obtain a classical adversarial image.

9. The method for medical image generation based on quantum generative adversarial networks with adaptive selection according to claim 1, characterized in that: The input medical images for the training are images of the same category.