A training method for quantum Boltzmann machine and hybrid computer

By defining the method of updating mixed loss functions and gradient algorithms, the problem of inconsistent structure in semi-supervised learning is solved, and the unified structure of the model and the ability of semi-supervised learning is realized, and the learning performance is improved.

CN114730385BActive Publication Date: 2025-05-06HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202080081890.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-02-28
Publication Date
2025-05-06
Estimated Expiration
2040-02-28

AI Technical Summary

Technical Problem

The existing quantum Boltzmann machine model has the problem of structural inconsistent in semi-supervised learning, and semi-supervised learning cannot be effectively carried out.

Method used

A training method for quantum Boltzmann machine is proposed. By defining a mixed loss function, combining the conditional probability and marginal probability of labeled samples and unmarked samples, the gradient algorithm is updated to realize the unified structure of the model and the ability of semi-supervised learning.

Benefits of technology

The effective training of quantum Boltzmann machine in semi-supervised learning is realized, ensuring the consistency of model structure during supervised and unsupervised learning, and improving the learning performance of the computer.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114730385B_ABST
    Figure CN114730385B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a training method for a quantum Boltzmann machine and a hybrid computer, which relates to the field of quantum computing. The method can be used for semi-supervised learning, including: obtaining a first loss function of a quantum Boltzmann machine; obtaining a first partial derivative of the first loss function with respect to a predetermined parameter of the Hamiltonian of the quantum Boltzmann machine, wherein the predetermined parameter includes a connection weight of two quantum units in the quantum Boltzmann machine or a bias of the quantum unit; executing a gradient algorithm on the first partial derivative to update the predetermined parameter, and obtaining an updated quantum Boltzmann machine, wherein the Hamiltonian of the updated quantum Boltzmann machine uses the updated predetermined parameter.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of quantum computing, and in particular to a training method for a quantum Boltzmann machine and a hybrid computer. Background Art

[0002] Quantum machine learning uses the high parallelism of quantum computing to further optimize traditional machine learning. Among them, the quantum Boltzmann machine is a typical quantum machine learning model. At present, the model structure of the quantum Boltzmann machine for supervised learning and the quantum Boltzmann machine for unsupervised learning are not unified, so they cannot be used for semi-supervised learning. Summary of the invention

[0003] The present application provides a training method for a quantum Boltzmann machine and a hybrid computer, which can be used for semi-supervised learning.

[0004] In order to achieve the above purpose, the embodiment of the present application adopts the following technical solution:

[0005] In the first aspect, a training method for a quantum Boltzmann machine is provided. The method comprises the following steps: obtaining a first loss function of a quantum Boltzmann machine, wherein the model structure of the quantum Boltzmann machine comprises a first layer and a second layer; the quantum units of the first layer are used to assign input samples of labeled samples, and the quantum units of the second layer are used to assign output samples of labeled samples; or the quantum units of the first layer are used to assign input samples of unlabeled samples; the quantum units of the first layer are fully connected to the quantum units of the second layer; the first loss function = α*second loss function + β*third loss function, wherein the second loss function is obtained by calculating the negative logarithmic conditional likelihood of the conditional probability of the output sample under the condition of the input sample of the labeled sample, and the third ... The number is obtained by calculating the negative logarithmic conditional likelihood of the marginal probability of the input sample of the unlabeled sample; wherein α and β are constants, and usually they need to determine their values ​​according to the characteristics of the sample data set. An example is α∈[0,1], β∈[0,1]; obtaining a first partial derivative of the first loss function with respect to predetermined parameters of the Hamiltonian of the quantum Boltzmann machine, wherein the predetermined parameters include the connection weights of two quantum units in the quantum Boltzmann machine or the bias of the quantum unit; executing a gradient algorithm on the first partial derivative to update the predetermined parameters, and obtaining an updated quantum Boltzmann machine, wherein the Hamiltonian of the updated quantum Boltzmann machine uses the updated predetermined parameters. In the above scheme, since the model structure of the quantum Boltzmann machine includes the first layer and the second layer; wherein the quantum units of the first layer are used to assign input samples of labeled samples, and the quantum units of the second layer are used to assign output samples of labeled samples, or the first layer is used to assign input samples of unlabeled samples; the quantum units of the first layer are fully connected with the quantum units of the second layer; the model structure is consistent when performing supervised learning and unsupervised learning, and the total number of qubits required is consistent. In addition, the loss function of training the quantum Boltzmann machine adopts the negative logarithmic conditional likelihood of the conditional probability of the output sample under the condition of the input sample of the labeled sample, and the negative logarithmic conditional likelihood of the marginal probability of the input sample of the unlabeled sample, which is obtained by adding them in a certain ratio, so that the trained quantum Boltzmann machine can adapt to semi-supervised learning.

[0006] In a possible design, a calculation method for a second loss function and a third loss function is also provided; wherein the calculation method for the second loss function is as follows: a negative log conditional likelihood calculation is performed based on the conditional probability of the output sample under the condition of the input sample of the labeled sample to obtain the loss function of supervised learning; the loss function of supervised learning is converted to the second loss function using the Gordon-Thompson inequality. The calculation method for the third loss function is as follows: a negative log conditional likelihood calculation is performed based on the marginal probability of the input sample of the unlabeled sample to obtain the loss function of unsupervised learning; the loss function of unsupervised learning is converted to the third loss function using the Gordon-Thompson inequality. Among them, since the form of the loss function of supervised learning and the loss function of unsupervised learning obtained by likelihood calculation will increase the computational complexity of subsequent processing, both are converted to the Golden-Thompson inequality here.

[0007] In a possible design, the first partial derivative is expressed as a polynomial, and the method further includes: determining a predetermined sample from a sample data set, the predetermined sample including the labeled sample or the unlabeled sample; preparing a first quantum state of the predetermined sample; executing a quantum approximate optimization QAOA algorithm on the first quantum state to obtain a second quantum state; and measuring a second partial derivative of the Hamiltonian with respect to a predetermined parameter for the second quantum state as a term of the first partial derivative. In the above process, determining the predetermined sample from the sample data set can be directly processed by a digital computer, and subsequent processes that need to be processed in the quantum state can all be completed by a quantum computer.

