CN115828999B - Quantum convolution neural network construction method and system based on quantum state amplitude transformation - Google Patents
Quantum convolution neural network construction method and system based on quantum state amplitude transformation Download PDFInfo
- Publication number
- CN115828999B CN115828999B CN202211292790.6A CN202211292790A CN115828999B CN 115828999 B CN115828999 B CN 115828999B CN 202211292790 A CN202211292790 A CN 202211292790A CN 115828999 B CN115828999 B CN 115828999B
- Authority
- CN
- China
- Prior art keywords
- quantum
- layer
- neural network
- convolution
- bits
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 230000009466 transformation Effects 0.000 title claims abstract description 48
- 238000013528 artificial neural network Methods 0.000 title claims abstract description 46
- 238000010276 construction Methods 0.000 title claims abstract description 23
- 239000002096 quantum dot Substances 0.000 claims abstract description 60
- 238000011176 pooling Methods 0.000 claims abstract description 50
- 238000012549 training Methods 0.000 claims abstract description 45
- 238000000034 method Methods 0.000 claims abstract description 28
- 238000013527 convolutional neural network Methods 0.000 claims abstract description 24
- 230000008569 process Effects 0.000 claims abstract description 17
- 239000000284 extract Substances 0.000 claims description 7
- 238000013507 mapping Methods 0.000 claims description 5
- 230000000694 effects Effects 0.000 claims description 4
- 238000012545 processing Methods 0.000 abstract description 3
- 238000012821 model calculation Methods 0.000 abstract description 2
- 238000003062 neural network model Methods 0.000 abstract description 2
- 230000006870 function Effects 0.000 description 11
- 238000012360 testing method Methods 0.000 description 7
- 230000008901 benefit Effects 0.000 description 5
- 238000002474 experimental method Methods 0.000 description 4
- 238000005259 measurement Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 210000002569 neuron Anatomy 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 210000002364 input neuron Anatomy 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 238000000844 transformation Methods 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Landscapes
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention belongs to the technical field of quantum model calculation, and particularly relates to a quantum convolution neural network construction method and system based on quantum state amplitude transformation, wherein the properties of a convolution layer and a pooling layer are expanded to a quantum domain according to the local connectivity and parameter sharing properties of the convolution layer and the pooling layer in the convolution neural network, so as to construct a quantum convolution neural network consisting of a quantum convolution layer, a quantum pooling layer and a quantum full-connection layer; and generating a quantum data set according to the quantum bit cluster state, training the quantum convolutional neural network by using the generated quantum data set, and taking the mean square error between the model output and the label as a cost function for measuring the quantum bit in the training process to obtain an expected value. The invention can realize the construction of the quantum convolution neural network model by utilizing the low-depth quantum circuit, so that the training efficiency and the convergence rate of the constructed network model can be greatly improved, and the application in the classification processing of quantum data and classical data is facilitated.
Description
Technical Field
The invention belongs to the technical field of quantum model calculation, and particularly relates to a quantum convolution neural network construction method and system based on quantum state amplitude transformation.
Background
The quantum machine learning library TensorFlow Quantum (TFQ) can be used to quickly construct a mixed quantum classical model of classical or quantum data, supporting a high performance quantum circuit simulator with a quantum convolutional neural network model, but has the following problems: the training time of the scalar model in the experiment is long, and convergence is difficult; the quantum circuit parameters of the built model are more, and the circuit depth is deeper. Because of the noisy mesoscale quantum (NISQ) age still in existence, the construction of quantum neural networks requires less quantum costs, such as: the line depth and the parameter number of the quantum parameterized line are in line with expectations.
Disclosure of Invention
The invention provides a quantum convolution neural network construction method and a system based on quantum state amplitude transformation, which can realize the construction of a quantum convolution neural network model by utilizing a low-depth quantum circuit, so that the training efficiency and the convergence speed of the constructed network model can be greatly improved, and the application in the classification processing of quantum data and classical data is facilitated.
According to the design scheme provided by the invention, a quantum convolution neural network construction method based on quantum state amplitude transformation is provided, and comprises the following contents:
according to local connectivity and parameter sharing properties of a convolution layer and a pooling layer in a convolution neural network, extending the properties of the convolution layer and the pooling layer to a quantum domain to form a quantum convolution neural network consisting of the quantum convolution layer, the quantum pooling layer and a quantum full-connection layer, wherein the quantum convolution layer and the quantum pooling layer extract structural features of an input quantum state through unitary transformation of quantum bits, and the quantum full-connection layer maps the structural features to corresponding tag spaces by utilizing quantum circuits;
and generating a quantum data set according to the quantum bit cluster state, training the quantum convolutional neural network by using the generated quantum data set, and taking the mean square error between the model output and the label as a cost function for measuring the quantum bit in the training process to obtain an expected value.
Quantum convolution neural network construction based on quantum state amplitude transformation in the inventionThe method further comprises the step of multiplying the product of unitary transformation by the quantum convolution neural networkTo express, wherein->Unitary matrices respectively representing a quantum convolution layer, a quantum pooling layer and a quantum fully-connected layer, wherein L is less than or equal to log 2 N,N=2 n ,n∈N * L represents the first quantum convolution layer and the pooling layer, and N is the number of qubits in the model. θ represents the angle by which the qubit rotates around the Y-axis of the Buloch sphere, +.>Representing the network model output.
As the quantum convolution neural network construction method based on quantum state amplitude transformation, further, in unitary transformation in the quantum convolution neural network, a unitary transformation operation process in the quantum convolution neural network is constructed through the additional and/or repeated operation of a single-quantum bit rotating gate and a double-quantum bit controlled NOT gate.
As the quantum convolution neural network construction method based on quantum state amplitude transformation in the invention, further, the quantum convolution layer calculates W by unitary operation of two quantum bits l To extract the input data characteristics, wherein the unitary operation is expressed as:U ent the two-qubit controlled NOT operation is represented, U represents a single-qubit rotation gate, n represents the number of qubits, and θ represents the angle by which the qubit rotates about the X-axis of the Buloch sphere.
As the quantum convolution neural network construction method based on quantum state amplitude transformation, the quantum pooling layer further completes projection of characteristic multiple quantum bits to single quantum bits through unitary transformation of two quantum bits, wherein the unitary transformation process is expressed as:
as the quantum convolution neural network construction method based on quantum state amplitude transformation, the quantum full-connection layer adopts a functionThe quantum circuit structure with the mapping effect is characterized in that x is the final output of a pooling layer of a convolution layer, b is a preset deviation value, and w is a parameter for training by adjusting a rotation angle.
As the quantum convolution neural network construction method based on quantum state amplitude transformation, the quantum circuit utilizes unitary transformation in the quantum full-connection layerTo perform input/output mapping, wherein +.>n represents the number of qubits and CNOT represents a double-qubit controlled NOT.
As the quantum convolution neural network construction method based on quantum state amplitude transformation, further, a full connection layer in the quantum convolution neural network acquires a quantum bit expected value by measuring a quantum bit in a corresponding quantum circuit, and maps the expected value to a classification label.
The quantum convolution neural network construction method based on quantum state amplitude transformation further generates a quantum data set according to the quantum bit cluster state, and firstly, a controlled Z gate operation is performed on adjacent quantum bits to generate a correct cluster state on the quantum bits; then, rotating the quantum bit around the X axis of the Buloch sphere to simulate an error in the cluster state, and generating a quantum bit error cluster state; then, several quantum states conforming to the training amount size are randomly generated.
Further, the invention also provides a quantum convolution neural network construction system based on quantum state amplitude transformation, which comprises: a model building module and a model training module, wherein,
the model building module is used for expanding the attribute of the convolution layer and the pooling layer to a quantum domain according to the local connectivity and the parameter sharing characteristic of the convolution layer and the pooling layer in the convolution neural network CNN to build a quantum convolution neural network consisting of a quantum convolution layer, a quantum pooling layer and a quantum full-connection layer, wherein the quantum convolution layer and the quantum pooling layer extract the structural characteristics of an input quantum state through unitary transformation of quantum bits, and the quantum full-connection layer utilizes a quantum circuit to map the structural characteristics to corresponding tag spaces;
the model training module is used for generating a quantum data set according to the state of the quantum bit cluster, training the quantum convolutional neural network by utilizing the generated quantum data set, and taking the mean square error between the model output and the label as a cost function for measuring the quantum bit in the training process to obtain an expected value.
The invention has the beneficial effects that:
according to the invention, the quantum convolutional neural network ATQCNN is constructed based on the low-depth quantum circuit, extraction and classification application of quantum state input data are realized through the quantum convolutional layer, the quantum pooling layer and the quantum full-connection layer in the network, and the training efficiency and the convergence speed of the pure quantum convolutional neural network model are improved. And further through experimental result verification, compared with the QCNN model of Google, the model can reduce the parameter quantity by about 30%, has quicker and more stable convergence and improves the training efficiency by 35%, and the model has the advantages of reducing the quantum cost overhead, such as the circuit depth and the parameter quantity, being applicable to the classification problems of processing quantum data and classical data, such as image recognition, quantum state classification, malicious code detection and the like, and providing possibility for the application of a quantum computer in the NISQ age.
Description of the drawings:
FIG. 1 is a schematic diagram of a quantum convolutional neural network construction flow in an embodiment;
FIG. 2 is a schematic diagram of an 8-qubit ATQNN model architecture in an embodiment;
FIG. 3 is a schematic circuit structure of a quantum fully-connected layer in an embodiment;
FIG. 4 is a graph showing the loss function curve, test accuracy and training time of the sample during training and testing in the example.
The specific embodiment is as follows:
the present invention will be described in further detail with reference to the drawings and the technical scheme, in order to make the objects, technical schemes and advantages of the present invention more apparent.
Referring to fig. 1, an embodiment of the present invention provides a quantum convolution neural network construction method based on quantum state amplitude transformation, including:
s101, extending the properties of a convolution layer and a pooling layer to a quantum domain according to the local connectivity and parameter sharing properties of the convolution layer and the pooling layer in the convolution neural network, and constructing a quantum convolution neural network consisting of the quantum convolution layer, the quantum pooling layer and a quantum full-connection layer, wherein the quantum convolution layer and the quantum pooling layer extract structural features of an input quantum state through unitary transformation of quantum bits, and the quantum full-connection layer maps the structural features to corresponding tag spaces by utilizing quantum circuits;
s102, generating a quantum data set according to the state of the quantum bit cluster, training a quantum convolutional neural network by using the generated quantum data set, and taking the mean square error between the model output and the label as a cost function for measuring the quantum bit in the training process to obtain an expected value.
Unlike other neural networks, CNNs consist of multiple convolutional layers and pooled layers. These two unique layers have the property of local connectivity and parameter sharing, allowing CNNs to extract structured features with relatively few parameters. In the convolutional layer, each neuron is connected to only a portion of the input neurons, and this local connection ensures that the learned filter can respond positively to local input features. The filters used in the neuron computation share the same depth, which can significantly reduce the parameters that need to be solved. In the embodiment, the key attributes are extended to the quantum domain to construct the quantum convolutional neural network ATQCNN model. The input of the ATQCNN is quantum state data, after the characteristics are extracted layer by layer, the expected value is obtained through quantum measurement of specific quantum bits, and the loss function is calculated; the optimization update is then performed until the appropriate parameters are learned so that the encoded quantum states can be mapped correctly to the corresponding labels.
The framework of the 8-quantum bit ATQNN model shown in fig. 2 is shown in (a) which is a framework structure illustration and consists of three quantum convolution layers, a pooling layer and a quantum full-connection layer; (b) Is a quantum circuit of a quantum convolution layer and a quantum pool layer, wherein the subscripts of W and V represent which two qubits the unitary transformation acts on. (c) A two-qubit unitary transformation for the quantum convolution layer and the quantum pool layer, respectively. The model can be written as the product of unitary transforms:
wherein the method comprises the steps ofUnitary matrices of quantum convolution layer, quantum pooling layer and quantum fully-connected layer, respectively. Specifically, if the input quantum state is |q 0 q 1 ...q k >After one convolution pooling operation, the number of qubits is halved:
after carrying out the convolution pooling operation for l times:wherein,,k is an odd number.
As a preferred embodiment, further, in unitary transformation in the quantum convolutional neural network, the unitary transformation operation procedure in the quantum convolutional neural network is constructed through additional and/or repeated operations of a single-qubit rotation gate and a double-qubit controlled NOT gate.
Unitary transformations of the quantum convolution layer and the quantum pooling layer may be constructed by appending and repeating in { RY, CNOT }. RY is a single qubit spin gate (spin around Y-axis of Bloch sphere) and CNOT is a double qubit controlled NOT gate. After the RY gate operation is performed, only the amplitude of the quantum state changes. Thus, the entire bloch sphere needs to be initially explored to obtain the solution vector, but now only the surface around the y-axis needs to be explored. Furthermore, the CNOT gate is used to construct entanglement relationships between qubits. Low depth circuits with high entanglement have potential advantages in capturing the relationship between quantum data and data classification.
The main purpose of the convolution layer is to extract features from the input data, while quantum convolution has the advantage of enhancing the mapping. Fig. 2 (b) shows that the quantum convolution layer is formed by unitary operation W using two quantum bits l Implemented, where l represents the first quantum convolution layer, can be written as the product of unitary transforms:
wherein U is ent =CNOT,This unitary operation acts on adjacent qubits and all applied unitary operations in a layer have the same parameters, reflecting the same two-feature local connectivity and parameter sharing as classical CNNs. The dashed box is repeated a number of times to increase the depth of the layer and thus the number of parameters.
Quantum pooling layer V by unitary transformation using two qubits l Where l represents the first quantum pooling layer, can be written as the product of unitary transforms:
it allows information to be projected from two qubits to a single qubit to achieve the effect of reducing the feature map dimension. As shown in FIG. 2 (c), a unitary of two qubitsPositive operation is applied to m and m+k/2 l Where k is the number of qubits contained in the model and m is the mth qubit. Like the quantum convolution layer, it has the same parameters within the layer.
After the convolution and pooling layers, the dimensionality of the data is reduced. The quantum full-connection layer maps the characteristic information reserved by the residual bits to the corresponding sample tag space. The quantum fully connected layer circuit may be as shown in fig. 3. Based on definition of classical full connection layer, functions can be realized by utilizingAn effective quantum circuit structure. Input x is the output of the final convolutional pooling layer and b is the set offset value. The parameter training of w and b is accomplished by adjusting the angle of the RY gate, where the dimension of the output measurement is the same as the dimension of the input x. It can be written as the product of a unitary transformation:
wherein,,finally, a measurement is made of the specific qubit and the obtained expected value is mapped to the class label.
Further, in generating a quantum data set and a quantum state according to a quantum bit cluster state, first, a controlled Z gate operation is performed on adjacent quantum bits to generate a correct cluster state on the quantum bits; then, rotating the quantum bit around the X axis of the Buloch sphere to simulate an error in the cluster state, and generating a quantum bit error cluster state; then, several quantum states conforming to the training amount size are randomly generated.
Further, based on the above method, the embodiment of the present invention further provides a quantum convolutional neural network construction system based on quantum state amplitude transformation, including: a model building module and a model training module, wherein,
the model building module is used for expanding the attribute of the convolution layer and the pooling layer to a quantum domain according to the local connectivity and the parameter sharing characteristic of the convolution layer and the pooling layer in the convolution neural network CNN to build a quantum convolution neural network consisting of a quantum convolution layer, a quantum pooling layer and a quantum full-connection layer, wherein the quantum convolution layer and the quantum pooling layer extract the structural characteristics of an input quantum state through unitary transformation of quantum bits, and the quantum full-connection layer utilizes a quantum circuit to map the structural characteristics to corresponding tag spaces;
the model training module is used for generating a quantum data set according to the state of the quantum bit cluster, training the quantum convolutional neural network by utilizing the generated quantum data set, and taking the mean square error between the model output and the label as a cost function for measuring the quantum bit in the training process to obtain an expected value.
To verify the validity of the present solution, the validity of the atqcinn model constructed in the present embodiment is evaluated by combining test data and by training efficiency and accuracy as follows:
the experiment mainly adopts TensorFlow Quantum framework developed by google. In the presence of Inter R Core TM Our experiments were performed on a PC with i7-8700 CPU (3.2 GHz) and 32GB RAM. The software environment is Python 3.6 in windows 10 system. The experimental contents are as follows: it is discriminated whether the quantum cluster state is excited.
Quantum data sets are composed of sets of correctly and incorrectly prepared cluster states on 8 qubits. First, the correct cluster state is generated by performing a CZ gate operation on adjacent qubits. Second, the error in the cluster state is simulated by rotating the qubit by an amount 0.ltoreq.θ.ltoreq.2π around the X axis of the Buloch sphere.Is considered to be excited and marked 1, otherwise-1. 400 quantum states were randomly generated for the experiment.
The scalar CNN of atqnn and google were compared. Both models are 8-qubit hierarchies, repeating 3 times quantum convolution and quantum pooling applications. In contrast, ATQCNN has one more quantum fully connected layer than Google's pure quantum CNN. The scalar CNN of Google contains 63 parameters to be trained, while the atqcinn contains only 44 parameters. Finally, the Pauli-Z expectation of the last qubit is measured using the mean square error between the model output and the tag as a cost function.
Under the same experimental conditions, the training epochs was set to 25, the batch size was set to 16, and the learning rate was 0.025. The loss function curve, test accuracy and training time of each sample in the training and testing process are shown in fig. 4, (a) the loss function curve of two models in the training and testing process; (b) is the test accuracy; (c) average training time per sample in each round of epoch.
According to the experimental result, the loss function has obvious descending trend, finally tends to be stable and converges around 0.2. The ATQCNN model has higher convergence speed in the training process, and the average convergence rate is up to 100% in the fifth epoch. The average training time of a single sample of the Google model on the analog processor is about 55ms, and the atqcinn model can be raised by about 40% to about 35ms. It is concluded that the ATQCNN model has faster convergence speed, shorter training time and no inferior accuracy. This result is for two reasons. In one aspect, the parameters of the atqcinn model are nearly one third less than the Google model. On the other hand, google's quantum wire circuit changes both the phase and amplitude of the quantum state. However, the atqnns only change the amplitude, reduce the space for exploring solution sets, improve the training efficiency, resemble the space change time, reduce the quantum cost overhead, provide possibility for the application of quantum computers in the NISQ age, and can be further researched to fully exert the quantum advantage.
The relative steps, numerical expressions and numerical values of the components and steps set forth in these embodiments do not limit the scope of the present invention unless it is specifically stated otherwise.
In the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
The elements and method steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or a combination thereof, and the elements and steps of the examples have been generally described in terms of functionality in the foregoing description to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Those of ordinary skill in the art may implement the described functionality using different methods for each particular application, but such implementation is not considered to be beyond the scope of the present invention.
Those of ordinary skill in the art will appreciate that all or a portion of the steps in the above methods may be performed by a program that instructs associated hardware, and that the program may be stored on a computer readable storage medium, such as: read-only memory, magnetic or optical disk, etc. Alternatively, all or part of the steps of the above embodiments may be implemented using one or more integrated circuits, and accordingly, each module/unit in the above embodiments may be implemented in hardware or may be implemented in a software functional module. The present invention is not limited to any specific form of combination of hardware and software.
Finally, it should be noted that: the above examples are only specific embodiments of the present invention, and are not intended to limit the scope of the present invention, but it should be understood by those skilled in the art that the present invention is not limited thereto, and that the present invention is described in detail with reference to the foregoing examples: any person skilled in the art may modify or easily conceive of the technical solution described in the foregoing embodiments, or perform equivalent substitution of some of the technical features, while remaining within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (2)
1. The quantum convolution neural network construction method based on quantum state amplitude transformation is characterized by comprising the following steps of:
according to local connectivity and parameter sharing properties of a convolution layer and a pooling layer in a convolution neural network, extending the properties of the convolution layer and the pooling layer to a quantum domain to form a quantum convolution neural network consisting of the quantum convolution layer, the quantum pooling layer and a quantum full-connection layer, wherein the quantum convolution layer and the quantum pooling layer extract structural features of an input quantum state through unitary transformation of quantum bits, and the quantum full-connection layer maps the structural features to corresponding tag spaces by utilizing quantum circuits; the full connection layer in the quantum convolution neural network acquires a quantum bit expected value by measuring the quantum bit in the corresponding quantum circuit, and maps the expected value to the classification label; quantum convolution neural network is formed by unitary transformation productTo show that, by means of the method,unitary matrices respectively representing a quantum convolution layer, a quantum pooling layer and a quantum fully-connected layer, wherein L is less than or equal to log 2 N,N=2 n ,n∈N * L represents the first layer of quantum convolution layer and pooling layer, N is the number of qubits in the model, θ represents the angle by which the qubits rotate about the Y-axis of the Buloch sphere, < >>Representing a network model output; in unitary transformation in the quantum convolution neural network, a unitary transformation operation process in the quantum convolution neural network is constructed through the additional and/or repeated operation of a single-quantum bit rotating gate and a double-quantum bit controlled NOT gate; quantum convolution layer performs unitary operation W through two quantum bits l To extract the input data features, the unitary operation is expressed as: />U ent The method comprises the steps of representing a double-qubit controlled NOT gate operation, wherein U represents a single-qubit rotating gate, n represents the number of qubits, and theta represents the rotation angle of the qubits around the Y axis of the Buloch sphere; the quantum pooling layer performs projection of characteristic multiple quantum bits to single quantum bits through unitary transformation of two quantum bits, and the unitary transformation process is expressed as: />The quantum full-connection layer adopts a function->The quantum circuit structure with the mapping effect is characterized in that x is the final output of a pooling layer of a convolution layer, b is a preset deviation value, and w is a parameter for training by adjusting a rotation angle; in the quantum full-connection layer, the quantum circuit utilizes unitary transformationTo make input/output mapping->n represents the number of qubits, CNOT represents a double-qubit controlled NOT gate;
generating a quantum data set according to the quantum bit cluster state, training a quantum convolution neural network by using the generated quantum data set, and taking the mean square error between the model output and the label as a cost function for measuring quantum bits to obtain an expected value in the training process; generating a quantum data set according to the quantum bit cluster state, firstly, executing controlled Z gate operation on adjacent quantum bits to generate a correct cluster state on the quantum bits; then, rotating the quantum bit around the X axis of the Buloch sphere to simulate an error in the cluster state, and generating a quantum bit error cluster state; then, several quantum states conforming to the training amount size are randomly generated.
2. A quantum convolutional neural network construction system based on quantum state amplitude transformation, comprising: a model building module and a model training module, wherein,
the model building module is used for expanding the attribute of the convolution layer and the pooling layer to a quantum domain according to the local connectivity and the parameter sharing characteristic of the convolution layer and the pooling layer in the convolution neural network CNN to build a quantum convolution neural network consisting of a quantum convolution layer, a quantum pooling layer and a quantum full-connection layer, wherein the quantum convolution layer and the quantum pooling layer extract the structural characteristics of an input quantum state through unitary transformation of quantum bits, and the quantum full-connection layer utilizes a quantum circuit to map the structural characteristics to corresponding tag spaces; the full connection layer in the quantum convolution neural network acquires a quantum bit expected value by measuring the quantum bit in the corresponding quantum circuit, and maps the expected value to the classification label; quantum convolution neural network is formed by unitary transformation productTo indicate (I)>Unitary matrices respectively representing a quantum convolution layer, a quantum pooling layer and a quantum fully-connected layer, wherein L is less than or equal to log 2 N,N=2 n ,n∈N * L represents the first layer of quantum convolution layer and pooling layer, N is the number of qubits in the model, θ represents the angle by which the qubits rotate about the Y-axis of the Buloch sphere, < >>Representing a network model output; in unitary transformation in the quantum convolution neural network, a unitary transformation operation process in the quantum convolution neural network is constructed through the additional and/or repeated operation of a single-quantum bit rotating gate and a double-quantum bit controlled NOT gate; the quantum convolution layer extracts the input data features through a unitary operation Wl of two quantum bits, and the unitary operation process is expressed as:U ent representation ofA double-qubit controlled NOT gate operation, wherein U represents a single-qubit rotating gate, n represents the number of qubits, and theta represents the rotation angle of the qubits around the Y axis of the Buloch sphere; the quantum pooling layer performs projection of characteristic multiple quantum bits to single quantum bits through unitary transformation of two quantum bits, and the unitary transformation process is expressed as: />The quantum full-connection layer adopts a function->The quantum circuit structure with the mapping effect is characterized in that x is the final output of a pooling layer of a convolution layer, b is a preset deviation value, and w is a parameter for training by adjusting a rotation angle; in the quantum full-connection layer, the quantum circuit utilizes unitary transformationTo make input/output mapping->n represents the number of qubits, CNOT represents a double-qubit controlled NOT gate;
the model training module is used for generating a quantum data set according to the quantum bit cluster state, training the quantum convolutional neural network by utilizing the generated quantum data set, and taking the mean square error between the model output and the label as a cost function for measuring quantum bits to obtain an expected value in the training process; generating a quantum data set according to the quantum bit cluster state, firstly, executing controlled Z gate operation on adjacent quantum bits to generate a correct cluster state on the quantum bits; then, rotating the quantum bit around the X axis of the Buloch sphere to simulate an error in the cluster state, and generating a quantum bit error cluster state; then, several quantum states conforming to the training amount size are randomly generated.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211292790.6A CN115828999B (en) | 2022-10-21 | 2022-10-21 | Quantum convolution neural network construction method and system based on quantum state amplitude transformation |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211292790.6A CN115828999B (en) | 2022-10-21 | 2022-10-21 | Quantum convolution neural network construction method and system based on quantum state amplitude transformation |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115828999A CN115828999A (en) | 2023-03-21 |
CN115828999B true CN115828999B (en) | 2023-09-19 |
Family
ID=85525177
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211292790.6A Active CN115828999B (en) | 2022-10-21 | 2022-10-21 | Quantum convolution neural network construction method and system based on quantum state amplitude transformation |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115828999B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117669753B (en) * | 2024-01-31 | 2024-04-16 | 北京航空航天大学杭州创新研究院 | Quantum model training method, multi-mode data processing method and device |
CN117710513B (en) * | 2024-02-06 | 2024-06-11 | 中国科学院深圳先进技术研究院 | Quantum convolution neural network-based magnetic resonance imaging method and device |
CN118643358A (en) * | 2024-08-15 | 2024-09-13 | 厦门工学院 | Quantum neural network clustering method and terminal based on Grover search algorithm |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110692067A (en) * | 2017-06-02 | 2020-01-14 | 谷歌有限责任公司 | Quantum neural network |
CN113361664A (en) * | 2021-08-10 | 2021-09-07 | 北京航空航天大学 | Image recognition system and method based on quantum convolution neural network |
CN113792870A (en) * | 2021-10-29 | 2021-12-14 | 广西大学 | All-optical control optical neural network system based on acousto-optic technology |
CN114821217A (en) * | 2021-06-28 | 2022-07-29 | 合肥本源量子计算科技有限责任公司 | Image identification method and device based on quantum classical hybrid neural network |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP3785186A1 (en) * | 2018-08-30 | 2021-03-03 | Google LLC | Two-qubit gates implemented with a tunable coupler |
US20220147314A1 (en) * | 2020-11-12 | 2022-05-12 | equal1.labs Inc. | System and method of quantum stochastic rounding using silicon based quantum dot arrays |
-
2022
- 2022-10-21 CN CN202211292790.6A patent/CN115828999B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110692067A (en) * | 2017-06-02 | 2020-01-14 | 谷歌有限责任公司 | Quantum neural network |
CN114821217A (en) * | 2021-06-28 | 2022-07-29 | 合肥本源量子计算科技有限责任公司 | Image identification method and device based on quantum classical hybrid neural network |
CN113361664A (en) * | 2021-08-10 | 2021-09-07 | 北京航空航天大学 | Image recognition system and method based on quantum convolution neural network |
CN113792870A (en) * | 2021-10-29 | 2021-12-14 | 广西大学 | All-optical control optical neural network system based on acousto-optic technology |
Non-Patent Citations (4)
Title |
---|
A quantum convolutional neural network on NISQ devices;ShiJie Wei等;《AAPPS Bulletin》;第1-11页 * |
Quantum convolutional neural networks;Iris Cong等;《nature physics》;第1273-1278页 * |
基于量子卷积神经网络的图像识别新模型;范兴奎等;《电子科技大学学报》;第51卷(第5期);第641-650页 * |
量子线性卷积及其在图像处理中的应用;刘兴奥等;《自动化学报》;第48卷(第6期);第1504-1519页 * |
Also Published As
Publication number | Publication date |
---|---|
CN115828999A (en) | 2023-03-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN115828999B (en) | Quantum convolution neural network construction method and system based on quantum state amplitude transformation | |
Huang et al. | Gamepad: A learning environment for theorem proving | |
WO2022022173A1 (en) | Drug molecular property determining method and device, and storage medium | |
CN114219076B (en) | Quantum neural network training method and device, electronic equipment and medium | |
US11625614B2 (en) | Small-world nets for fast neural network training and execution | |
US20140264288A1 (en) | Method and system that implement a v-gate quantum circuit | |
WO2024032096A1 (en) | Reactant molecule prediction method and apparatus, training method and apparatus, and electronic device | |
CN114072817A (en) | Quantum circuit optimization method and system | |
US20180365594A1 (en) | Systems and methods for generative learning | |
Zhao et al. | A review of quantum neural networks: methods, models, dilemma | |
Wang et al. | Exploring graph capsual network for graph classification | |
CN111259157A (en) | Chinese text classification method based on hybrid bidirectional circulation capsule network model | |
CN118451423A (en) | Optimal knowledge distillation scheme | |
CN116741307A (en) | Three-dimensional molecular structure simulation method for synthesis and screening of lead compounds | |
Altares-López et al. | AutoQML: Automatic generation and training of robust quantum-inspired classifiers by using evolutionary algorithms on grayscale images | |
Schalkers et al. | Efficient and fail-safe quantum algorithm for the transport equation | |
CN114511092B (en) | Graph attention machine mechanism implementation method based on quantum circuit | |
CN112819151A (en) | Method and apparatus for recognizing image and training method | |
CN114550849A (en) | Method for solving chemical molecular property prediction based on quantum graph neural network | |
CN114446412A (en) | Molecular generation method and device based on quantum gate control recurrent neural network | |
CN115700614B (en) | Quantum generator, control method and quantum generation countermeasure network | |
CN117634623A (en) | Model training method, device, equipment and medium for quantum state generation | |
CN115115920B (en) | Graph data self-supervision training method and device | |
CN116776996A (en) | Method, device, storage medium and equipment for solving quantization of combined optimization problem | |
Saju et al. | Analysis on Role of Quantum Computing in Machine Learning |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP03 | Change of name, title or address |
Address after: 450000 Science Avenue 62, Zhengzhou High-tech Zone, Henan Province Patentee after: Information Engineering University of the Chinese People's Liberation Army Cyberspace Force Country or region after: China Address before: No. 62 Science Avenue, High tech Zone, Zhengzhou City, Henan Province Patentee before: Information Engineering University of Strategic Support Force,PLA Country or region before: China |