Quantum annealing image processing method and system based on path integral monte carlo
Patent Information
- Application Number
- CN202610784596.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-02
- Publication Date
- 2026-08-21
AI Technical Summary
[0003]然而,当前神经网络架构存在搜索与评估计算代价高、搜索空间高度依赖人工先验定义、易陷入局部最优或出现性能塌陷、多目标优化效率低等问题,这些瓶颈制约了图像处理的稳定落地与规模化应用
[0016]本申请提供的一种基于路径积分蒙特卡洛的量子退火图像处理方法,获取对目标图像进行处理的需求信息;对神经网络模型的基本单元块进行量子比特编码,生成量子比特;基于需求信息和量子比特,构建能量函数;将能量函数映射为量子退火的哈密顿量;基于哈密顿量和量子比特,按照路径积分蒙特卡洛进行量子退火模拟,得到量子比特的自旋状态向量的目标值;将目标值映射为图像处理模型架构;基于图像处理模型架构对目标图像进行处理,生成图像处理结果。本申请中,根据基本单元块的量子比特和目标图像的处理需求生成哈密顿量,从而可以按照量子退火的方式来对基本单元块组合后得到图像处理模型架构,进而可以利用量子退火的量子隧穿来对基本单元块跨越能量障壁进行搜索,避免了传统方法容易陷入局部最优解的问题,且可以借助路径积分蒙特卡洛方法提升图像处理模型架构的搜索稳定性与收敛效率,进而可以稳定、高效的对图像进行处理。本申请提供的一种基于路径积分蒙特卡洛的量子退火图像处理系统也解决了相应技术问题。
Smart Images