[0008] In a possible design, the method further includes: calculating a first average value of the M-times second partial derivatives obtained from the predetermined sample, and using the first average value as an item of the first partial derivative. In order to improve the accuracy of the calculation, the M-times second partial derivatives can be calculated for the same predetermined sample, and the larger the value of M, the higher the calculation accuracy.

[0009] In a possible design, it also includes: calculating a second average value of second partial derivatives corresponding to N samples obtained from the sample data set, and using the second average value as an item of the first partial derivative.

[0010] In one possible design, when the quantum units of the first layer are used to assign input samples of labeled samples and the quantum units of the second layer are used to assign output samples of labeled samples, the first layer and the second layer are visible layers; or, when the quantum units of the first layer are used to assign input samples of unlabeled samples, the first layer is a visible layer and the second layer is a hidden layer. In this way, for supervised learning of labeled samples, the first layer and the second layer of the quantum Boltzmann machine are all visible layers, and the input and output are both visible layers, without additional hidden layers. For unsupervised learning of unlabeled samples, based on the previous model, the second layer of the output sample is changed from a visible layer to a hidden layer, and no additional hidden layer is introduced. The unification of the supervised learning model and the unsupervised learning model is ensured.

[0011] In a second aspect, a hybrid computer is provided for implementing the above-mentioned various methods. The hybrid computer includes modules, units, or means corresponding to the above-mentioned methods, and the modules, units, or means can be implemented by hardware, software, or by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above-mentioned functions; for example, the hybrid computer may include a quantum computer and a digital computer for implementing the above-mentioned methods.

[0012] In a third aspect, a hybrid computer is provided, comprising: a processor and a memory; the memory is used to store computer instructions, and when the processor executes the instructions, the hybrid computer executes any of the above methods.

[0013] In a fourth aspect, a hybrid computer is provided, comprising: a processor; the processor is used to couple with a memory, and after reading instructions in the memory, execute any of the above methods according to the instructions.

[0014] In a fifth aspect, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is run on a computer, the computer can execute any of the methods described above.

[0015] In a sixth aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute any of the methods described above.

[0016] In a seventh aspect, a hybrid computer (for example, the hybrid computer may be a chip or a chip system) is provided, wherein the hybrid computer includes a processor for implementing the functions involved in any of the above aspects. In a possible design, the hybrid computer also includes a memory for storing necessary program instructions and data. When the hybrid computer is a chip system, it may be composed of a chip, or may include a chip and other discrete devices.

[0017] Among them, the technical effects brought about by any design method in the second to seventh aspects can refer to the technical effects brought about by different design methods in the above-mentioned first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 A schematic diagram of the structure of a hybrid computer provided in an embodiment of the present application;

[0019] Figure 2 A flowchart of a training method for a quantum Boltzmann machine provided in an embodiment of the present application;

[0020] Figure 3 A schematic diagram of the structure of a quantum Boltzmann machine provided in an embodiment of the present application;

[0021] Figure 4 A schematic diagram of the structure of a quantum Boltzmann machine provided in an embodiment of the present application;

[0022] Figure 5 A schematic diagram of the structure of a hybrid computer provided for another embodiment of the present application. DETAILED DESCRIPTION

[0023] First, the technical terms used in the embodiments of the present application are described as follows:

[0024] Supervised learning: The training data uses labeled samples. The training data has both features and labels. Usually the input samples have features and the output samples have labels. Through training, the machine can find the connection between features and labels by itself. When faced with data with only features but no labels, it can determine the labels.

[0025] Unsupervised learning: The training data uses unlabeled samples, usually only input samples, and the label information of the input samples is unknown. The goal is to reveal the intrinsic properties and laws of the data by learning from unlabeled samples, and provide a basis for further data analysis. The most studied and widely used learning task in this type is "clustering". Other unsupervised algorithms include: density estimation, anomaly detection, etc.

[0026] Semi-supervised learning: The training data contains both labeled and unlabeled samples. No human intervention is required, so that the machine does not rely on external interaction and automatically uses unlabeled samples to improve learning performance. This is semi-supervised learning.

