Abstract
Quantum entanglement is one of the essential resources involved in quantum information processing tasks. However, its detection for usage remains a challenge. The Bell-type inequality for relative entropy of coherence serves as an entanglement witness for pure entangled states. However, it does not perform reliably for mixed entangled states. This paper constructs a classifier by employing the relationship between coherence and entanglement for supervised machine learning methods. This method encodes multiple Bell-type inequalities for the relative entropy of coherence into an artificial neural network to detect the entangled and separable states in a quantum dataset.
Similar content being viewed by others
Introduction
There has been considerable advancement in the emerging quantum information technologies that offer many promising applications in communication and computation. Similarly, significant progress has also been achieved in the inter-disciplinary field of quantum information and machine learning1. There are two sides to this particular field of study. The first is using quantum information to improve classical machine learning algorithms. In contrast, the second corresponds to the use of classical machine learning algorithms to find innovative solutions to various challenges in quantum information science. Some of the methods that have already been proposed and implemented include techniques to solve the problem of quantum state preparation2, tomography3, quantum control4, and experiment searching5. Furthermore, research in quantum information for machine learning has also been investigated; some of which include entanglement for feature extraction6 and tensor network quantum states for supervised learning7.
Quantum entanglement, a peculiar property in quantum mechanics, enables us to achieve tasks impossible for classical systems. These tasks include ensuring secure communications and the speed-up of various hard computational tasks8. Therefore, an important question arises; “Given an unknown quantum state, how can we efficiently detect the presence of such a feature?” For high dimensional quantum systems, this is indeed a challenging task since quantum features usually indicate some correlated patterns concealed within sub-systems9,10,11. Typically, the most robust methods to detect entanglement involve full quantum state tomography. However, this method is experimentally demanding as the number of required projections increases with the number of qubits12,13,14. Entanglement can also be detected reliably through the positive partial transpose (PPT) criterion for lower-dimensional systems, that include the \(2 \otimes 2 \) and \( 2\otimes 3 \) systems, but it is generically an NP-hard problem15.
Moreover, the aforementioned criteria fails to work for higher-dimensional quantum states, such as bound entangled states. In addition, other measures for the detection and quantification of entanglement have been presented, such as the covariance matrix criterion and the concurrence criterion. However, these also come along with their set of limitations16,17,18,19.
To find the solution to this problem, many researchers have turned to machine learning techniques capable of extracting features and recognizing patterns hidden in large-dimensional datasets. Several methods have been devised and tested for the problem of entanglement detection20,21,22,23,24. As performing full quantum state tomography becomes resource-consuming with the increase in the number of qubits, the concept of building classifiers using partial information of quantum states has been widely studied. For instance, training Bell inequalities as entanglement witnesses with artificial neural networks provide a suitable classifier25. The extended version of Bell’s inequality, i.e., Mermin’s inequality, also provides favorable results for the case of tripartite quantum states and bound entangled states26,27. Deep quantum neural network techniques have also been demonstrated to detect entanglement in high-dimensional quantum states28.
In addition, other machine learning techniques such as support vector machines and decision trees can also serve the purpose of building an entanglement-separability classifier29. Comparative studies between artificial neural networks and witness-based methods for classifying quantum states have demonstrated that artificial neural networks perform significantly better than witness-based methods30. Unsupervised learning techniques have also been studied for quantum state classification along with supervised learning. These techniques have also successfully detected entanglement in a multipartite quantum dataset31.
Another property of a quantum state, a basis dependant quantity, coherence, is identified by the presence of the off-diagonal terms in the density matrix representation of a quantum state. Many coherence measures have been proposed to quantify the coherence in a given state. These include the \(l_1\) norm of coherence and relative entropy of coherence32. The relationship between the two properties, entanglement, and coherence, has also been discussed33. Inequality based on Bell’s inequality and the relative entropy of coherence has also been proposed34,35. These studies show that coherence and entanglement have some intricate relationships between them for different classes of quantum states.
This work investigates the classification of quantum states by designing a classifier using an artificial neural network. We extract features from the quantum states using the terms of the Bell-type inequality for relative entropy of coherence. The Bell-type inequality of the relative entropy of coherence shows the relation between coherence and entanglement of quantum states, so the classifier encodes both properties for reliable detection of entanglement and classification of quantum states. Moreover, as we use partial information of a quantum state as a feature set, quantum state tomography is not required. Since a single entanglement witness cannot operate on several states, we encode multiple Bell-type inequalities for relative entropy of coherence into the artificial neural network classifier for the reliable classification of quantum states. Our idea is to provide our classifier with a large amount of sample data with their corresponding labels and then test the classifier to predict the label of new states that it has not encountered before. Furthermore, we demonstrate the significant increase in accuracy and capability of a neural network-based entanglement-separability classifier by invoking a hidden layer. The approach discussed in the paper for quantum entanglement detection is shown in the Fig. 1.
The paper is organized as follows. We explain the model and methods used in the paper, such as the Bell-type inequality for relative entropy of coherence, data generation, model training, and testing. Furthermore, we explain the results obtained by the experiment. Finally, we conclude the paper.
Methods
This section introduces a method of coherence-based entanglement detection with an artificial neural network. Typically, entanglement detection methods require partial information about the underlying quantum states. Herein, we obtain partial information about quantum states using relative entropy of coherence and Bell’s inequality. Then, we use this information to construct a classifier that reliably predicts unknown quantum states as either entangled or separable. Thus, the classifier employs the coherence properties of unknown quantum states to predict its entanglement properties.
Optimizing Bell-type inequality for relative entropy of coherence with machine learning
An arbitrary quantum state \(\rho \) consisting of n qubits is fully separable if we can express it as a convex combination of product states as
where \(0 \le p_i \le 1 \) and \(\sum _i p_i = 1\), otherwise the quantum state is entangled. Now, we consider the following basis
where,
For these observables, we calculate the relative entropy of coherence given as \( C_r(QS,\rho _{\mathrm{AB}}),\; C_r(RS,\rho _{\mathrm{AB}}),\;C_r(RT,\rho _{\mathrm{AB}}), \) and \( C_r(QT,\rho _{\mathrm{AB}}) \). Since coherence is a basis dependent quantity, we specify the basis we have chosen. In other words, we denote \(C_r(QS,\rho _{\mathrm{AB}})\) by \(C_r(\rho _{\mathrm{AB}})\) in the reference basis formed by Q and S. Herein, the measure of coherence based on relative entropy for a quantum state \(\rho \) with reference basis \(\{\left| i\right\rangle \}\) is defined as32
where we have \(\Gamma \) as the set of all incoherent states in the reference basis \(\{\left| i\right\rangle \}\). The relative entropy between \(\rho \) and \(\sigma \) is described as \(S(\rho || \sigma ) = \mathrm{tr} \rho (\log { \rho }- \log {\sigma }) \) while the von-Neumann entropy of \(\rho \) is \(S(\rho ) = - \mathrm{tr} \rho \log { \rho }\) . The diagonal state of \(\rho \) is \(\rho ^d\), that can be expressed as \(\rho ^d = \sum _i{\left\langle i\right| \rho \left| i\right\rangle \left| i\right\rangle \left\langle i\right| } \).
The Bell-type inequality is formulated for relative entropy of coherence as34
This inequality is generally satisfied for separable states and violated for entangled states, for the considered set of observables. However, many cases exist where quantum states do not violate the inequality even though it is entangled34. Therefore, for the above inequality to perform as a classifier, we introduce weight factors on each of the terms and obtain the following weighted equation for the relative entropy of coherence
where the weights \(w_0, w_1, w_2, w_3,\) and \(w_4\) are obtained by training the machine learning models, namely, artificial neural networks. For a given quantum state, the set of the following outcomes
is taken as the features of the supervised machine learning model. Since we focus on bipartite systems, the labels are obtained via the PPT criterion15. We observe that the performance relies heavily on the testing data, and the primary source of error arises from the data near the boundary between the separable and the entangled states.
Generating labeled quantum datasets
This section describes different procedures used to generate quantum data. For the first procedure, we generate 50, 000 quantum states by using random values of \(\theta \) and \(\phi \) in the following
where \(\left| \psi _{\theta ,\phi }\right\rangle \) is given as follows
We also generate 50, 000 quantum states of the following family and use (5) to introduce noise
For the second procedure, 50, 000 entangled states are generated by random density matrices, whereas 50, 000 separable states are generated by taking the product of two separately generated random density matrices. In another procedure, 50, 000 pure quantum states are generated and are mixed by an arbitrary noise factor according to (5), where \(\left| \psi _{\theta ,\phi }\right\rangle \) denotes the pure state. In addition to the above procedures, we generate 50, 000 samples of each of Bell states \(\left| \psi _{+}\right\rangle \) and \(\left| \phi _{+}\right\rangle \) affected by a random noise factor of p as in (5) where \(\left| \psi _{\theta ,\phi }\right\rangle \) refer to the Bell states in (8) and (9), respectively.
In this way, we consider many quantum state families while building the classifier, therefore working towards a more general solution. The total size of the generated data consists of 350, 000 samples. The quantum states in all the methods mentioned above are generated using the functions of the QETLAB package used in MATLAB to explore the theory of quantum entanglement36,37.
We can detect the state as entangled or separable for a bipartite state using the PPT criterion15. Therefore, we define \(\rho ^{T_B}_{\theta ,\phi }\) as the matrix obtained by taking the partial transpose of \(\rho _{\theta ,\phi }\) in the second qubit. The label of a quantum state is taken as 1, i.e., entangled, if the smallest eigenvalue of the density matrix \(\rho ^{T_B}_{\theta ,\phi }\) comes out to be negative. Otherwise, it is taken as 0, i.e., separable.
For the generated dataset, the labels are obtained by using the PPT criterion function available in the QETLAB package, which automatically calculates the partial transpose and computes the minimum eigenvalue to determine whether the quantum state in question is entangled or separable36,37. Furthermore, we extract the required features given by the relative entropy of coherence, as discussed before. We use this dataset to build the most suitable classifier by training our machine learning model.
Training the artificial neural network
We utilize the artificial neural network to design a classifier as our machine learning method. The generated dataset is loaded and divided into \(70\%\) training and \(30\%\) test sets. We construct and train the simplest neural network consisting of linear connection and non-linear output with sigmoid as its activation function. We use the loss function given by the binary cross-entropy and the RMSprop optimizer with default hyperparameters. In addition, accuracy metrics are used to observe the neural network’s performance. Callbacks are used by monitoring the value of validation loss to obtain the best model. The model is trained for 100 epochs and tested by the datasets to get the linear weights.
Furthermore, we improve the network’s accuracy by inserting a hidden layer to introduce non-linearity. ReLu function is taken as activation function for the hidden layer nodes while sigmoid function for the output layer node. Moreover, multiple models are trained for the number of hidden neurons in the set \(\{0,5,...,50\}\) for the same dataset. This step highlights the accuracy trend with the increase in neurons. Here, all the weights are initialized uniformly and are optimized through the learning process. We implement these neural networks using Keras and TensorFlow in a Jupyter notebook environment38.
Numerical results
In this section, we discuss our findings and numerically analyze our proposal. To demonstrate the machine learning improvement, we first use the inequality as an entanglement witness on our dataset. By this test, we obtain an accuracy of \(49.12\%\), with 178, 048 samples out of the total 350, 000 being predicted as falsely separable. These results show that the entanglement witness has a significant value of type-II error. After training the neural networks with the generated dataset, we test with the testing set and newly generated data to obtain the performances of the machine-learned classifiers.
Testing with general testset
On testing the classifiers, we observe that the linear optimization by the simple neural network gives us an accuracy of \(78.18\%\) for our data. By introducing a hidden layer, i.e., non-linear optimization, we observe a drastic increase in accuracy to \(94.62\%\) with 50 hidden neurons. Having hidden neurons more than 50 shows no further increase in accuracy value. To further elaborate our results, we obtain the confusion matrices by testing the classifiers. Figure 2 depicts these results. By introducing non-linearity in our model, the falsely entangled samples decrease from 4699 to 1184 samples, whereas the falsely separable samples change from 3008 to 696 samples. Hence, this proves that the classifier constructed by the hidden layer neural network outperforms the neural network with no hidden layer.
Moreover, we observe the performance of the classifier by training the models on different quantum dataset sample size. On increasing the dataset size from \(10^3\) to \(10^5\), the test accuracies of the model increase as given in Table 1.
Comparison with entanglement witness
We test the trained classifier using a newly generated dataset based on the quantum states given by
where \(p \in (0,1)\) and is known as the noise factor and \(\left| \psi \right\rangle \) is a bell state given as
We observe how well the classifier performs depending on the noise level corresponding to the value of p. The states mentioned are separable states for \(p < 1/3\) and are entangled if the value exceeds 1/3. We observe that a model without hidden neurons, i.e., linear optimization, can yield a significant amount of samples classified as falsely separable, as shown in Fig. 3. So the model exhibits type-II error. The learning model with 10 neurons shows partial improvement. However, some samples are classified as falsely entangled, as indicated by the blue dashed line in the Fig. 3, causing the model to display a type-I error. In our model, we can observe a significant gain in the classifier’s performance as we further increase the number of neurons to 50.
In the proposed method, we observe that employing the original inequality as an entanglement witness results in a high value of type-II error with an accuracy of \(49.12\%\). However, the classifier trained with the simplest neural network classifies quantum states with an accuracy of \(78.18\%\), significantly reducing type-II errors. Also, introducing a hidden layer improves the classification performance and predicts the results with an accuracy of \(94.62\%\). This shows a significant improvement compared to the original inequality as an entanglement witness. It is because the classifier built with the artificial neural network encodes multiple entanglement witnesses, which work simultaneously to detect entanglement better than a single entanglement witness.
Detecting entanglement in tripartite quantum states
In order to scale up our method to a tripartite quantum system, we generate a three-qubit dataset and extract the features according to the Bell-type inequality for tripartite states given in35
where \(\rho _{\mathrm{ABC}}\) denotes the density matrix of a tripartite quantum state and \(\lbrace (a,a^\prime ),(b,b^\prime ),(c,c^\prime )\rbrace \) are the basis for the three qubits respectively. In this case, we consider fully separable states as one class and biseparable and fully entangled states as the other class for binary classification. After training several ANN models, we observe that the accuracy for the ANN having a single hidden layer with 100 neurons gives us an accuracy of \(78.76\%\). By employing a model with three hidden layers, this accuracy improves upto \(80.2\%\). We obtain the confusion matrices in Fig. 4 by testing the classifiers with hidden neurons in the set \(\lbrace 0,10,100\rbrace \). The results show that the method also applies to tripartite quantum states.
However, compared to the bipartite state classification, we observe that four features are insufficient to achieve high accuracy for tripartite state classification. It is depicted by the relatively small increase in the correctly labeled samples in Fig. 4. Therefore, to increase the classifier’s performance, we have to increase the number of features for model training and modify the neural network architecture. In other words, the trade-off between achievable accuracy and resources becomes evident for a quantum system’s increased number of qubits. On the other hand, this method is computationally less expensive than quantum state tomography as we use partial information in which the number of features required is less than the number of terms in a quantum state density matrix.
Conclusions
In this work, we have designed a classifier for detecting quantum states as separable and entangled using supervised learning and Bell-type inequality for relative entropy of coherence. We have generated a quantum dataset and have observed that using the Bell-type inequality as an entanglement witness on our quantum dataset gives us an accuracy of \(49.12\%\) having a large amount of type-II error. In order to obtain better performing classifiers, we have chosen an artificial neural network as our machine learning method and trained it on a quantum dataset generated by linear optimization, i.e., a simple neural network (no hidden layer), and non-linear optimization, i.e., a neural network with at least one hidden layer. The classifier trained with the simplest neural network distinguishes the quantum states with an accuracy of \(78.18\%\). Furthermore, we have observed a significant increase in the classifier’s performance on increasing the number of neurons and have observed that for our data, an artificial neural network with 10 to 50 hidden neurons serves the purpose and predicts the results with an accuracy of \(94.62\%\). In this way, we have obtained a classifier that detects the entanglement using the coherence of a quantum state. We have used this classifier to observe its performance on Bell states affected by the noisy channel and have obtained favourable results. Moreover, we have tested our method for classifying tripartite quantum states and have observed that this approach can be extended to multipartite systems as well. However, the required number of features has to be increased along with the modification of the neural network. Our results pave the way for devising reliable entanglement detection tools for applications in quantum communication and computation.
References
Dunjko, V. & Briegel, H. J. Machine learning & artificial intelligence in the quantum domain: A review of recent progress. Rep. Prog. Phys. 81, 074001 (2018).
Ming, Y., Lin, C. T., Bartlett, S. D. & Zhang, W. W. Quantum topology identification with deep neural networks and quantum walks. npj Comput. Mater. 5 (2019).
Torlai, G. et al. Neural-network quantum state tomography. Nat. Phys. 14, 447–450 (2018).
Bukov, M. et al. Machine learning meets quantum state preparation. The phase diagram of quantum control. arXiv preprint arXiv:1705.00565 (2017).
Krenn, M., Malik, M., Fickler, R., Lapkiewicz, R. & Zeilinger, A. Automated search for new quantum experiments. Phys. Rev. Lett. 116, 090405 (2016).
Liu, Y. et al. Entanglement-based feature extraction by tensor network machine learning. Front. Appl. Math. Stat. 7 (2021).
Kardashin, A., Uvarov, A. & Biamonte, J. Quantum machine learning tensor network states. Front. Phys. 8 (2021).
Horodecki, R., Horodecki, P., Horodecki, M. & Horodecki, K. Quantum entanglement. Rev. Mod. Phys. 81, 865–942 (2009).
Gambs, S. Quantum classification. arXiv preprint arXiv:0809.0444 (2008).
Jaffali, H. & Oeding, L. Learning algebraic models of quantum entanglement. Quantum Inf. Process. 19, 279 (2020).
Khoo, J. Y. & Heyl, M. Quantum entanglement recognition. Phys. Rev. Res. 3, 033135 (2021).
Batle, J., Ooi, C. H. R., Abdalla, S. & Bagdasaryan, A. Computing the maximum violation of a Bell inequality is an NP-problem. Quantum Inf. Process. 15, 2649–2659 (2016).
Yichen, H. Computing quantum discord is NP-complete. New J. Phys. 16, 033027 (2014).
Gurvits, L. Classical complexity and quantum entanglement. J. Comput. Syst. Sci. 69, 448–484 (2004).
Peres, A. Separability criterion for density matrices. Phys. Rev. Lett. 77, 1413–1415 (1996).
Wootters, W. K. Entanglement of formation of an arbitrary state of two qubits. Phys. Rev. Lett. 80, 2245–2248 (1998).
Rungta, P., Bužek, V., Caves, C. M., Hillery, M. & Milburn, G. J. Universal state inversion and concurrence in arbitrary dimensions. Phys. Rev. A 64, 042315 (2001).
de Vicente, J. I. Lower bounds on concurrence and separability conditions. Phys. Rev. A 75, 052320 (2007).
Gühne, O., Hyllus, P., Gittsovich, O. & Eisert, J. Covariance matrices and the separability problem. Phys. Rev. Lett. 99, 130504 (2007).
Harney, C., Paternostro, M. & Pirandola, S. Mixed state entanglement classification using artificial neural networks. New J. Phys. 23, 063033 (2021).
Ahmed, S., Muñoz, C. S., Nori, F. & Kockum, A. F. Classification and reconstruction of optical quantum states with deep neural networks. Phys. Rev. Res. 3 (2021).
Harney, C., Pirandola, S., Ferraro, A. & Paternostro, M. Entanglement classification via neural network quantum states. New J. Phys. 22, 045001 (2020).
Lu, S. et al. Separability-entanglement classifier via machine learning. Phys. Rev. A 98, 012315 (2018).
Liu, N. & Rebentrost, P. Quantum machine learning for quantum anomaly detection. Phys. Rev. A 97, 042315 (2018).
Gao, J. et al. Experimental machine learning of quantum states. Phys. Rev. Lett. 120, 240501 (2018).
Halder, S., Banik, M. & Ghosh, S. Family of bound entangled states on the boundary of the Peres set. Phys. Rev. A 99, 062329 (2019).
Ma, Y.-C. & Yung, M.-H. Transforming Bell’s inequalities into state classifiers with machine learning. npj Quantum Inf. 4, 34 (2018).
Qiu, P.-H., Chen, X.-G. & Shi, Y.-W. Detecting entanglement with deep quantum neural networks. IEEE Access 7, 94310–94320 (2019).
Yang, M. et al. Experimental simultaneous learning of multiple nonclassical correlations. Phys. Rev. Lett. 123, 190401 (2019).
Roik, J., Bartkiewicz, K., Černoch, A. & Lemr, K. Accuracy of entanglement detection via artificial neural networks and human-designed entanglement witnesses. Phys. Rev. Appl. 15, 054006 (2021).
Chen, Y., Pan, Y., Zhang, G. & Cheng, S. Detecting quantum entanglement with unsupervised learning. Quantum Sci. Technol. 7, 015005 (2021).
Baumgratz, T., Cramer, M. & Plenio, M. B. Quantifying coherence. Phys. Rev. Lett. 113, 140401 (2014).
Streltsov, A., Singh, U., Dhar, H. S., Bera, M. N. & Adesso, G. Measuring quantum coherence with entanglement. Phys. Rev. Lett. 115, 020403 (2015).
Bu, K., Kumar, A. & Wu, J. Bell-type inequality in quantum coherence theory as an entanglement witness. arXiv preprint arXiv:1603.06322 (2016).
Qiu, L., Pan, F. & Liu, Z. Tripartite Bell-type inequalities for quantum coherence and skew information. Int. J. Quantum Inf. 15, 1750025 (2017).
MATLAB. Version 9.6.0 1472908 (R2019a) (The MathWorks Inc., 2019).
Johnston, N. QETLAB: A MATLAB Toolbox for Quantum Entanglement, Version 0.9 (2016).
Chollet, F. et al. Keras. https://github.com/keras-team/keras (2015).
Acknowledgements
This work was supported by the National Research Foundation of Korea (NRF) grant funded by the Korea government (MSIT) (Nos. 2019R1A2C2007037 and 2022R1A4A3033401) and by the MSIT (Ministry of Science and ICT), Korea, under the ITRC (Information Technology Research Center) support program (IITP-2021-0-02046) supervised by the IITP (Institute for Information & Communications Technology Planning & Evaluation).
Author information
Authors and Affiliations
Contributions
N.A. contributed the idea. N.A., U.K., A.K., and T.Q.D. developed the theory and wrote the manuscript. H.S. improved the manuscript and supervised the research. All the authors contributed in analyzing and discussing the results and improving the manuscript.
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing interests.
Additional information
Publisher's note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Asif, N., Khalid, U., Khan, A. et al. Entanglement detection with artificial neural networks. Sci Rep 13, 1562 (2023). https://doi.org/10.1038/s41598-023-28745-3
Received:
Accepted:
Published:
DOI: https://doi.org/10.1038/s41598-023-28745-3
This article is cited by
-
Quantum Computing in the Next-Generation Computational Biology Landscape: From Protein Folding to Molecular Dynamics
Molecular Biotechnology (2024)
-
Entanglement Detection with Complex-Valued Neural Networks
International Journal of Theoretical Physics (2023)
-
Future Potential of Quantum Computing and Simulations in Biological Science
Molecular Biotechnology (2023)
Comments
By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.