Figure CN122616668A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and more specifically, to a quantum annealing image processing method and system based on path integral Monte Carlo. Background Technology
[0002] Currently, in the process of image processing using neural network models, neural network architecture search can automatically complete the model structure design, get rid of excessive reliance on human expert experience, discover efficient architectures that surpass human intuition in a huge search space, and flexibly adapt to the multi-objective optimization needs of image processing accuracy, number of parameters, latency, etc.
[0003] However, current neural network architectures suffer from high computational costs in search and evaluation, a search space that is highly dependent on manually defined priors, a tendency to get stuck in local optima or experience performance collapse, and low efficiency in multi-objective optimization. These bottlenecks restrict the stable implementation and large-scale application of image processing.
[0004] In conclusion, improving the stability and efficiency of image processing is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] The purpose of this application is to provide a quantum annealing image processing method based on path integral Monte Carlo, which can, to some extent, solve the technical problem of how to improve the stability and efficiency of image processing. This application also provides a quantum annealing image processing system based on path integral Monte Carlo.
[0006] To achieve the above objectives, this application provides the following technical solution: A quantum annealing image processing method based on path integral Monte Carlo includes: Obtain the required information for processing the target image; The basic unit blocks of the neural network model are encoded into qubits to generate qubits; Based on the required information and the qubit, an energy function is constructed; The energy function is mapped to the Hamiltonian of quantum annealing; Based on the Hamiltonian and the qubit, a quantum annealing simulation is performed using path integral Monte Carlo to obtain the target value of the spin state vector of the qubit. Map the target value to an image processing model architecture; The target image is processed based on the image processing model architecture to generate image processing results.
[0007] Preferably, the basic unit blocks of the neural network model are encoded into qubits to generate qubits, including: Obtain the basic unit blocks of the neural network model; Determine the operator operations, number of network layers, number of channels, and attention mechanism for the basic unit blocks; The operator operations of the basic unit are encoded in qubits and mapped to binary to generate the encoded results of the operator operations; The number of network layers in the basic unit is encoded using qubits to generate the network layer encoding result. The number of channels in the basic unit is encoded using qubits to generate the channel number encoding result; The attention mechanism of the basic unit is encoded into qubits to generate the attention encoding result; The qubits of the basic unit are generated by combining the operator operation encoding results, network layer number encoding results, channel number encoding results, and attention encoding results of the basic unit.
[0008] Preferably, the requirement information includes requirements for accuracy, number of parameters, and delay; Based on the aforementioned demand information and the aforementioned qubits, an energy function is constructed, including: Construct the spin state vector of the qubit and determine the candidate architecture corresponding to the spin state vector; Based on the difference between the prediction accuracy of 1 and the candidate architecture, a precision energy term is constructed; The parameters of the candidate architecture are normalized to generate parameter energy terms; Normalize the inference latency of the candidate architecture to generate a latency energy term; Based on the rationality of the candidate architecture, a penalty energy term is constructed; Based on the required information, weights are calculated for the precision energy term, parameter energy term, delay energy term, and penalty energy term to generate an energy function.
[0009] Preferably, mapping the energy function to the Hamiltonian of quantum annealing includes: The energy function is mapped to the Hamiltonian of quantum annealing using the Hamiltonian mapping formula. Hamiltonian mapping formulas include: ; ; ; ; in, Indicates the annealing parameters; Represents the Hamiltonian; Represents the classical term in the Hamiltonian; Represents the transverse field in the Hamiltonian; Indicates the firstn The first basic unit block o The spin variables corresponding to the operators in the z-th imaginary time slice; E Represents the energy function; Represents the basic unit block n 1 and basic unit block n The connection constraint strength between the two; Indicates the first n The first basic unit block o The spin variables corresponding to the operators in the z-th imaginary time slice; Indicates the first n The first of the two basic unit blocks o The spin variables corresponding to the operators in the z-th imaginary time slice; Indicates the first n The first basic unit block o The spin of the operator i Quantity; Indicates the transverse field strength; t Indicates the number of evolutionary steps; Indicates the maximum strength value; Used to control the annealing rate; e represents the base of the natural logarithm.
[0010] Preferably, based on the Hamiltonian and the qubit, a quantum annealing simulation is performed using path integral Monte Carlo to obtain the target value of the qubit's spin state vector, including: Initialize the qubits; Initialize the initial temperature, cooling rate, number of sampling steps, and number of virtual time slices; Based on the aforementioned qubits, an initial path configuration consisting of virtual time slices is generated according to the number of virtual time slices. Use the initial path configuration as a candidate path configuration; Perturb the virtual time slices in the candidate path configuration to generate the current new path configuration; Based on the difference in Hamiltonian between the current new path configuration and the candidate path configuration, the structural effective energy is generated; Update the candidate path configuration based on the change in the energy function; The temperature value of quantum annealing is adjusted according to the cooling rate; Return to the execution of perturbation of the virtual time slice in the candidate path configuration and subsequent steps until the sampling step number is reached. Then, determine the target value of the spin state vector of the qubit according to the candidate path configuration.
[0011] Preferably, the virtual time slices in the candidate path configuration are perturbed to generate the current new path configuration, including: Apply local and / or global and / or constraint perturbations to the virtual time slices in the candidate path configuration to generate the current new path configuration; Local perturbations include replacing a single operator operation and / or adding or removing a single connection; global perturbations include adjusting the stacking number of basic unit blocks and / or replacing multiple operator operations; constraint perturbations include skipping invalid structures.
[0012] Preferably, the structural effective energy is generated based on the difference between the Hamiltonian between the current new path configuration and the candidate path configuration, including: The structural effective energy is generated based on the difference between the Hamiltonian between the current new path configuration and the candidate path configuration. The formulas for generating effective energy in a structure include: ; ; in, Indicates the effective energy of the structure; This represents the change in the energy function resulting from the new path configuration; Indicates the difference in structural consistency between virtual time slice replicas; This represents the consistency penalty coefficient; This indicates the number of basic unit blocks in the network structure; Indicating the first candidate path configuration m The sum of all virtual time slices of a basic unit block; Indicating the first path configuration in the current new path configuration m The first basic unit block j A virtual time slice.
[0013] Preferably, the target image is processed based on an image processing model architecture to generate an image processing result, including: Obtain the training image set; The image processing model architecture is trained using the training image set to obtain the image processing model; Detect whether the image processing model meets the aforementioned requirements; In response to the image processing model satisfying the required information, the target image is processed based on the image processing model to generate an image processing result.
[0014] Preferably, after detecting whether the image processing model meets the required information, the method further includes: If the image processing model does not meet the required information, the energy function is adjusted, and the process returns to mapping the energy function to the Hamiltonian of quantum annealing and subsequent steps.
[0015] A quantum annealing image processing system based on path integral Monte Carlo, comprising: The information acquisition module is used to acquire the required information for processing the target image; The quantum encoding module is used to encode the basic unit blocks of the neural network model into qubits to generate qubits; An energy function construction module is used to construct an energy function based on the requirement information and the qubit; The Hamiltonian mapping module is used to map the energy function to a Hamiltonian of quantum annealing; The simulation module is used to perform quantum annealing simulation based on the Hamiltonian and the qubit, according to path integral Monte Carlo, to obtain the target value of the spin state vector of the qubit; An architecture mapping module is used to map the target value to an image processing model architecture; The image processing module is used to process the target image based on the image processing model architecture and generate image processing results.
[0016] This application provides a quantum annealing image processing method based on path integral Monte Carlo (SIM) to obtain the requirement information for processing the target image; to encode the basic unit blocks of the neural network model into qubits; to construct an energy function based on the requirement information and the qubits; to map the energy function to the Hamiltonian of quantum annealing; to perform quantum annealing simulation according to path integral Monte Carlo based on the Hamiltonian and the qubits to obtain the target value of the spin state vector of the qubits; to map the target value to the image processing model architecture; and to process the target image based on the image processing model architecture to generate the image processing result. In this application, the Hamiltonian is generated according to the qubits of the basic unit blocks and the processing requirements of the target image, so that the basic unit blocks can be combined according to quantum annealing to obtain the image processing model architecture. Furthermore, quantum tunneling in quantum annealing can be used to search for the basic unit blocks across the energy barrier, avoiding the problem of traditional methods easily getting trapped in local optima. The path integral Monte Carlo method can also be used to improve the search stability and convergence efficiency of the image processing model architecture, thus enabling stable and efficient image processing. This application provides a quantum annealing image processing system based on path integral Monte Carlo, which also solves the corresponding technical problems. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0018] Figure 1 A flowchart of a quantum annealing image processing method based on path integral Monte Carlo provided in this application embodiment; Figure 2 A schematic diagram of the structure of a quantum annealing image processing system based on path integral Monte Carlo provided in this application embodiment; Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application; Figure 4 This is another structural schematic diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0019] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0020] Please see Figure 1 , Figure 1 A flowchart of a quantum annealing image processing method based on path integral Monte Carlo provided in this application embodiment.
[0021] This application provides a quantum annealing image processing method based on path integral Monte Carlo, which may include the following steps: Step S101: Obtain the required information for processing the target image.
[0022] In practical applications, the target image to be processed can be obtained first. The information of the target image and the processing method can be flexibly determined according to the application scenario. For example, it can be vehicle classification for vehicle images or pedestrian recognition for pedestrian images. Considering the user's requirements for image processing, in order to process the image according to the user's requirements, it is also necessary to obtain the processing requirement information of the target image. The requirement information can be the requirements for accuracy, number of parameters and latency, such as maximizing accuracy, minimizing the number of parameters, minimizing latency, etc.
[0023] Step S102: Encode the basic unit blocks of the neural network model into qubits to generate qubits.
[0024] In practical applications, considering that different image processing may require specific neural network model architectures, and that these architectures can be searched—that is, in the neural network structure search space, each element describes a neural network structure—the goal of neural network structure search is to find the optimal network structure that meets the requirements. In this process, neural network structure search can be combined with the quantum annealing method based on path integral Monte Carlo to solve the combinatorial optimization problem of neural network result search. Based on this, to map the discrete architecture decisions of neural network structure search to the states of a quantum system, the discrete architecture search problem of neural network structure search must first be mapped to a quantum Ising model. This involves encoding the basic unit blocks of the neural network model into qubits to generate qubits, thereby encoding the architecture decision variables into the qubit spin states in the Ising model.
[0025] It should be noted that the basic unit blocks of a neural network model can be residual unit blocks, convolutional unit blocks, etc. Each basic unit block can consist of operator operations, network layers, channels, and attention mechanisms. Multiple basic unit blocks are chained together to form a complete neural network architecture. This method allows the construction of a vast search space, enabling the creation of neural network architectures that meet the needs of image processing. For example, each basic unit block contains two intermediate nodes and one output node. The input to each node is the feature map of the preceding node. The operations performed by the basic unit block can be selected from a pre-set set of operations, or the basic unit block can be customized according to user needs. For instance, the preset operation set can include Nop operators such as 3×3 convolution, 5×5 convolution, 1×1 convolution, 3×3 pooling, and 5×5 pooling. Pre-set operators can also be customized according to user needs. The number of channels can include Nc choices such as 16, 32, 64, and 128. The attention mechanism can be introduced or not. The number of network layers can include N such as 5, 7, and 15. L kind.
[0026] In an exemplary embodiment, the basic unit blocks of the neural network model are encoded using qubits. During the qubit generation process, a binary encoding method can be used, i.e., the basic unit blocks of the neural network model are obtained. The operator operations, network layer number, channel number, and attention mechanism of the basic unit blocks are determined. Qubit encoding of the operator operations of the basic units can support Nop operator operations encoded using log2Nop qubits, and the encoding results are binary mapped to generate operator operation encoding results, thus achieving a one-to-one correspondence between operations and qubit states. Qubit encoding of the network layer number of the basic units can use log2N... L Encoding the number of qubits generates the network layer encoding result; encoding the number of channels in the basic unit using qubits can be done using log₂N. cEncoding with one qubit generates a channel-number encoding result; encoding the attention mechanism of the basic unit with one qubit generates an attention encoding result, which can be achieved using one qubit, with spin-up (s=1) indicating the introduction of the attention mechanism and spin-down (s=-1) indicating its absence; combining the operator operation encoding result, network layer number encoding result, channel number encoding result, and attention encoding result of the basic unit generates the qubit of the basic unit. In this way, each quantum state corresponds to a complete neural network architecture, and the superposition state of the quantum system can simultaneously traverse multiple candidate architectures, achieving parallel search.
[0027] In specific application scenarios, it can be used Indicates the first a The first basic unit block b The qubit description of each operator operation maps each architectural decision variable to the spin state of a qubit, corresponding to the spin-up and spin-down states of the quantum Ising model. Thus, the candidate operation set of the basic unit block operators can be mapped to P trotter replicas (virtual time slices) of the spin chain in the quantum Ising model, where P can be 10. 50, z is the number of the virtual time slice; and the connection between basic unit blocks can also be described by qubit spin coupling. ,in, Indicates the first a The first basic unit block o The z-th (1≤z≤P) Trotter copy of the operator; Indicates coupling strength, indicating whether or not... a Basic unit blocks and j Connect the basic unit blocks. A value of 0 indicates no connection. A value other than 0 indicates that the connection is allowed.
[0028] Step S103: Construct the energy function based on the demand information and the qubits.
[0029] In practical applications, the core of the quantum annealing algorithm is to find the optimal solution to the corresponding optimization problem by minimizing the energy function of the Ising model. Based on this, this application needs to transform the multi-objective optimization problem of neural network structure search into an energy function according to the requirement information and qubits, so as to construct the objective energy function of quantum annealing with adaptive path integral Monte Carlo, ensuring that the quantum state with the lowest energy corresponds to the optimal neural network architecture.
[0030] In an exemplary embodiment, taking the requirement information including requirements for accuracy, number of parameters, and delay as an example, during the process of constructing the energy function based on the requirement information and the qubit, the spin state vector s of the qubit can be constructed, s=[s1,s2,…,s…]. Nq ], Nq Given the number of qubits, determine the candidate architecture corresponding to the spin state vector; predict the accuracy based on 1 and the candidate architecture. The difference is used to construct the precision energy term. , Normalize the parameters of the candidate architecture to generate parameter energy terms. The larger the number of parameters, the higher the energy. , and These represent the maximum and minimum values of the number of parameters in the search space, respectively. The parameter count of the candidate architecture is represented; the inference latency of the candidate architecture is normalized to generate a latency energy term. Inference latency can be the inference latency of the candidate architecture on the target hardware (such as CPU, GPU, etc.), and the normalization principle can be the same as... Furthermore, the greater the delay, the higher the energy; a penalty energy term is constructed based on the rationality of the candidate architecture. This is used to penalize invalid architectures. If the architecture is valid, it can be set... The value is 0. If there are unreasonable network structures such as loop connections or incompatible operations, a penalty value can be given, for example, assigning a penalty of 0. A larger penalty value, such as 5-10, can be selected to ensure that only valid schemas are generated during the search process. Based on the requirements, weights are calculated for the precision energy term, parameter energy term, delay energy term, and penalty energy term to generate an energy function. , , , , , These are weighting coefficients used to balance the importance of each objective while satisfying... In this way, the multi-objective optimization problem of neural network structure search is transformed into the ground state search problem of the quantum Ising model through this energy function, providing an optimization objective for the subsequent path integral Monte Carlo method to simulate quantum annealing.
[0031] Step S104: Map the energy function to the Hamiltonian of quantum annealing.
[0032] In practical applications, after constructing the energy function, the energy function can be mapped to the Hamiltonian of quantum annealing.
[0033] In an exemplary embodiment, the process of mapping the energy function to the Hamiltonian of quantum annealing can be achieved using a Hamiltonian mapping formula; the Hamiltonian mapping formula may include: ; ; ; ; in, Indicates the annealing parameters, when As the value slowly increases from 0 to 1, the transverse field gradually decreases, and the system will converge to the classical ground state, thus obtaining the optimal neural network structure. Represents the Hamiltonian; Represents the classical term in the Hamiltonian; This term represents the transverse field in the Hamiltonian, and is used to achieve quantum tunneling in quantum annealing, thereby breaking through local optima. Indicates the first n The first basic unit block o The spin variables corresponding to the operators in the z-th imaginary time slice are usually described as quantum mechanical operators, which can be represented by matrices acting on a single qubit. express; E Represents the energy function; Represents the basic unit block n 1 and basic unit block n The connection constraint strength between the two; Indicates the first n The first basic unit block o The spin variables corresponding to the operators in the z-th imaginary time slice; Indicates the first n The first of the two basic unit blocks o The spin variables corresponding to the operators in the z-th imaginary time slice; Indicates the first n The first basic unit block o The spin of the operator i Quantity; Indicates the transverse field strength; t Indicates the number of evolutionary steps; This represents the maximum intensity value, which can range from 1.0 to 10.0. Used to control the annealing rate, its value can be between 0.005 and 1. 0.02; e represents the base of the natural logarithm.
[0034] Step S105: Based on the Hamiltonian and the qubit, perform quantum annealing simulation according to path integral Monte Carlo to obtain the target value of the spin state vector of the qubit.
[0035] In practical applications, after obtaining the Hamiltonian, quantum annealing simulation can be performed using path integral Monte Carlo methods based on the Hamiltonian and the qubit to obtain the target value of the qubit's spin state vector. This involves simulating the imaginary-time evolution process of quantum annealing using the path integral Monte Carlo method, and using the Monte Carlo method to select the quantum state with the lowest search energy as the optimal neural network architecture encoding. In this way, by searching for a globally optimal solution in a discrete network structure space (including factors such as operator selection, connection methods, and number of layers) that satisfies given objectives of high accuracy, low implementation cost, and high efficiency, the discrete architecture search problem of neural network structure search is mapped to a quantum Ising model. The complete evolution path is then simulated using the path integral Monte Carlo method, enabling efficient global search of ultra-large-scale architecture spaces. Furthermore, the path integral Monte Carlo method allows for efficient simulation of quantum annealing algorithms on conventional machines without requiring real quantum hardware.
[0036] In an exemplary embodiment, this application utilizes a quantum annealing method based on the path integral Monte Carlo method for neural network structure search. The entire evolution process can be divided into three stages: initialization stage, simulated evolution stage, and ground state convergence stage. In the initialization stage, quantum system initialization, path configuration initialization, and parameter initialization can be performed. In the path integral Monte Carlo method simulated evolution stage, the imaginary time evolution of the quantum system is simulated using the path integral Monte Carlo method. The path configuration can be updated using the Metropolis-Hastings sampling algorithm, gradually reducing the system energy, optimizing the temperature scheduling strategy, and achieving efficient minimization of the energy function. The core idea is to re-evaluate the energy through structural perturbation, thereby determining whether to accept the newly generated network structure. In the ground state convergence stage, when the system temperature drops to a preset minimum threshold T... min At this point, a minimum threshold can generally be set to 0.05, etc., for the quantum system to reach its energy ground state, where the superposition state of the qubits completely collapses into a definite spin state vector s. This vector corresponds to the candidate architecture encoding with the minimum energy function. At this point, the evolution process stops, and the spin state vector corresponding to the ground state is output.
[0037] Based on this, using Hamiltonians and qubits, quantum annealing simulations are performed according to path integral Monte Carlo methods. During the process of obtaining the target value of the qubit's spin state vector, the qubits can be initialized, for example, by placing all qubits in a superposition state, i.e., each qubit is simultaneously in a spin-up (s=1) and spin-down (s=-1) state, enabling parallel traversal of all candidate architectures; initial temperature, cooling rate γ, and sampling step number N are also considered. stepsThe system is initialized with the number of virtual time slices P. For example, the initial temperature T0 is adaptively set according to the search space size to ensure that the system has strong exploration capabilities in the initial stage. For example, the initial temperature is set to 10, and the number of sampling steps is set to 10000-50000. Based on the qubits, an initial path configuration composed of virtual time slices is generated according to the number of virtual time slices. That is, based on the virtual time discretization idea of the path integral Monte Carlo method, the quantum evolution path is divided into P virtual time slices, each slice corresponding to a quantum state at a virtual time point. The initial path configuration {x1, x2, ..., x...} is randomly generated. P}, satisfying the periodic boundary condition x P +1=x1; The initial path configuration is used as a candidate path configuration; the imaginary time slices in the candidate path configuration are perturbed to generate the current new path configuration; the structural effective energy is generated based on the difference between the Hamiltonian between the current new path configuration and the candidate path configuration; the candidate path configuration is updated according to the change in the energy function, that is, the Metropolis criterion is used to determine whether to accept the new path, with an acceptance probability of P. accept If accepted, the candidate path configuration is updated to the current new path configuration; otherwise, the candidate path configuration remains unchanged. The quantum annealing temperature is adjusted according to the cooling rate, for example, by employing an exponential cooling strategy. The system temperature T is gradually reduced to suppress quantum fluctuations and guide the system to converge to a lower energy state. The process then returns to perturb the virtual time slice in the candidate path configuration and proceeds to the next step until the number of sampling steps is reached. Finally, the path integral Monte Carlo method simulation evolution is completed, and the target value of the spin state vector of the qubit is determined based on the candidate path configuration.
[0038] In specific application scenarios, the perturbation type can be flexibly set as needed during the process of generating a new path configuration by perturbing the virtual time slices in the candidate path configuration. For example, local perturbation and / or global perturbation and / or constraint perturbation can be performed on the virtual time slices in the candidate path configuration to generate a new path configuration. Local perturbation includes replacing a single operator operation and / or adding or removing a single connection to achieve small-scale local structural changes. Global perturbation includes adjusting the stacking number of basic unit blocks and / or replacing multiple operator operations to achieve larger-scale structural changes. Constraint perturbation includes skipping invalid structures.
[0039] In specific application scenarios, during the process of generating structural effective energy based on the difference in Hamiltonian between the current new path configuration and the candidate path configuration, the structural effective energy can be generated using the difference in Hamiltonian between the current new path configuration and the candidate path configuration. The formula for generating structural effective energy includes: ; ; in, Indicates the effective energy of the structure; This represents the change in the energy function resulting from the new path configuration; This represents the structural consistency difference between virtual time slice replicas, which can prevent excessive differences between replicas and thus ensure the convergence of the path integral Monte Carlo method. If all replicas are very similar and almost identical, then... Approaching 0, if A large value will result in a large energy change, and this perturbation will not be considered during sampling; This represents the consistency penalty coefficient, used to balance quantum fluctuations with the rationality of the network structure, and can be set to 0.5. This indicates the number of basic unit blocks in the network structure; Indicating the first candidate path configuration m The sum of all virtual time slices of a basic unit block; Indicating the first path configuration in the current new path configuration m The first basic unit block j A virtual time slice.
[0040] It should be noted that the specific formula for decomposing the quantum partition function into P Trotter replicas, transforming quantum annealing into a classical multi-replica statistical mechanics problem, and constructing the quantum partition function Z can be as follows: , , Mainly for The trace operation is performed, where P is the number of Trotter replicas. The larger P is, the more accurate the quantum effect. Typically, P = 10. 50; per copy i Corresponding to a set of neural network structure configurations {s i}; For inversion parameters, , Boltzmann's constant; Because the initial annealing temperature T is relatively high, the acceptance rate P is high. accept The high acceptance rate (P) indicates an exploratory network structure space, with T gradually decreasing in the later stages. accept The lower the value, the more likely it is to converge to the optimal structure.
[0041] Step S106: Map the target value to the image processing model architecture.
[0042] Step S107: Process the target image based on the image processing model architecture to generate image processing results.
[0043] In practical applications, after obtaining the target value of the spin state vector of a qubit, architecture decoding can be performed, that is, mapping the target value to an image processing model architecture. Specifically, according to the quantum encoding rules introduced earlier, the ground state spin state vector s is... The reverse mapping is used to obtain a specific neural network architecture, including the operator operations, number of channels, attention mechanism, etc. of each basic unit block, resulting in a complete neural network structure; then, the target image is processed based on the image processing model architecture to generate image processing results.
[0044] In an exemplary embodiment, the image processing capability of the image processing model is affected by both its architecture and parameters. Therefore, in the process of processing the target image based on the image processing model architecture to generate the image processing result, a training image set can be obtained; the training image set can be used to train the image processing model architecture to obtain the image processing model; whether the image processing model meets the required information can be detected; in response to the image processing model meeting the required information, the target image can be processed based on the image processing model to generate the image processing result. In response to the image processing model not meeting the required information, the energy function can be adjusted, such as adjusting the weight coefficients or search parameters of the energy function, and the process can be restarted by reverting to the steps of mapping the energy function to the Hamiltonian of quantum annealing and subsequent steps, thus forming a closed-loop optimization.
[0045] This application provides a quantum annealing image processing method based on path integral Monte Carlo (SIM) to obtain the requirement information for processing the target image; to encode the basic unit blocks of the neural network model into qubits; to construct an energy function based on the requirement information and the qubits; to map the energy function to the Hamiltonian of quantum annealing; to perform quantum annealing simulation according to path integral Monte Carlo based on the Hamiltonian and the qubits to obtain the target value of the spin state vector of the qubits; to map the target value to the image processing model architecture; and to process the target image based on the image processing model architecture to generate the image processing result. In this application, the Hamiltonian is generated according to the qubits of the basic unit blocks and the processing requirements of the target image, so that the basic unit blocks can be combined according to quantum annealing to obtain the image processing model architecture. Furthermore, quantum tunneling in quantum annealing can be used to search for the basic unit blocks across the energy barrier, avoiding the problem of traditional methods easily getting trapped in local optima. The path integral Monte Carlo method can also be used to improve the search stability and convergence efficiency of the image processing model architecture, thus enabling stable and efficient image processing.
[0046] Please see Figure 2 , Figure 2 This is a schematic diagram of the structure of a quantum annealing image processing system based on path integral Monte Carlo, provided in an embodiment of this application.
[0047] This application provides a quantum annealing image processing system based on path integral Monte Carlo, which may include: The information acquisition module 101 is used to acquire the required information for processing the target image; Quantum encoding module 102 is used to encode the basic unit blocks of the neural network model into qubits to generate qubits; Energy function construction module 103 is used to construct an energy function based on demand information and qubits; Hamiltonian mapping module 104 is used to map energy functions to the Hamiltonian of quantum annealing; Simulation module 105 is used to perform quantum annealing simulation based on Hamiltonian and qubit according to path integral Monte Carlo to obtain the target value of the spin state vector of qubit. Architecture mapping module 106 is used to map target values to image processing model architecture; Image processing module 107 is used to process the target image based on the image processing model architecture and generate image processing results.
[0048] This application provides a quantum annealing image processing system based on path integral Monte Carlo, wherein the quantum coding module may include: Basic unit block acquisition unit, used to acquire the basic unit blocks of the neural network model; The unit block determination unit is used to determine the operator operations, number of network layers, number of channels, and attention mechanism of the basic unit block; Operator coding unit is used to encode the operator operations of the basic unit into qubits and perform binary mapping to generate the operator operation coding result; The layer coding unit is used to encode the network layer number of the basic unit into qubits, generating the network layer coding result. The channel number encoding unit is used to encode the channel number of the basic unit into qubits and generate the channel number encoding result; Attention coding unit, used to encode the attention mechanism of basic unit into qubits and generate attention coding results; The combination unit is used to combine the operator operation encoding results, network layer number encoding results, channel number encoding results, and attention encoding results of the basic unit to generate the qubit of the basic unit.
[0049] This application provides a quantum annealing image processing system based on path integral Monte Carlo, wherein the requirement information includes requirements for accuracy, number of parameters, and delay. The energy function building block can include: An architecture building unit is used to construct the spin state vector of the qubit and determine the candidate architecture corresponding to the spin state vector. Precision building blocks are used to construct precision energy terms based on the difference between the prediction precision of 1 and the candidate architecture. The parameter building unit is used to normalize the parameters of candidate architectures and generate parameter energy terms. Delayed building units are used to normalize the inference latency of candidate architectures and generate a delay energy term; The penalty building unit is used to construct a penalty energy term based on the rationality of the candidate architecture; The energy function construction unit is used to perform weight calculations on the precision energy term, parameter energy term, delay energy term, and penalty energy term according to the required information, and generate an energy function.
[0050] This application provides a quantum annealing image processing system based on path integral Monte Carlo. The Hamiltonian mapping module is specifically used to: map the energy function to the Hamiltonian of quantum annealing through the Hamiltonian mapping formula. Hamiltonian mapping formulas include: ; ; ; ; in, Indicates the annealing parameters; Represents the Hamiltonian; Represents the classical term in the Hamiltonian; Represents the transverse field in the Hamiltonian; Indicates the first n The first basic unit block o The spin variables corresponding to the operators in the z-th imaginary time slice; E Represents the energy function; Represents the basic unit block n 1 and basic unit block n The connection constraint strength between the two; Indicates the first n The first basic unit block o The spin variables corresponding to the operators in the z-th imaginary time slice; Indicates the first n The first of the two basic unit blocks o The spin variables corresponding to the operators in the z-th imaginary time slice; Indicates the first n The first basic unit block o The spin of the operator iQuantity; Indicates the transverse field strength; t Indicates the number of evolutionary steps; Indicates the maximum strength value; Used to control the annealing rate; e represents the base of the natural logarithm.
[0051] This application provides a quantum annealing image processing system based on path integral Monte Carlo, wherein the simulation module may include: An initialization unit is used to initialize the qubits; it initializes the initial temperature, cooling rate, number of sampling steps, and number of virtual time slices. An initial path generation unit is used to generate an initial path configuration composed of virtual time slices based on the qubit and according to the number of virtual time slices; The setting unit is used to select the initial path configuration as a candidate path configuration; The path update unit is used to perturb the virtual time slices in the candidate path configuration and generate the current new path configuration. An action generation unit is used to generate structural effective energy based on the difference between the Hamiltonian between the current new path configuration and the candidate path configuration; The sampling decision unit is used to update the candidate path configuration based on the change in the energy function; The temperature adjustment unit is used to adjust the temperature value of quantum annealing according to the cooling rate; The iterative evolution unit is used to return to the execution of perturbation of the virtual time slice in the candidate path configuration and subsequent steps until the sampling step number is reached, and then determine the target value of the spin state vector of the qubit according to the candidate path configuration.
[0052] This application provides a quantum annealing image processing system based on path integral Monte Carlo, wherein the path update unit is used to: perform local perturbation and / or global perturbation and / or constraint perturbation on the virtual time slices in the candidate path configuration to generate the current new path configuration; Local perturbations include replacing a single operator operation and / or adding or removing a single connection; global perturbations include adjusting the stacking number of basic unit blocks and / or replacing multiple operator operations; constraint perturbations include skipping invalid structures.
[0053] This application provides a quantum annealing image processing system based on path integral Monte Carlo, wherein the action generation unit is specifically used to: generate structural effective energy based on the difference between the Hamiltonian between the current new path configuration and the candidate path configuration using structural effective energy; The formulas for generating effective energy in a structure include: ; ; in, Indicates the effective energy of the structure; This represents the change in the energy function resulting from the new path configuration; Indicates the difference in structural consistency between virtual time slice replicas; This represents the consistency penalty coefficient; This indicates the number of basic unit blocks in the network structure; Indicating the first candidate path configuration m The sum of all virtual time slices of a basic unit block; Indicating the first path configuration in the current new path configuration m The first basic unit block j A virtual time slice.
[0054] This application provides a quantum annealing image processing system based on path integral Monte Carlo, wherein the image processing module may include: Image set acquisition unit, used to acquire training image set; The training unit is used to train the image processing model architecture using the training image set to obtain the image processing model; The detection unit is used to detect whether the image processing model meets the required information; An image processing unit is configured to process the target image based on the image processing model and generate an image processing result in response to the image processing model meeting the required information.
[0055] The quantum annealing image processing system based on path integral Monte Carlo provided in this application embodiment may further include: An adjustment unit is used to adjust the energy function after the detection unit detects whether the image processing model meets the required information. If the image processing model does not meet the required information, the unit returns to the steps of mapping the energy function to the Hamiltonian of quantum annealing and then proceeds.
[0056] This application also provides an electronic device and a computer-readable storage medium, both of which have the corresponding effects of the quantum annealing image processing method based on path integral Monte Carlo provided in the embodiments of this application. Please refer to... Figure 3 , Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0057] An electronic device provided in this application includes a memory 201 and a processor 202. The memory 201 stores a computer program, and the processor 202 executes the computer program to implement the steps of the quantum annealing image processing method based on path integral Monte Carlo as described in any of the above embodiments.
[0058] Please see Figure 4 Another electronic device provided in this application embodiment may further include: an input port 203 connected to the processor 202 for transmitting commands input from the outside to the processor 202; a display unit 204 connected to the processor 202 for displaying the processing results of the processor 202 to the outside; and a communication module 205 connected to the processor 202 for enabling communication between the electronic device and the outside. The display unit 204 may be a display panel, a laser scanning display, etc.; the communication method adopted by the communication module 205 includes, but is not limited to, Mobile High-Definition Link (MHL), Universal Serial Bus (USB), High-Definition Multimedia Interface (HDMI), wireless connection: Wireless Fidelity (WiFi), Bluetooth communication technology, Bluetooth Low Energy communication technology, and communication technology based on IEEE 802.11s.
[0059] This application provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the steps of the quantum annealing image processing method based on path integral Monte Carlo as described in any of the above embodiments.
[0060] The computer-readable storage media involved in this application include random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs (compact disc read-only memory), or any other form of storage media known in the art.
[0061] This application provides a computer program product, including a computer program / instructions, which, when executed by a processor, implement the steps of the quantum annealing image processing method based on path integral Monte Carlo as described in any of the above embodiments.
[0062] For descriptions of relevant parts of the quantum annealing image processing system, electronic device, and computer-readable storage medium based on path integral Monte Carlo provided in this application, please refer to the detailed descriptions of the corresponding parts in the quantum annealing image processing method based on path integral Monte Carlo provided in this application, which will not be repeated here. Furthermore, parts of the technical solutions provided in this application that are consistent with the implementation principles of corresponding technical solutions in the prior art have not been described in detail to avoid excessive elaboration.
[0063] It should also be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0064] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A quantum annealing image processing method based on path integral Monte Carlo, characterized in that, include: Obtain the required information for processing the target image; The basic unit blocks of the neural network model are encoded into qubits to generate qubits; Based on the required information and the qubit, an energy function is constructed; The energy function is mapped to the Hamiltonian of quantum annealing; Based on the Hamiltonian and the qubit, a quantum annealing simulation is performed using path integral Monte Carlo to obtain the target value of the spin state vector of the qubit. Map the target value to an image processing model architecture; The target image is processed based on the image processing model architecture to generate image processing results.
2. The method according to claim 1, characterized in that, The basic unit blocks of the neural network model are encoded into qubits to generate qubits, including: Obtain the basic unit blocks of the neural network model; Determine the operator operations, number of network layers, number of channels, and attention mechanism for the basic unit blocks; The operator operations of the basic unit are encoded in qubits and mapped to binary to generate the encoded results of the operator operations; The number of network layers in the basic unit is encoded using qubits to generate the network layer encoding result. The number of channels in the basic unit is encoded using qubits to generate the channel number encoding result; The attention mechanism of the basic unit is encoded into qubits to generate the attention encoding result; The qubits of the basic unit are generated by combining the operator operation encoding results, network layer number encoding results, channel number encoding results, and attention encoding results of the basic unit.
3. The method according to claim 1, characterized in that, The requirements information includes requirements for accuracy, number of parameters, and delay. Based on the aforementioned demand information and the aforementioned qubits, an energy function is constructed, including: Construct the spin state vector of the qubit and determine the candidate architecture corresponding to the spin state vector; Based on the difference between the prediction accuracy of 1 and the candidate architecture, a precision energy term is constructed; The parameters of the candidate architecture are normalized to generate parameter energy terms; Normalize the inference latency of the candidate architecture to generate a latency energy term; Based on the rationality of the candidate architecture, a penalty energy term is constructed; Based on the required information, weights are calculated for the precision energy term, parameter energy term, delay energy term, and penalty energy term to generate an energy function.
4. The method according to claim 3, characterized in that, Mapping the energy function to the Hamiltonian of quantum annealing includes: The energy function is mapped to the Hamiltonian of quantum annealing using the Hamiltonian mapping formula. Hamiltonian mapping formulas include: ; ; ; ; in, Indicates the annealing parameters; Represents the Hamiltonian; Represents the classical term in the Hamiltonian; Represents the transverse field in the Hamiltonian; Indicates the first n The first basic unit block o The spin variables corresponding to the operators in the z-th imaginary time slice; E Represents the energy function; Represents the basic unit block n 1 and basic unit block n The connection constraint strength between the two; Indicates the first n The first basic unit block o The spin variables corresponding to the operators in the z-th imaginary time slice; Indicates the first n The first of the two basic unit blocks o The spin variables corresponding to the operators in the z-th imaginary time slice; Indicates the first n The first basic unit block o The spin of the operator i Quantity; Indicates the transverse field strength; t Indicates the number of evolutionary steps; Indicates the maximum strength value; Used to control the annealing rate; e represents the base of the natural logarithm.
5. The method according to claim 4, characterized in that, Based on the Hamiltonian and the qubit, a quantum annealing simulation is performed using path integral Monte Carlo to obtain the target value of the qubit's spin state vector, including: Initialize the qubits; Initialize the initial temperature, cooling rate, number of sampling steps, and number of virtual time slices; Based on the aforementioned qubits, an initial path configuration consisting of virtual time slices is generated according to the number of virtual time slices. Use the initial path configuration as a candidate path configuration; Perturb the virtual time slices in the candidate path configuration to generate the current new path configuration; Based on the difference in Hamiltonian between the current new path configuration and the candidate path configuration, the structural effective energy is generated; Update the candidate path configuration based on the change in the energy function; The temperature value of quantum annealing is adjusted according to the cooling rate; Return to the execution of perturbation of the virtual time slice in the candidate path configuration and subsequent steps until the sampling step number is reached. Then, determine the target value of the spin state vector of the qubit according to the candidate path configuration.
6. The method according to claim 5, characterized in that, The virtual time slices in the candidate path configuration are perturbed to generate the current new path configuration, including: Apply local and / or global and / or constraint perturbations to the virtual time slices in the candidate path configuration to generate the current new path configuration; Local perturbations include replacing a single operator operation and / or adding or removing a single connection; global perturbations include adjusting the stacking number of basic unit blocks and / or replacing multiple operator operations; constraint perturbations include skipping invalid structures.
7. The method according to claim 5, characterized in that, Based on the difference in Hamiltonian between the current new path configuration and the candidate path configuration, the structural effective energy is generated, including: The structural effective energy is generated based on the difference between the Hamiltonian between the current new path configuration and the candidate path configuration. The formulas for generating effective energy in a structure include: ; ; in, Indicates the effective energy of the structure; This represents the change in the energy function resulting from the new path configuration; Indicates the difference in structural consistency between virtual time slice replicas; This represents the consistency penalty coefficient; This indicates the number of basic unit blocks in the network structure; Indicating the first candidate path configuration m The sum of all virtual time slices of a basic unit block; Indicating the first path configuration in the current new path configuration m The first basic unit block j A virtual time slice.
8. The method according to claim 1, characterized in that, The target image is processed based on an image processing model architecture to generate image processing results, including: Obtain the training image set; The image processing model architecture is trained using the training image set to obtain the image processing model; Detect whether the image processing model meets the aforementioned requirements; In response to the image processing model satisfying the required information, the target image is processed based on the image processing model to generate an image processing result.
9. The method according to claim 8, characterized in that, After detecting whether the image processing model meets the required information, the process further includes: If the image processing model does not meet the required information, the energy function is adjusted, and the process returns to mapping the energy function to the Hamiltonian of quantum annealing and subsequent steps.
10. A quantum annealing image processing system based on path integral Monte Carlo, characterized in that, include: The information acquisition module is used to acquire the required information for processing the target image; The quantum encoding module is used to encode the basic unit blocks of the neural network model into qubits to generate qubits; An energy function construction module is used to construct an energy function based on the requirement information and the qubit; The Hamiltonian mapping module is used to map the energy function to a Hamiltonian of quantum annealing; The simulation module is used to perform quantum annealing simulation based on the Hamiltonian and the qubit, according to path integral Monte Carlo, to obtain the target value of the spin state vector of the qubit; An architecture mapping module is used to map the target value to an image processing model architecture; The image processing module is used to process the target image based on the image processing model architecture and generate image processing results.