[0027] Quantum computing is the use of quantum mechanics to perform general computing. Classical computers (digital computers) use 0 and 1 to encode, store and process data in binary, with each bit taking the value of 0 or 1. Quantum computing is based on the manipulation of quantum bits (qubits), each of which can be in a superposition of the quantum state |0> and |1>. N quantum bits can be in 2 N The superposition state of quantum states (|0...0>, |0...1>, ..., |1...0>, |1...1> states) (such as The manipulation of the superposition state is equivalent to the operation acting on these two N states, which makes quantum computers have powerful quantum parallel computing capabilities.

[0028] Boltzmann machine, Boltzmann machine is a neural network model. It contains two sets of variables: hidden variables and visible variables, all variables are binary (0 or 1). A Boltzmann machine with N variables satisfies the following three properties: 1. All variables (samples) can be represented by a binary random vector x∈{0, 1} N 1. All variables are fully connected, and the value of each variable depends on all other variables; 2. The influence relationship between variables is symmetrical. The joint probability of variable X conforms to the Boltzmann distribution, P(x) = (1 / Z) exp(-E(x)), where Z is the partition function Z = ∑ x exp(-E(x)), energy function E(x) = -(∑ i<j w ij x i x j +∑ i b i x i ), where w ij There are two variables x i and x j The connection weight between i ∈{0, 1} represents the state of the variable, b i is the variable x i The loss function used for Boltzmann machine parameter training is the negative log-likelihood Where v represents a visible variable, Represents the actual probability of v in the training data set data, P v is the marginal probability P of the observed variable in the model v =(1 / Z)∑ h exp(-E(x)), where h represents the hidden variable. The parameter update formula of the Boltzmann machine cannot usually be calculated accurately, but needs to be approximated by the Gibbs sampling method.

[0029] A quantum Boltzmann machine can be regarded as the quantum version of a classical Boltzmann machine. The variables in a quantum Boltzmann machine are qubits. The energy function in a classical Boltzmann machine is replaced by the Hamiltonian in quantum mechanics. The Hamiltonian is a quantum mechanical operator and can be represented by a matrix. For a system of N qubits, its Hamiltonian is a matrix of dimension 2 N ×2 N . The eigenvalues of the Hamiltonian are energies. Therefore, when the Hamiltonian has only diagonal elements (for example where is also a matrix of dimension 2 N ×2 N , and w ij and b i are model parameters), the quantum Boltzmann machine with N qubits is equivalent to the classical Boltzmann machine with N variables; when the Hamiltonian has non - diagonal elements (for example where are all matrices of dimension 2 N ×2 N , and is a model parameter), the energy function of the classical Boltzmann machine cannot describe all the characteristics of the Hamiltonian, and the quantum Boltzmann machine can describe more complex models compared to the classical Boltzmann machine. Similar to the classical Boltzmann machine, the joint probability of the states x of N qubits in a quantum Boltzmann machine satisfies the Boltzmann distribution P(x)=(1 / Z)exp(-<x|H|x>), where Z = tr[exp(-H)] is the partition function, |x> is the quantum state of state x, represented as a column vector, and <x| is the conjugate transpose of |x>, represented as a row vector. The loss function used for parameter training of the quantum Boltzmann machine is also the negative log - likelihood The marginal probability P v =(1 / Z)tr[Λ v exp(-H)], where tr() represents the trace of a matrix, h represents the hidden variable, and | represents the identity matrix. The parameter update of the quantum Boltzmann machine can obtain the Boltzmann distribution of the model through a quantum computer, sample, and then calculate the parameter update value. Some studies show that the increase in the hidden variables of the quantum Boltzmann machine has limited impact on the improvement of its performance, and the improvement of its performance is more significant by increasing the degrees of freedom of the parameters in the Hamiltonian. The simulation and experiment of the quantum Boltzmann machine show that it can complete training faster and / or obtain a better model.

[0030] Quantum approximate optimization algorithm, quantum approximate optimization algorithm (QAOA) is a quantum algorithm, specifically, it is a quantum-classical hybrid algorithm that combines classical parameter optimization with quantum computing. We can use QAOA to obtain the Boltzmann distribution of the quantum Boltzmann machine, and then perform sampling and calculation. QAOA involves two operators, called the mixed Hamiltonian H M With the cost Hamiltonian H C QAOA specifically includes the following steps: First, prepare a quantum state whose density operator is exp(-βH M ) / tr[exp(-βH M )], where β is a constant; then the operator is performed on this quantum state where v l and γ l is a series of constants to be optimized and are assigned random initial values; then the measurement operator H C The average <H C >, which is a numerical value; by using classical computers and classical optimization methods such as gradient descent, we can optimize v l and γ l Until you get <H C > minimum value, at which v l and γ l Take values ​​separately and Then the operator Acting on the quantum state exp(-βH M ) / tr[exp(-βH M )], the density operator is exp(-βH C ) / tr[exp(-βH C )]’s quantum state.

[0031] In the present application, "at least one" means one or more, and "multiple" means two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. "At least one of the following" or its similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple. In addition, the embodiments of the present application use words such as "first" and "second" to distinguish objects with similar names, functions or effects. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order.

[0032] like Figure 1 As shown, an embodiment of the present application provides a hybrid computer 01, including a computing subsystem 20, and a digital computer 10 coupled to the computing subsystem 20. The computing subsystem 20 can provide professional functions. In some embodiments, in the embodiments provided in the present application, the computing subsystem 20 is a quantum computer, and the digital computer 10 is a classical computer. In some embodiments, the quantum computer is a quantum annealer and / or an adiabatic quantum computer. In some embodiments, the quantum computer is a gate-model quantum computer or another suitable type of quantum computer.

[0033] The digital computer 10 includes one or more digital processors 101, a communication link 102, and at least one communication interface ( Figure 1 The description is merely illustrative of the communication interface 104 and a digital processor 101 as an example), and optionally a memory 103 may also be included.

[0034] The digital processor 101 can be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application.

[0035] The communication line 102 may include a path for connecting different components.

[0036] The communication interface 104 may be a transceiver module for communicating with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area network (WLAN), etc. For example, the transceiver module may be a device such as a transceiver or a transceiver. Optionally, the communication interface 104 may also be a transceiver circuit located in the digital processor 101 to implement signal input and signal output of the processor.

[0037] The memory 103 may be a device with a storage function. For example, it may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory may exist independently and be connected to the processor via the communication line 102. The memory may also be integrated with the digital processor.

[0038] The memory 103 is used to store computer-executable instructions for executing the solution of the present application, and the execution is controlled by the digital processor 101. The digital processor 101 is used to execute the computer-executable instructions stored in the memory 103, thereby realizing other classical digital processing calculations other than quantum calculations in the training method provided in the embodiment of the present application. The communication interface 104 is responsible for communicating with other devices, which is not specifically limited in the embodiment of the present application.

[0039] Optionally, the computer-executable instructions in the embodiments of the present application may also be referred to as application code, which is not specifically limited in the embodiments of the present application.

[0040] In a specific implementation, as an embodiment, the digital processor 101 may include one or more CPUs, such as Figure 1 CPU0 and CPU1 in.

[0041] In a specific implementation, as an embodiment, the digital computer 10 may include a plurality of digital processors, such as Figure 1 The digital processor 101 and the digital processor 108 in the embodiment of the present invention are shown in FIG. Each of these digital processors may be a single-CPU processor or a multi-CPU processor. The digital processor here may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).

