Diamond type identification method based on quantum network
By employing a quantum network-based diamond type identification method, which utilizes orthogonal coding and a quantum neural network model, the problem of time-consuming and subjective traditional diamond classification is solved, achieving efficient and accurate diamond type identification.
Patent Information
- Application Number
- CN202510963874.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-14
- Publication Date
- 2025-11-18
AI Technical Summary
Traditional diamond classification methods are time-consuming and highly subjective, relying on manual identification. Machine learning models perform poorly on small sample datasets, require a large amount of computing resources, and are difficult to identify diamond types efficiently and accurately.
A quantum network-based diamond type identification method is adopted. By acquiring basic information about the diamond to generate feature data, orthogonal encoding is used to convert it into a quantum state, and a quantum neural network model with a multi-layer entangled structure of G and CZ quantum gates is used for learning to determine the diamond type.
It improves the accuracy and reliability of diamond type identification, enabling more efficient and precise diamond identification while reducing reliance on computing resources.
Smart Images

Figure CN120974255A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of diamond type identification technology, and in particular to a diamond type identification method based on quantum networks. Background Technology
[0002] With the development of the jewelry industry, the demand for diamond classification is increasing. Traditional diamond classification mainly relies on manual identification, evaluating characteristics such as cut, color, and clarity through observation and experience. However, this method is not only time-consuming but also highly subjective, easily influenced by the experience and visual judgment of the appraiser.
[0003] In recent years, machine learning and deep learning technologies have made significant progress in image recognition and classification. Traditional neural networks have been used to classify the features of this diamond, but they still have certain limitations when dealing with complex nonlinear features, especially performing poorly on small sample datasets. Furthermore, these models typically require large amounts of training data and computational resources to achieve high accuracy.
[0004] Traditional machine learning methods, such as Support Vector Machines (SVMs) and decision trees, as well as deep learning models like Convolutional Neural Networks (CNNs), while performing well in handling large datasets and learning complex patterns, typically require a large amount of labeled data for training, especially in classification tasks with complex features. On small datasets, these models are prone to overfitting or underfitting. Furthermore, due to the complexity of the task, training requires high-performance computing resources (such as GPUs), which may not be economical or feasible in some application scenarios. Summary of the Invention
[0005] The technical problem to be solved by this invention is to address the shortcomings of existing technologies, specifically by providing a diamond type identification method based on quantum networks, as detailed below:
[0006] 1) In a first aspect, the present invention provides a diamond type identification method based on quantum networks, the specific technical solution of which is as follows:
[0007] The basic information of the diamond to be identified is obtained, and diamond feature data is generated based on the basic information, including carat value, color, depth, size, and clarity.
[0008] The quantum states obtained after processing diamond feature data based on orthogonal coding are used as input data for the quantum neural network model.
[0009] The quantum state is learned by a pre-constructed quantum neural network model based on a multi-layer entangled structure with G and CZ quantum gates, and the prediction result of the diamond to be identified is determined.
[0010] The beneficial effects of the diamond type identification method based on quantum networks provided by this invention are as follows:
[0011] By acquiring basic information such as carat weight, color, depth, size, and clarity of the diamond to be identified, and generating diamond feature data based on this information, the key characteristics of the diamond can be comprehensively and accurately characterized, providing rich and accurate input for subsequent identification and ensuring that the identification process has sufficient basis. Secondly, by using orthogonal encoding to process the diamond feature data, complex feature data can be transformed into quantum states. This encoding method can effectively utilize the advantages of quantum computing, such as quantum superposition and quantum entanglement, thereby achieving higher efficiency and stronger computing power when processing data, providing high-quality data forms for the input of quantum networks. Furthermore, using the quantum states obtained through orthogonal encoding as input data for quantum neural network models can fully leverage the natural advantages of quantum networks in processing quantum state data. Quantum networks can better mine the potential patterns and regularities in the data, thereby more accurately determining the predicted results of the diamond to be identified. Compared with traditional methods, this can significantly improve the accuracy and reliability of identification, helping to achieve more efficient and accurate identification results in fields such as diamond identification, and providing strong technical support for related industries.
[0012] Based on the above solution, the present invention can be further improved as follows.
[0013] Furthermore, the process of generating diamond feature data based on basic information is as follows:
[0014] Feature transformation is performed on the non-numerical data in the basic information to obtain the numerical features corresponding to each non-numerical data.
[0015] The numerical features corresponding to the numerical and non-numerical data in the basic information are standardized to obtain diamond feature data.
[0016] Furthermore, the process of determining a quantum state is as follows:
[0017] By combining orthogonal encoding, the quantum state is obtained by processing diamond feature data through rotating quantum gates. The orthogonal encoding method contains 9 pre-set qubits.
[0018] Furthermore, the quantum neural network model is specifically as follows:
[0019] By measuring nine qubits using a pre-constructed quantum circuit, a 512-dimensional computational ground state was obtained.
[0020] The predicted information corresponding to the computational ground state is obtained by processing the computational ground state through a fully connected layer.
[0021] Furthermore, the cross-entropy loss function of the quantum neural network model is:
[0022]
[0023] Where i represents the i-th diamond sample in batch M, H i (p||q) is the cross-entropy loss function between the quantum model output predicted information value and its true label for the i-th sample.
[0024] 2) In a second aspect, the present invention also provides a diamond type identification system based on quantum networks, the specific technical solution of which is as follows:
[0025] The acquisition unit is used to: acquire basic information about the diamond to be identified, and generate diamond feature data based on the basic information, including: carat value, color, depth, size, and clarity;
[0026] The input unit is used to: take the quantum state obtained after processing the diamond feature data based on the orthogonal coding method as the input data of the quantum neural network model;
[0027] The identification unit is used to: learn the quantum state through a pre-constructed quantum neural network model based on a multi-layer entangled structure of G and CZ quantum gates, and determine the prediction result of the diamond to be identified.
[0028] 3) In a third aspect, the present invention also provides an electronic device, the electronic device including a processor coupled to a memory, the memory storing at least one computer program, the at least one computer program being loaded and executed by the processor to enable the electronic device to perform any of the methods described above.
[0029] 4) In a fourth aspect, the present invention also provides a computer-readable storage medium storing at least one computer program, which is loaded and executed by a processor to enable a computer to implement any of the above methods.
[0030] It should be noted that the beneficial effects of the technical solutions of the second to fourth aspects of the present invention and their corresponding possible implementations can be found in the above description of the technical effects of the first aspect and its corresponding possible implementations, and will not be repeated here. Attached Figure Description
[0031] Other features, objects, and advantages of the invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:
[0032] Figure 1 This is a schematic flowchart of a diamond type identification method based on quantum networks according to an embodiment of the present invention;
[0033] Figure 2 This is a schematic diagram of a quantum state encoding circuit for a diamond type identification method based on a quantum network according to an embodiment of the present invention.
[0034] Figure 3 This is a schematic diagram of the quantum circuit structure of a diamond type identification method based on a quantum network according to an embodiment of the present invention.
[0035] Figure 4 This is a schematic diagram of the quantum circuit structure G in a quantum network-based diamond type identification method according to an embodiment of the present invention.
[0036] Figure 5 This is a structural framework diagram of an electronic device according to the present invention. Detailed Implementation
[0037] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.
[0038] like Figure 1 As shown in the figure, a diamond type identification method based on quantum networks according to an embodiment of the present invention includes the following steps:
[0039] S1. Obtain the basic information of the diamond to be identified and generate diamond feature data based on the basic information. The basic information includes: carat value, color, depth, size and clarity.
[0040] S2, the quantum state obtained after processing diamond feature data based on orthogonal coding method is used as the input data of quantum neural network model;
[0041] S3, the quantum state is learned by a pre-constructed quantum neural network model based on a multi-layer entangled structure of G and CZ quantum gates, and the prediction result of the diamond to be identified is determined.
[0042] The beneficial effects of the diamond type identification method based on quantum networks provided by this invention are as follows:
[0043] By acquiring basic information such as carat weight, color, depth, size, and clarity of the diamond to be identified, and generating diamond feature data based on this information, the key characteristics of the diamond can be comprehensively and accurately characterized, providing rich and accurate input for subsequent identification and ensuring that the identification process has sufficient basis. Secondly, by using orthogonal encoding to process the diamond feature data, complex feature data can be transformed into quantum states. This encoding method can effectively utilize the advantages of quantum computing, such as quantum superposition and quantum entanglement, thereby achieving higher efficiency and stronger computing power when processing data, providing high-quality data forms for the input of quantum networks. Furthermore, using the quantum states obtained through orthogonal encoding as input data for quantum neural network models can fully leverage the natural advantages of quantum networks in processing quantum state data. Quantum networks can better mine the potential patterns and regularities in the data, thereby more accurately determining the predicted results of the diamond to be identified. Compared with traditional methods, this can significantly improve the accuracy and reliability of identification, helping to achieve more efficient and accurate identification results in fields such as diamond identification, and providing strong technical support for related industries.
[0044] It should be noted that the quantum network mentioned in this application is a quantum neural network model.
[0045] Carat weight, color, depth, size, and clarity are the key elements of the 4Cs of diamonds, which together determine a diamond's value and quality. Below is a detailed explanation of these terms:
[0046] 1. Carat value
[0047] A carat is a unit of measurement for the weight of a diamond; 1 carat equals 0.2 grams (200 milligrams). The carat value is one of the important factors in the value of a diamond; the larger the weight, the higher the value.
[0048] 2. Color
[0049] The color of a diamond refers to its color grade, ranging from colorless to light yellow or light brown. The ideal diamond color is colorless because colorless diamonds reflect light better and exhibit more fire and brilliance.
[0050] Diamond color is typically graded using the GIA (Gemological Institute of America) color grading system, ranging from D (colorless) to Z (light yellow or light brown). D is the highest grade, representing the purest color, while Z is the darkest.
[0051] 3. Depth
[0052] Depth refers to the ratio of a diamond's height to its diameter, usually expressed as a percentage. It is one of the important parameters for measuring the quality of a diamond's cut.
[0053] 4. Size
[0054] Size typically refers to the external dimensions of a diamond, including its diameter and height. It is closely related to carat weight, but not entirely equivalent. For example, two diamonds with the same carat weight may have different external sizes due to differences in cut proportions.
[0055] 5. Clarity
[0056] Clarity refers to the degree of imperfections within and on the surface of a diamond. These imperfections include inclusions (internal flaws) and surface features (external flaws).
[0057] GIA classifies diamond clarity into several grades, from FL (Flawless) to I3 (Importantly Included). FL diamonds have no internal or surface flaws, while I3 diamonds have very noticeable flaws that are visible to the naked eye.
[0058] Furthermore, the process of generating diamond feature data based on basic information is as follows:
[0059] Feature transformation is performed on the non-numerical data in the basic information to obtain the numerical features corresponding to each non-numerical data.
[0060] The numerical features corresponding to the numerical and non-numerical data in the basic information are standardized to obtain diamond feature data.
[0061] In another embodiment of this scheme, the basic information is processed by a preprocessing module in the quantum network, wherein the training process of the preprocessing module includes:
[0062] Download the diamonds dataset, which contains data on over 53,940 diamond samples. This dataset includes information such as carat weight, color, depth, size, and clarity. Since color and clarity are non-numerical features, the seven colors are represented by numbers 0-6, and the nine clarity types by numbers 1-9. The mapped data is then standardized for each feature to obtain the sample diamond feature data, which is then adapted for the subsequent quantum state encoding module. Diamond cut grades exist in multiple categories, such as Ideal, Premium, Very Good, Good, and Fair. Cut grades are used for subsequent category classification.
[0063] In this embodiment, the diamond cut grades are divided into two categories: high-quality category (including Ideal and Premium) and general-quality category (including Good, Very Good, and Fair), labeled 0 and 1 respectively. The dataset is then divided into training and test sets in a 9:1 ratio.
[0064] The preprocessing module is trained based on the training and test sets mentioned above.
[0065] It should be further explained that the standardization process includes:
[0066] For each feature in the dataset (e.g., carat value, color, depth, etc.), the mean (μ) and standard deviation (σ) of that feature are first calculated. Each feature value is then standardized using the mean and standard deviation, transforming the original feature value xi into a standardized value zi. In this way, each feature value is converted into a distribution centered at 0 with a standard deviation of 1. This standardization method is called Z-score standardization.
[0067] Furthermore, the process of determining a quantum state is as follows:
[0068] By combining orthogonal encoding, the quantum state is obtained by processing diamond feature data through rotating quantum gates. The orthogonal encoding method contains 9 pre-set qubits.
[0069] In another embodiment of this scheme, the 9-dimensional feature data corresponding to each diamond to be identified after processing by the preprocessing module is as follows:
[0070]
[0071] Taking the inverse spin of each element to obtain the rotation angle of the quantum gate is shown in the following equation.
[0072] θ i =arcsin(x) i )
[0073] Here θ i Corresponding to 9-dimensional feature data The i-th feature in.
[0074] Then, orthogonal encoding is used through R. x (θ) and R y (θ) Rotating quantum gates load diamond feature data into quantum states.
[0075] It should be further explained that the preprocessing module converts and standardizes the carat value, color, depth, size, and clarity of any diamond to be identified to obtain diamond feature data. The diamond feature data includes 9 items, namely: 1. price in US dollars ($326--$18,823).
[0076] 2.carat weight of the diamond(0.2--5.01);
[0077] 3.color diamond colour,from J(worst)to D(best);
[0078] 4.clarity a measurement of how clear the diamond is(I1(worst),SI2,SI1,VS2,VS1,VVS2,VVS1,IF(best));
[0079] 5.x length in mm (0-10.74);
[0080] 6.y width in mm (0--58.9);
[0081] 7.z depth in mm (0-31.8);
[0082] 8.depth total depth percentage=z / mean(x,y)=2*z / (x+y)(43--79);
[0083] 9. table width of top of diamond relative to widest point (43--95).
[0084] The corresponding explanation is:
[0085] Price: In US dollars ($326 to $18,823).
[0086] Carat weight: The weight of a diamond (from 0.2 carats to 5.01 carats).
[0087] Color: The color of diamonds, ranging from J (worst) to D (best).
[0088] Clarity: A measure of a diamond's transparency (I1 (worst), SI2, SI1, VS2, VS1, VVS2, VVS1, IF (best)).
[0089] x: Length (mm) (0 to 10.74 mm).
[0090] y: Width (mm) (0 to 58.9 mm).
[0091] z: Depth (mm) (0 to 31.8 mm).
[0092] Depth percentage: Total depth percentage = z / (average of x and y) = 2*z / (x+y) (43% to 79%).
[0093] Table: The relative proportion of the width of the top of the diamond to its widest point (43% to 95%).
[0094] Furthermore, taking the arcsine of the principal element refers to calculating the arcsine function for each eigenvalue to obtain the quantum gate rotation angle used for quantum state encoding.
[0095] Furthermore, the quantum neural network model is specifically as follows:
[0096] By measuring nine qubits using a pre-constructed quantum circuit, a 512-dimensional computational ground state was obtained.
[0097] The predicted information corresponding to the computational ground state is obtained by processing the computational ground state through a fully connected layer.
[0098] In another embodiment of this scheme, the specific quantum circuit is as follows: Figure 2 As shown. Constructing a quantum network circuit module:
[0099] After encoding diamond feature information into quantum states using 9 qubits, a rotating quantum gate R supported by a quantum computer is used. x (θ)R y (θ)R z (θ) and two-qubit quantum gates CZ and CNOT are used to process the quantum state, and the matrix form is shown in the following equation:
[0100]
[0101] Based on the above quantum operations and considering the characteristics and conditions of diamond feature information (such as shape, price, etc.), the quantum circuit structure of the quantum network is constructed as follows: Figure 3 As shown in the figure, the quantum circuit within the dashed box can be repeated multiple times as needed for learning purposes; here, it is chosen to be repeated 3 times.
[0102] The two black controlled quantum gates in the diagram, acting on two qubits, are CZ quantum gates. G is a single-qubit unitary gate composed of H and RX quantum gates. Its specific structure is as follows: Figure 4 As shown, H is a fundamental operation in quantum computing, short for Hadamard.
[0103] It should be noted that the parameters in the RX quantum gate are adjustable. After constructing the quantum circuit of the quantum network, the... Figure 3 All nine qubits in the quantum network were measured to obtain the 512-dimensional computational ground state of the quantum circuit after quantum state manipulation. This computational ground state was then input into a single-layer fully connected neural network for learning, outputting the quantum network model's predictions about the features of this diamond sample. The nodes of this single-layer fully connected neural network were set to [512, 2], meaning the input was 512-dimensional and the output was 2-dimensional.
[0104] It should be noted that the computational ground state refers to a specific state of a qubit. These states are standard states commonly used in quantum computing that are easy to measure and manipulate. The computational ground state typically refers to the two fundamental states of a qubit, |0> and |1>, and their tensor product form.
[0105] Furthermore, the cross-entropy loss function of the quantum neural network model is:
[0106]
[0107] Where i represents the i-th diamond sample in batch M, H i (p||q) is the cross-entropy loss function between the quantum model output predicted information value and its true label for the i-th sample.
[0108] In another embodiment of this scheme, the diamond feature data in each batch M is... The data is input into the quantum circuit of the quantum network built in the previous module. Each diamond sample in batch M will obtain a corresponding predicted information value p. Then, the predicted information value p of each sample is compared with the corresponding real label q of the input sample to perform cross-entropy loss, and the average is calculated over batch M, as shown in the following formula, which serves as the cross-entropy loss function for training the entire quantum network model.
[0109]
[0110] Where i represents the i-th diamond sample in batch M, H i (p||q) is the cross-entropy loss function between the predicted information value of the quantum model output and its true label for the i-th sample. Then, based on the cross-entropy loss function, the parameters of the quantum network model can be updated, thus training the quantum network model. For this task, the Rprop optimizer is used with a learning rate set to 1e-2. Based on the training set, this optimizer and the constructed loss function are used to continuously train the quantum network model we constructed until convergence.
[0111] Furthermore, the features of all diamond samples in the measurement set are input into the quantum network model trained using the loss function module described above to obtain the predicted information value of the quantum network model. This predicted information value is then compared with its true label to obtain the test accuracy of the quantum network model. Finally, the trained quantum network model can be used to perform diamond type identification tasks on real industry data.
[0112] In the above embodiments, although the steps are numbered S1, S2, etc., they are only specific embodiments given by the present invention. Those skilled in the art can adjust the execution order of S1, S2, etc. according to the actual situation, which is also within the protection scope of the present invention. It can be understood that in some embodiments, some or all of the above embodiments may be included.
[0113] This invention also provides a diamond type identification system based on quantum networks, the specific technical solution of which is as follows:
[0114] The acquisition unit is used to: acquire basic information about the diamond to be identified, and generate diamond feature data based on the basic information, including: carat value, color, depth, size, and clarity;
[0115] The input unit is used to: take the quantum state obtained after processing the diamond feature data based on the orthogonal coding method as the input data of the quantum neural network model;
[0116] The identification unit is used to: learn the quantum state through a pre-constructed quantum neural network model based on a multi-layer entangled structure of G and CZ quantum gates, and determine the prediction result of the diamond to be identified.
[0117] Furthermore, the process of generating diamond feature data based on basic information is as follows:
[0118] Feature transformation is performed on the non-numerical data in the basic information to obtain the numerical features corresponding to each non-numerical data.
[0119] The numerical features corresponding to the numerical and non-numerical data in the basic information are standardized to obtain diamond feature data.
[0120] Furthermore, the process of determining a quantum state is as follows:
[0121] By combining orthogonal encoding, the quantum state is obtained by processing diamond feature data through rotating quantum gates. The orthogonal encoding method contains 9 pre-set qubits.
[0122] Furthermore, the quantum neural network model is specifically as follows:
[0123] By measuring nine qubits using a pre-constructed quantum circuit, a 512-dimensional computational ground state was obtained.
[0124] The predicted information corresponding to the computational ground state is obtained by processing the computational ground state through a fully connected layer.
[0125] Furthermore, the cross-entropy loss function of the quantum neural network model is:
[0126]
[0127] Where i represents the i-th diamond sample in batch M, H i (p||q) is the cross-entropy loss function between the quantum model output predicted information value and its true label for the i-th sample.
[0128] It should be noted that the beneficial effects of the quantum network-based diamond type identification system provided in the above embodiments are the same as those of the quantum network-based diamond type identification method described above, and will not be repeated here. Furthermore, the system provided in the above embodiments is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the system can be divided into different functional modules according to the actual situation to complete all or part of the functions described above. In addition, the system and method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process is detailed in the method embodiments, and will not be repeated here.
[0129] like Figure 5 As shown, an electronic device 300 according to an embodiment of the present invention includes a processor 320 coupled to a memory 310. The memory 310 stores at least one computer program 330, which is loaded and executed by the processor 320 to enable the electronic device 300 to implement any of the above-mentioned methods. Specifically:
[0130] The electronic device 300 can vary considerably due to differences in configuration or performance. It may include one or more processors 320 (Central Processing Units, CPUs) and one or more memories 310. The memories 310 store at least one computer program 330, which is loaded and executed by the processors 320 to enable the electronic device 300 to implement the quantum network-based diamond type identification method provided in the above embodiments. Of course, the electronic device 300 may also have wired or wireless network interfaces, a keyboard, and input / output interfaces for input and output. It may also include other components for implementing device functions, which will not be elaborated upon here.
[0131] An embodiment of the present invention provides a computer-readable storage medium storing at least one computer program, which is loaded and executed by a processor to enable a computer to implement any of the above-described methods.
[0132] Alternatively, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, a floppy disk, and an optical data storage device, etc.
[0133] In an exemplary embodiment, a computer program product or computer program is also provided, which includes computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform any of the methods described above.
[0134] It should be noted that the terms "first" and "second" in the specification and claims of this application are used to distinguish similar objects and represent a limitation on a specific order or sequence. Where appropriate, the order of use for similar objects can be interchanged so that the embodiments of this application described herein can be implemented in an order other than that shown or described.
[0135] Those skilled in the art will recognize that this invention can be implemented as a system, method, or computer program product. Therefore, this disclosure can be specifically implemented in the following forms: it can be entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software, generally referred to herein as a "circuit," "module," or "system." Furthermore, in some embodiments, this invention can also be implemented as a computer program product in one or more computer-readable media containing computer-readable program code.
[0136] Any combination of one or more computer-readable media may be used. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device.
[0137] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A diamond type identification method based on quantum networks, characterized in that, include: The basic information of the diamond to be identified is obtained, and diamond feature data is generated based on the basic information, which includes: carat value, color, depth, size, and clarity. The quantum states obtained after processing the diamond feature data based on orthogonal coding are used as input data for the quantum neural network model. The quantum state is learned by a pre-constructed quantum neural network model based on a multi-layer entangled structure with G and CZ quantum gates, and the prediction result of the diamond to be identified is determined.
2. The diamond type identification method based on quantum networks according to claim 1, characterized in that, The process of generating diamond feature data based on the aforementioned basic information is as follows: The non-numerical data in the basic information are subjected to feature transformation processing to obtain the numerical features corresponding to each non-numerical data. The numerical features corresponding to the numerical and non-numerical data in the basic information are standardized to obtain diamond feature data.
3. The diamond type identification method based on quantum networks according to claim 1, characterized in that, The process of determining the quantum state is as follows: By combining orthogonal encoding, the diamond feature data is processed through rotating quantum gates to obtain quantum states. The orthogonal encoding method contains 9 pre-set qubits.
4. The diamond type identification method based on quantum networks according to claim 3, characterized in that, The quantum neural network model is specifically as follows: The nine qubits were measured using a pre-constructed quantum circuit to obtain a 512-dimensional computational ground state. The prediction information corresponding to the computational ground state is obtained by processing the computational ground state through a fully connected layer.
5. The diamond type identification method based on quantum networks according to claim 1, characterized in that, The cross-entropy loss function of the quantum neural network model is: Where i represents the i-th diamond sample in batch M, H i (p||q) is the cross-entropy loss function between the quantum model output predicted information value and its true label for the i-th sample.
6. A diamond type identification system based on quantum networks, characterized in that, include: The acquisition unit is used to: acquire basic information about the diamond to be identified, and generate diamond feature data based on the basic information, including: carat value, color, depth, size, and clarity; The input unit is used to: take the quantum state obtained after processing the diamond feature data based on the orthogonal coding method as the input data of the quantum neural network model; The identification unit is used to: learn the quantum state through a pre-constructed quantum neural network model based on a multi-layer entangled structure of G and CZ quantum gates, and determine the prediction result of the diamond to be identified.
7. A diamond type identification system based on quantum networks according to claim 6, characterized in that, The process of generating diamond feature data based on the aforementioned basic information is as follows: The non-numerical data in the basic information are subjected to feature transformation processing to obtain the numerical features corresponding to each non-numerical data. The numerical features corresponding to the numerical and non-numerical data in the basic information are standardized to obtain diamond feature data.
8. A diamond type identification system based on quantum networks according to claim 6, characterized in that, The process of determining the quantum state is as follows: By combining orthogonal encoding, the diamond feature data is processed through rotating quantum gates to obtain quantum states. The orthogonal encoding method contains 9 pre-set qubits.
9. An electronic device, characterized in that, The electronic device includes a processor coupled to a memory storing at least one computer program, which is loaded and executed by the processor to enable the electronic device to perform the method as described in any one of claims 1 to 5.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one computer program, which is loaded and executed by a processor to enable the computer to perform the method as described in any one of claims 1 to 5.