[0042] In a specific implementation, as an embodiment, the digital computer 10 may also include an output device 105 and an input device 106. The output device 105 communicates with the digital processor 101 and can display information in a variety of ways. For example, the output device 105 may be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector. The input device 106 communicates with the digital processor 101 and can receive user input in a variety of ways. For example, the input device 106 may be a mouse, a keyboard, a touch screen device, or a sensor device. The above-mentioned digital computer 10 may be a general-purpose device or a dedicated device. Those skilled in the relevant art will appreciate that other digital computer configurations may be used to practice the present systems and methods, including handheld devices, multiprocessor systems, microprocessor-based or programmable consumer electronics, personal computers ("PCs"), network PCs, minicomputers, mainframe computers, etc., when properly configured or programmed to form a special purpose apparatus, and / or when communicatively coupled to control a quantum computer.

[0043] In this document, digital computer 10 will sometimes be referred to in the singular, but this is not intended to limit application to a single digital computer. The present system and method can also be practiced in a distributed computing environment, where tasks or groups of instructions are performed or executed by remote processing devices linked through a communications network. In a distributed computing environment, computer-readable or processor-readable instructions (sometimes referred to as program modules), application programs and / or data can be located in both local memory storage devices and remote memory storage devices (e.g., non-transitory computer-readable or processor-readable media). Figure 1As shown, the digital computer 10 is coupled to the computing subsystem 20 via a controller 109, which is coupled to the communication line 102 in the digital computer 10. In some embodiments, the memory 103 may store a set of computer-readable or processor-readable computing instructions (i.e., computing modules) to perform pre-processing, co-processing, and post-processing on the computing subsystem 20. According to the system and method of the present invention, the memory 103 may store a set of analog computer or quantum computer interface modules operable to interact with the computing subsystem 20.

[0044] In some implementations, the memory 103 may store instructions related to quantum Boltzmann machine training to provide programs and parameters for the operation of the computing subsystem 20 as a quantum Boltzmann machine. For example, the training method of the quantum Boltzmann machine provided by the embodiments of the present application may be implemented on the digital computer 10 and the computing subsystem 20.

[0045] The computing subsystem 20 may be disposed in an isolated environment (not shown). For example, if the computing subsystem 20 is a quantum computer, the environment may shield internal components of the quantum computer from heat, magnetic fields, etc. The computing subsystem 20 may include a quantum processor 201 .

[0046] Quantum processor 201 includes programmable elements such as qubits, couplers and other devices. The qubits are read out via a readout control system 202. These results are fed to the memory 103 of the digital computer 10. The qubits are controlled via a qubit control system 203. The coupler is controlled via a coupler control system 204. In some embodiments, qubit control system 203 and coupler control system 204 are used to implement quantum annealing as described herein on quantum processor 201. According to at least some embodiments of the systems and devices of the present application, the quantum processor can be designed to perform gate-level model quantum computing. Alternatively or additionally, the quantum processor can be designed to perform quantum annealing and / or adiabatic quantum computing.

[0047] Based on the above hybrid computer, the embodiment of the present application provides a training method for a quantum Boltzmann machine, referring to Figure 2 As shown, the following steps are included:

[0048] 101. Obtain the first loss function of the quantum Boltzmann machine.

[0049] The model structure of the quantum Boltzmann machine includes a first layer and a second layer; the quantum units of the first layer are used to assign input samples of labeled samples, and the quantum units of the second layer are used to assign output samples of labeled samples; or the quantum units of the first layer are used to assign input samples of unlabeled samples. The quantum units of the first layer are fully connected to the quantum units of the second layer. Figure 3 as well as Figure 4 The model structure of the quantum Boltzmann machine is described as follows: Figure 3 Provides the model structure of the quantum Boltzmann machine for supervised learning, Figure 4 The model structure of the quantum Boltzmann machine for unsupervised learning is provided. Figure 3 As shown in the model structure of the quantum Boltzmann machine for supervised learning, the quantum units of the first layer are used to assign input samples of labeled samples, and the quantum units of the second layer are used to assign output samples of labeled samples. The first and second layers are visible layers; refer to Figure 4 As shown in the figure, for the model structure of the quantum Boltzmann machine for unsupervised learning, the quantum units in the first layer are used to assign input samples of unlabeled samples, the first layer is the visible layer, and the second layer is the hidden layer. Therefore, Figure 3 As shown in the figure, for supervised learning with labeled samples, the first and second layers of the quantum Boltzmann machine are all visible layers, with the input and output acting as visible layers together, and no additional hidden layers. Figure 4 As shown in , for unsupervised learning of unlabeled samples, based on the previous model, the output variable is changed from the visible layer to the hidden layer, and no additional hidden layer is introduced. Figure 3 and Figure 4 As shown, the model structure is consistent when performing supervised learning and unsupervised learning, and the total number of qubits required is the same.

[0050] The Hamiltonian of a quantum Boltzmann machine has no particular form. As explained in the background, it can be one with only diagonal elements (e.g. There can also be non-diagonal elements (for example

[0051] The first loss function = α * the second loss function + β * the third loss function, wherein the second loss function is obtained by calculating the negative logarithmic conditional likelihood of the conditional probability of the output sample under the condition of the input sample of the labeled sample, and the third loss function is obtained by calculating the negative logarithmic conditional likelihood of the marginal probability of the input sample of the unlabeled sample; illustratively, for the convenience of calculation, the second loss function is obtained in the following manner: the negative logarithmic conditional likelihood is calculated according to the conditional probability of the output sample under the condition of the input sample of the labeled sample, and the loss function of supervised learning is obtained; the loss function of supervised learning is converted into the second loss function using the Golden-Thompson inequality. The third loss function is obtained in the following manner: the negative logarithmic conditional likelihood is calculated according to the marginal probability of the input sample of the unlabeled sample, and the loss function of unsupervised learning is obtained; the loss function of unsupervised learning is converted into the third loss function using the Golden-Thompson inequality.

[0052] The method for obtaining the first loss function is described as follows: The specific form of the Hamiltonian H of the quantum Boltzmann machine is not limited. For labeled samples, it includes the input sample x and the output sample y.

[0053] The marginal probability of the input sample x in the quantum Boltzmann machine model is The joint probability of the input sample x and the output sample y is Then the conditional probability of the output sample y under the condition that the input sample is x is Among them, for a quantum Boltzmann machine with a total number of samples N, the Hamiltonian H is a 2N×2N matrix; |> and <| are respectively the Dirac right ket and left bra symbols in quantum mechanics. Suppose the input sample x and the output sample y have n and N - n respectively, then |x> and <x| respectively represent n column vectors and row vectors of dimension 2 y I N-n represents the 2 is the symbol of the tensor product, and Λ x is also a 2 N ×2 N matrix; similarly H x = H - lnΛ x . For the supervised learning of labeled samples, the loss function is the negative log conditional likelihood, where D lab represents the dataset of labeled samples, represents the joint probability of x and y in the dataset of labeled samples. For the unsupervised learning of unlabeled samples, the loss function is the negative log likelihood, where D unlab represents the dataset of unlabeled samples, represents the probability of x in the dataset of unlabeled samples. The above two likelihood functions are not convenient for subsequent calculation and processing. Therefore, using the Golden - Thompson inequality, take as the loss function for supervised learning (i.e., the second loss function), and take as the loss function for unsupervised learning (i.e., the third loss function), where H x,y = H - lnΛ x - lnΛ y . The overall loss function of semi - supervised learning (i.e., the first loss function) is obtained by adding the above two loss functions in a certain proportion, that is Among them, α and β are unrestricted constants. An example is α∈[0, 1], β∈[0, 1]. Usually, its value needs to be determined according to the characteristics of the sample data set. For example, when α is 0 and β is not 0, it is used as the loss function of unsupervised learning. When α is not 0 and β is 0, it is used as the loss function of supervised learning. When both α and β are not 0, it is used as the loss function of semi-supervised learning.

[0054] 102. Obtain a first partial derivative of a first loss function with respect to a predetermined parameter of a Hamiltonian of a quantum Boltzmann machine, where the predetermined parameter includes a connection weight of two quantum units in the quantum Boltzmann machine or a bias of the quantum unit.

[0055] Let θ represent any parameter in the Hamiltonian of the quantum Boltzmann machine (e.g. w in ij With b i ),have and

[0056] So And can be written as a polynomial: Among them, the polynomial includes the following four terms:

[0057] The four items of are calculated by a hybrid computer of quantum computer and classical computer. A specific method for calculating each item in the first partial derivative is provided:

[0058] S01. Determine a predetermined sample from a sample data set, where the predetermined sample includes a labeled sample or an unlabeled sample.

[0059] S02, preparing a first quantum state of a predetermined sample;

[0060] S03, performing a quantum approximate optimization QAOA algorithm on the first quantum state to obtain a second quantum state;

[0061] S04. Measuring the second partial derivative of the Hamiltonian with respect to the predetermined parameter in the second quantum state as the term of the first partial derivative.

[0062] In order to improve the calculation accuracy, the method further includes S05, calculating a first average value of the M-times second partial derivatives obtained from the predetermined samples, and using the first average value as an item of the first partial derivative. The larger the value of M is, the higher the calculation accuracy is.

[0063] In addition, it is necessary to calculate all samples in the sample data set, which also includes: S06 calculating a second average value of the second partial derivatives corresponding to the N samples obtained in the sample data set, and using the second average value as the term of the first partial derivative.

[0064] Wherein, the above step S01 can be calculated by a digital computer, and S02-S04 can be calculated by a quantum computer; in step S05, the first average value of the M-times second partial derivatives obtained from the predetermined sample can be calculated by a digital computer, and in step S05, the steps of steps S02-S04 need to be repeated for each predetermined sample obtained. In addition, in step S06, the second average value of the second partial derivatives corresponding to the N samples obtained in the sample data set can be calculated by a digital computer, and in step S06, the steps of steps S02-S04 need to be repeated for each sample or the steps of steps S02-S05 need to be repeated.

[0065] The following is a detailed description of the above The instructions for obtaining the four items of are as follows:

[0066] 1) For The acquisition process is described as follows:

[0067] S1. Select a sample (x) from the dataset of labeled samples. i ,y i ), and thus determine in the form of

[0068] S2. Before the execution of QAOA, when preparing the initial state, sample y i The corresponding qubit quantum state is represented by the density matrix exp(-βH M ) / tr[exp(-βH M )] was prepared, and the sample x i The corresponding qubit quantum state is prepared according to the sample in S1 as quantum state |x i >.

[0069] S3, define the cost Hamiltonian in the QAOA algorithm as S1 The mixed Hamiltonian is in The dimension is 2 N ×2 N , N is the total number of input samples x and output samples y, which is also the total number of qubits required to execute the QAOA algorithm, and n is the number of input samples y. Then follow the remaining steps of the QAOA algorithm to complete the execution of the QAOA algorithm. After QAOA is completed, the quantum state will be obtained Operator on this quantum state The measurement of

[0070] S4, repeat S2, S3, for the sample (xi ,y i ) to obtain the results of multiple measurements, and then calculate M is the number of times steps S2 and S3 are repeated. There is no limit on the value of M. The larger M is, the higher the calculation accuracy is.

[0071] S5, repeat steps S1-S4, obtaining different samples from the dataset of labeled samples each time in S1, until all labeled samples are obtained. Then calculate Nlab is the number of labeled samples and the number of times steps S1-S4 are repeated.

[0072] 2) The acquisition process is described as follows:

[0073] S1. Select a sample x from the unlabeled sample dataset i , and thus determine in the form of For unsupervised learning, the output samples y represent the hidden layer variables.

[0074] S2. Before the execution of QAOA, when preparing the initial state, sample x i The corresponding qubit quantum state is prepared according to the sample in S1 as quantum state |x i >. The quantum state of the qubit corresponding to sample y is represented by the density matrix exp(-βH M ) / tr[exp(-βH M )] for preparation.

[0075] S3, define the cost Hamiltonian in the QAOA algorithm as S1 The mixed Hamiltonian is Then follow the remaining steps of QAOA to complete the QAOA algorithm, and obtain the quantum state after completing the QAOA algorithm Operator on this quantum state The measurement is carried out Measured

[0076] S4, repeat S2, S3, for sample x i Get the results of multiple measurements, and then calculate and repeat the QAOA algorithm and measurement multiple times to calculate

[0077] S5, repeat steps S1-S4, obtaining different samples from the dataset of unlabeled samples in S1 each time, until all unlabeled samples are obtained. Then calculate Nunlab is the number of unlabeled samples and the number of times steps S1-S4 are repeated.

[0078] 3) The acquisition process is described as follows:

[0079] S1. Execute the QAOA algorithm, where the cost Hamiltonian is set to H and the mixed Hamiltonian is After the QAOA algorithm is completed, the operator is performed on the obtained quantum state The measurement of

[0080] S2, repeat step S1, get the results of multiple measurements, and then calculate

[0081] It should be noted that the cost Hamiltonian and the mixed Hamiltonian in the QAOA algorithm are usually specified, so that the QAOA algorithm can be executed. When executing the QAOA algorithm, the sample must first be prepared to the quantum state related to the mixed Hamiltonian. In the example, the quantum state of the sample x is prepared as |x i >, instead of being prepared according to the mixed Hamiltonian of the QAOA algorithm, the sample y is prepared according to the standard procedure of the QAOA algorithm for the initial state. As for the fourth term, since the fourth term is independent of the sample, we can completely follow the general rules of the QAOA algorithm to prepare all qubits to the quantum state associated with the mixed Hamiltonian at the beginning of the execution, and then continue to execute the QAOA algorithm. The acquisition process does not provide detailed description of sample selection and quantum state preparation.

[0082] 4) The acquisition process is as follows:

[0083] S1. Calculate for each labeled sample The average of all the labeled samples is obtained

[0084] in, The acquisition process can be completely implemented on a digital computer.

[0085] Finally, the calculation results of each item obtained from 1), 2), 3) and 4) above are calculated by a digital computer.

[0086] 103. Execute a gradient algorithm on the first partial derivative to update predetermined parameters, and obtain an updated quantum Boltzmann machine, wherein the Hamiltonian of the updated quantum Boltzmann machine uses the updated predetermined parameters.

[0087] In step 103, a gradient descent method or an ascent method is specifically applied to the first partial derivative to update predetermined parameters to complete model training.

[0088] In the above scheme, since the model structure of the quantum Boltzmann machine includes the first layer and the second layer; wherein the quantum units of the first layer are used to assign input samples of labeled samples, and the quantum units of the second layer are used to assign output samples of labeled samples, or the first layer is used to assign input samples of unlabeled samples; the quantum units of the first layer are fully connected with the quantum units of the second layer; the model structure is consistent when performing supervised learning and unsupervised learning, and the total number of qubits required is consistent. In addition, the loss function of training the quantum Boltzmann machine adopts the negative logarithmic conditional likelihood of the conditional probability of the output sample under the condition of the input sample of the labeled sample, and the negative logarithmic conditional likelihood of the marginal probability of the input sample of the unlabeled sample, which is obtained by adding them in a certain ratio, so that the trained quantum Boltzmann machine can adapt to semi-supervised learning.

[0089] It can be understood that in each of the above embodiments, the methods and / or steps implemented by the hybrid computer can also be implemented by components (such as chips or circuits) that can be used in the hybrid computer.

[0090] The above mainly introduces the scheme provided by the embodiment of the present application from the perspective of the method flow implemented by the hybrid computer. Accordingly, the embodiment of the present application also provides a hybrid computer, which is used to implement the above-mentioned various methods. It is understandable that, in order to realize the above-mentioned functions, the hybrid computer includes a hardware structure and / or software module corresponding to each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0091] The embodiment of the present application can divide the hybrid computer into functional modules according to the above method embodiment. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0092] Figure 5The figure shows a schematic diagram of the structure of a hybrid computer 5. The hybrid computer comprises: a digital computing unit 51 and a quantum computing unit 52.

[0093] The digital computing unit 51 is used to obtain a first loss function of a quantum Boltzmann machine, wherein the model structure of the quantum Boltzmann machine includes a first layer and a second layer; the quantum units of the first layer are used to assign input samples of labeled samples, and the quantum units of the second layer are used to assign output samples of labeled samples; or the quantum units of the first layer are used to assign input samples of unlabeled samples; the quantum units of the first layer are fully connected with the quantum units of the second layer; the first loss function = α * the second loss function + β * the third loss function, wherein the second loss function is obtained by calculating the negative logarithmic conditional likelihood of the conditional probability of the output sample under the condition of the input sample of the labeled sample, and the third loss function The number is obtained by calculating the negative logarithmic conditional likelihood of the marginal probability of the input sample of the unlabeled sample; α and β are constants; a quantum computing unit 52 obtains a first partial derivative of the first loss function obtained by the digital computing unit 51 with respect to a predetermined parameter of the Hamiltonian of the model of the quantum Boltzmann machine, wherein the predetermined parameter includes a connection weight of two quantum units in the model of the quantum Boltzmann machine or a bias of the quantum unit; the digital computing unit 51 is also used to execute a gradient algorithm on the first partial derivative obtained by the quantum computing unit 52 to update the predetermined parameter, and obtain the updated quantum Boltzmann machine, wherein the Hamiltonian of the updated quantum Boltzmann machine uses the updated predetermined parameter.

[0094] Optionally, the digital computing unit 51 is also used to perform negative logarithmic conditional likelihood calculation based on the conditional probability of the output sample under the input sample condition of the labeled sample to obtain a loss function of supervised learning; and convert the loss function of supervised learning into the second loss function using the Gordon-Thompson inequality.

[0095] Optionally, the digital computing unit 51 is also used to perform negative logarithmic conditional likelihood calculation based on the marginal probability of the input sample of the unlabeled sample to obtain the loss function of unsupervised learning; and convert the loss function of the unsupervised learning into the third loss function using the Gordon-Thompson inequality.

[0096] Optionally, the first partial derivative is expressed as a polynomial, and the digital computing unit 51 is used to determine a predetermined sample from a sample data set, wherein the predetermined sample includes the labeled sample or the unlabeled sample; the quantum computing unit 52 is used to prepare a first quantum state of the predetermined sample determined by the digital computing unit; execute a QAOA algorithm on the first quantum state to obtain a second quantum state; and measure a second partial derivative of the Hamiltonian with respect to a predetermined parameter for the second quantum state as an item of the first partial derivative.

[0097] Optionally, the digital calculation unit 51 is further used to calculate a first average value of the M-times second partial derivatives obtained from the predetermined samples, and use the first average value as an item of the first partial derivative.

[0098] Optionally, the digital calculation unit 51 is further used to calculate a second average value of second partial derivatives corresponding to N samples obtained in a predetermined sample set, and use the second average value as an item of the first partial derivative.

[0099] Optionally, when the quantum units of the first layer are used to assign input samples of labeled samples and the quantum units of the second layer are used to assign output samples of labeled samples, the first layer and the second layer are visible layers; or, when the quantum units of the first layer are used to assign input samples of unlabeled samples, the first layer is a visible layer and the second layer is a hidden layer.

[0100] Among them, all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here.

[0101] In this embodiment, the hybrid computer is presented in the form of various functional modules divided in an integrated manner. The "module" here can refer to a specific ASIC, circuit, processor and memory that executes one or more software or firmware programs, integrated logic circuit, and / or other devices that can provide the above functions. In a simple embodiment, a person skilled in the art can imagine that the hybrid computer can be used Figure 1 The form of the hybrid computer shown.

[0102] for example, Figure 1 The digital processor 101 and the computing subsystem 20 in the hybrid computer 01 shown can call the computer execution instructions stored in the memory 103 so that the hybrid computer 01 executes the method in the above method embodiment; the computing subsystem 20 can be a quantum computer.

[0103] Specifically, Figure 5 The function / implementation process of the digital computing unit 51 can be achieved by Figure 1The hybrid computer 01 shown is implemented by a digital computer, that is, the digital processor 101 calls the computer execution instructions stored in the memory 103 to implement the function / implementation process of the quantum computing unit 52. Figure 1 The quantum computer implementation in the hybrid computer 01 shown is implemented by the quantum computer calling the computer execution instructions stored in the memory 103. Since the hybrid computer 01 provided in this embodiment can execute the above method, the technical effects that can be obtained can refer to the above method embodiment, which will not be repeated here.

[0104] Optionally, an embodiment of the present application further provides a hybrid computer (for example, the hybrid computer may be a chip or a chip system), the hybrid computer including a processor and an interface, the processor being used to read instructions to execute the method in any of the above method embodiments. In one possible design, the hybrid computer also includes a memory. The memory is used to store necessary program instructions and data, and the processor may call the program code stored in the memory to instruct the hybrid computer to execute the method in any of the above method embodiments. Of course, the memory may not be in the computing device. When the hybrid computer is a chip system, it may be composed of chips, or it may include chips and other discrete devices, which is not specifically limited in the embodiments of the present application.

[0105] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or may contain one or more servers, data centers and other data storage devices that can be integrated with the medium. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)), etc. In the embodiment of the present application, the computer may include the aforementioned device.

[0106] Although the present application is described herein in conjunction with various embodiments, in the process of implementing the claimed application, those skilled in the art may understand and implement other variations of the disclosed embodiments by viewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "one" or "an" does not exclude multiple situations. A single processor or other unit may implement several functions listed in a claim. Certain measures are recorded in different dependent claims, but this does not mean that these measures cannot be combined to produce good results.

[0107] Although the present application has been described in conjunction with specific features and embodiments thereof, it is obvious that various modifications and combinations may be made thereto without departing from the spirit and scope of the present application. Accordingly, this specification and the drawings are merely exemplary illustrations of the present application as defined by the appended claims, and are deemed to have covered any and all modifications, variations, combinations or equivalents within the scope of the present application. Obviously, those skilled in the art may make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

[0108] Finally, it should be noted that the above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A hybrid computer, characterized in that: include: A digital computer, used for obtaining a first loss function of a quantum Boltzmann machine, wherein the model structure of the quantum Boltzmann machine includes a first layer and a second layer; the quantum units of the first layer are used to assign input samples of labeled samples, and the quantum units of the second layer are used to assign output samples of labeled samples; or the quantum units of the first layer are used to assign input samples of unlabeled samples; the quantum units of the first layer are fully connected with the quantum units of the second layer; the first loss function = α * second loss function + β * third loss function, wherein the second loss function is obtained by calculating the negative logarithmic conditional likelihood of the conditional probability of the output sample under the condition of the input sample of the labeled sample, and the third loss function is obtained by calculating the negative logarithmic conditional likelihood of the marginal probability of the input sample of the unlabeled sample; α and β are constants; A quantum computer is used to obtain a first partial derivative of the first loss function obtained by the digital computer with respect to a predetermined parameter of the Hamiltonian of the quantum Boltzmann machine, wherein the predetermined parameter includes a connection weight of two quantum units in the quantum Boltzmann machine or a bias of the quantum unit; The digital computer is further used to execute a gradient algorithm on the first partial derivative obtained by the hybrid computer to update the predetermined parameters, and obtain an updated quantum Boltzmann machine, wherein the Hamiltonian of the updated quantum Boltzmann machine uses the updated predetermined parameters.

2. The hybrid computer according to claim 1, characterized in that: The digital computer is also used to calculate the negative logarithmic conditional likelihood based on the conditional probability of the output sample under the condition of the input sample of the labeled sample to obtain the loss function of supervised learning; and convert the loss function of supervised learning into the second loss function using the Gordon-Thompson inequality.

3. The hybrid computer according to claim 1, characterized in that: The digital computer is also used to perform negative logarithmic conditional likelihood calculation based on the marginal probability of the input sample of the unlabeled sample to obtain the loss function of unsupervised learning; and convert the loss function of unsupervised learning into the third loss function using the Gordon-Thompson inequality.

4. The hybrid computer according to claim 1, characterized in that: The first partial derivative is expressed as a polynomial, and the digital computer is also used to determine a predetermined sample from a sample data set, wherein the predetermined sample includes the labeled sample or the unlabeled sample; the quantum computer is used to prepare a first quantum state of the predetermined sample determined by the digital computer; execute a QAOA algorithm on the first quantum state to obtain a second quantum state; and measure a second partial derivative of the Hamiltonian with respect to a predetermined parameter for the second quantum state as an item of the first partial derivative.

5. The hybrid computer according to claim 4, characterized in that: The digital computer is also used to calculate a first average value of the M-times second partial derivatives obtained from the predetermined samples, and use the first average value as the term of the first partial derivative.

6. The hybrid computer according to claim 4 or 5, characterized in that: The digital computer is also used to calculate a second average value of second partial derivatives corresponding to N samples obtained in a predetermined sample set, and use the second average value as an item of the first partial derivative.

7. The hybrid computer according to claim 1, characterized in that: When the quantum units of the first layer are used to assign values ​​to input samples of labeled samples, and the quantum units of the second layer are used to assign values ​​to output samples of labeled samples, the first layer and the second layer are visible layers; Alternatively, when the quantum units of the first layer are used to assign input samples of unlabeled samples, the first layer is a visible layer and the second layer is a hidden layer.

8. A training method for a quantum Boltzmann machine, characterized in that: Applied to a hybrid computer as claimed in claim 1, the hybrid computer comprising a digital computer and a quantum computer, the method comprising: Obtaining a first loss function of a quantum Boltzmann machine by a digital computer, wherein the model structure of the quantum Boltzmann machine comprises a first layer and a second layer; the quantum units of the first layer are used to assign input samples of labeled samples, and the quantum units of the second layer are used to assign output samples of labeled samples; or the quantum units of the first layer are used to assign input samples of unlabeled samples; the quantum units of the first layer are fully connected with the quantum units of the second layer; the first loss function = α*second loss function + β*third loss function, wherein the second loss function is obtained by calculating the negative logarithmic conditional likelihood of the conditional probability of the output sample under the condition of the input sample of the labeled sample, and the third loss function is obtained by calculating the negative logarithmic conditional likelihood of the marginal probability of the input sample of the unlabeled sample; α and β are constants; Obtaining, by a quantum computer, a first partial derivative of the first loss function with respect to a predetermined parameter of a Hamiltonian of the quantum Boltzmann machine, wherein the predetermined parameter includes a connection weight of two quantum units in the quantum Boltzmann machine or a bias of the quantum unit; The predetermined parameters are updated by executing a gradient algorithm on the first partial derivative through the digital computer to obtain an updated quantum Boltzmann machine, wherein the Hamiltonian of the updated quantum Boltzmann machine uses the updated predetermined parameters.

9. The training method of a quantum Boltzmann machine according to claim 8, characterized in that: The method further comprises: The digital computer calculates the negative logarithmic conditional likelihood of the output sample under the condition of the input sample of the labeled sample to obtain the loss function of supervised learning; and converts the loss function of supervised learning into the second loss function using the Gordon-Thompson inequality.

10. The training method of a quantum Boltzmann machine according to claim 8, characterized in that: The method further comprises: The digital computer performs negative logarithmic conditional likelihood calculation according to the marginal probability of the input sample of the unlabeled sample to obtain the loss function of unsupervised learning; the loss function of unsupervised learning is converted into the third loss function using the Gordon-Thompson inequality.

11. The training method of a quantum Boltzmann machine according to claim 8, characterized in that: The first partial derivative is expressed as a polynomial, and the method further comprises: Determining a predetermined sample from the sample data set by the digital computer, wherein the predetermined sample includes the labeled sample or the unlabeled sample; The first quantum state of the predetermined sample is prepared by the quantum computer; a quantum approximate optimization QAOA algorithm is executed on the first quantum state to obtain a second quantum state; and a second partial derivative of the Hamiltonian with respect to a predetermined parameter is measured for the second quantum state as an item of the first partial derivative.

12. The training method of a quantum Boltzmann machine according to claim 11, characterized in that: Also includes: The digital computer calculates a first average value of the M-times second partial derivatives obtained from the predetermined samples, and uses the first average value as an item of the first partial derivative.

13. The training method of a quantum Boltzmann machine according to claim 11 or 12, characterized in that: Also includes: The digital computer calculates a second average value of the second partial derivatives corresponding to the N samples obtained from the sample data set, and uses the second average value as an item of the first partial derivative.

14. The training method of a quantum Boltzmann machine according to claim 8, characterized in that: When the quantum units of the first layer are used to assign values ​​to input samples of labeled samples, and the quantum units of the second layer are used to assign values ​​to output samples of labeled samples, the first layer and the second layer are visible layers; Alternatively, when the quantum units of the first layer are used to assign input samples of unlabeled samples, the first layer is a visible layer and the second layer is a hidden layer.

15. A hybrid computer, characterized in that: include: Processor and memory; The memory is used to store computer-executable instructions. When the processor executes the computer-executable instructions, the hybrid computer executes the method according to any one of claims 8 to 14.

16. A chip, characterized in that: Including processor and interface; The processor is configured to read instructions to execute the method according to any one of claims 8 to 14.

17. A computer-readable storage medium, characterized in that: The method comprises instructions which, when executed on a computer, cause the computer to execute the method according to any one of claims 8 to 14.

Citation Information

Patent Citations

  • Systems and methods for creating and using quantum boltzmann machines

    CN108369668A

  • A model training method and device based on machine learning

    CN109886342A