Introduction

Entanglement is one of the most fascinating phenomena in quantum mechanics, representing the intricate quantum correlations between particles that persist regardless of spatial or temporal separation1,2,3. This unique property is a cornerstone of quantum technologies, enabling breakthroughs in quantum computing1,4, quantum cryptography5, quantum communication6, and beyond. To fully harness the potential of entanglement, it is essential to develop robust methods for its detection and characterization.

However, detecting entanglement, particularly in the Noisy Intermediate-Scale Quantum (NISQ) era, presents significant challenges. Traditional methods, such as the positive partial transpose (PPT) criterion7,8, are effective for low-dimensional systems (e.g., \(\mathcal {H}^2 \otimes \mathcal {H}^2\) and \(\mathcal {H}^2 \otimes \mathcal {H}^3\)) but fail to provide sufficient conditions for separability in higher dimensions. For instance, entangled states with positive partial transpose (PPTES)9 cannot be identified using the PPT criterion alone. Another method to distinguish separable states from entangled ones involves the use of entanglement witnesses (EWs)10,11,12,13, which are Hermitian operators. However, while EWs are a valuable tool, their practical application often demands precise construction and is constrained by the complexity of high-dimensional systems. These challenges are exacerbated in NISQ devices, where noise, decoherence, and limited qubit connectivity further complicate entanglement detection.

Machine learning (ML) is a subset of artificial intelligence (AI) that enables computers to learn from data without being explicitly programmed. Machine learning algorithms construct mathematical models from sample data, referred to as“training data,”to make predictions or decisions autonomously. These algorithms adapt to new data, producing reliable and repeatable results14. Support Vector Machines (SVMs) are a prominent type of supervised machine learning algorithm, well-regarded for their ability to classify data points effectively by identifying the optimal hyperplane that separates different classes. However, as datasets become larger and more complex, traditional SVMs encounter challenges related to scalability and computational efficiency. This is where quantum computing plays a crucial role. Authors in15 successfully employed SVM algorithm to obtain entangled witnesses, distinguishing entangled states from separable ones. Neural networks, another type of supervised machine learning algorithm, can also be utilized to detect quantum entanglement. Similar to SVMs, neural networks utilize labeled data to determine the best decision boundary between two classes16.

In recent years, the prospect of using quantum devices to help or completely replace by classical systems in machine learning has made great progress and combination of machine learning and quantum computing has the potential to revolutionize artificial intelligence17,18,19,20. Quantum machine learning (QML) is an emerging subfield of artificial intelligence that leverages the principles and techniques of quantum computing to enhance the capabilities of machine learning algorithms in data analysis21,22,23.A ke By exploiting unique quantum advantages, QML aims to develop novel algorithms capable of processing data more efficiently and accurately, with the ultimate goal of creating more powerful and versatile AI systems. A key development in this field is the emergence of hybrid variational quantum-classical algorithms, which utilize low-depth quantum circuits to efficiently combine quantum and classical resources. These algorithms are particularly well-suited for QML, as they can address specific tasks beyond the reach of traditional classical computers while operating within a framework that imposes less stringent hardware requirements, making them promising for near-term applications24,25,26,27,28,29,30.

The study of quantum entanglement has significantly progressed with QML techniques for detecting and measuring entanglement by utilizing quantum states as inputs. QSVMs represent a promising intersection of quantum computing and machine learning, offering potential advantages over classical SVMs by leveraging quantum algorithms to solve complex classification problems more efficiently. QSVMs utilize quantum principles, such as superposition and entanglement, to process high-dimensional data and solve optimization tasks that are computationally expensive for classical systems. For instance, Rebentrost et al.31 introduced QSVMs for binary classification, demonstrating their ability to achieve exponential speedups in certain scenarios by using quantum algorithms like the Harrow-Hassidim-Lloyd (HHL) algorithm for solving linear systems32. In quantum computing, QSVMs are being explored for applications such as quantum state classification33, quantum chemistry34, and quantum finance35, where they can classify molecular structures, optimize financial portfolios, and detect anomalies in quantum systems. Additionally, QSVMs are being investigated for quantum image processing36 and predicting air pollution37, highlighting their versatility across domains. Despite their potential, challenges such as error rates in quantum hardware and scalability remain, necessitating further research to fully realize their capabilities.

In this study, we introduce a novel QSVM classifier utilizing variational quantum circuits (VQCs) tailored for NISQ devices38,39. VQCs, which consist of parameterized quantum gates, are central to variational quantum algorithms (VQAs) and are optimized imperatively using classical methods. We investigate the expressibility and entanglement capability of various VQCs to enhance the performance and reliability of QSVMs. Our approach leverages quantum circuits to prepare training data that reflects the quantum characteristics of the dataset, enabling the detection of entangled and separable states with high accuracy. Notably, our method achieves over 90% accuracy in predicting two and three-qubit states, demonstrating its effectiveness even with limited training data.

The contributions of this work are threefold: a scalable entanglement detection framework designed for NISQ devices, a comprehensive evaluation of VQC properties (expressibility and entanglement capability) in the context of QSVMs, and experimental validation on IBMQ devices, showcasing the practical applicability of our approach. By addressing the limitations of existing methods and leveraging the strengths of QML, this study paves the way for more efficient and reliable entanglement detection in quantum systems.

The remainder of this paper is organized as follows: Section II presents a framework for general QSVMs and the preparation of two- and three-qubit entangled and separable quantum states using quantum circuits. In Section III, we discuss the results obtained from experiments conducted on IBMQ. Finally, we conclude the paper and suggest avenues for future research.

Quantum support vector machines

Quantum states are characterized by positive trace-class operators, which are Hermitian operators acting on a Hilbert space. These states, known as density matrices \(\rho\), are defined as:

$$\begin{aligned} \mathcal {S}(\mathcal {H}) \equiv \left\{ \rho \in \mathcal {T}(H) \, \big | \, \rho \ge 0, \, \text {tr}(\rho ) = 1 \right\} . \end{aligned}$$

Quantum states can be categorized as separable or entangled. Entanglement is a phenomenon where two or more quantum systems are correlated in such a way that the state of one system cannot be described independently of the others. The Hilbert space of a two-level quantum system, or qubit, is represented by the Bloch sphere. The algebra of observables for this space is derived from the Lie group SU(2), generated by the Pauli matrices. A multi-qubit system, defined on the Hilbert space\(\mathcal {H}_{qubit}^{\otimes N}=\mathcal {H}_{2}^{(1)}\otimes \mathcal {H}_{2}^{(2)}\otimes ...\otimes \mathcal {H}_{2}^{(N)}\) is called separable if it can be expressed as:

$$\begin{aligned} \mathcal {\rho } = \sum _{i=1} p_i \rho ^{(1)}\otimes ...\otimes \rho ^{(N)},\ \ p_i\ge 0 \ \ \sum _i p_i=1, \end{aligned}$$
(1)

where \(\rho ^{(i)}\) are arbitrary, normalized single-qubit states in \(\mathcal {H}_{2}^{(i)}=\mathcal {C}^2\). If \(\rho\) cannot be written in this form, it is considered an entangled state.

In QSVM algorithms, two main classification methods are used: the kernel trick method and the variational quantum circuit (VQC) method. This study focuses on classifying entangled and separable states using the VQC-SVM approach. The dataset is structured as \(\{\zeta \equiv \{({\rho _m}, y^m)\}_{m=0}^M, where\ \rho _m\in \mathcal {H}_{qubit}^{\otimes N}, y^m = \pm 1 \}\). For binary classification, the label \((-1)\) represents entangled states, while \((+1)\) represents separable states.

The optimization problem for the SVM is formulated in its dual form, applying the Karush–Kuhn–Tucker (KKT) conditions, leading to the following loss function:

$$\begin{aligned} \mathcal {L}(\mu , C,\lambda ) = \frac{1}{C} \sum _{i=1}^{M} \mu _i^2 + \frac{1}{2}\sum _{i,j=1}^{M} \{y_i y_j \mu _i \mu _j (\rho _i^T \rho _j) - \frac{1}{2\lambda }\} , \end{aligned}$$
(2)

where C is the regularization parameter that controls the trade-off between minimizing training error and model complexity, and \(\lambda\) penalizes large values of \(\mu\), thereby preventing overfitting (for more details see Appendix A).

For a new state \(\varvec{\varrho }\) the decision function for classification is given by :

$$\begin{aligned} \begin{aligned} {f}(\varvec{\varrho }) = \text {sgn}\left( \sum _{i=1}^{M} \mu _i y_i \varvec{\rho }_i^T \varvec{\varrho } + \frac{1}{\lambda }\right) , \end{aligned} \end{aligned}$$
(3)

where the sign function sgn(.) is defined as:

$$\begin{aligned} \text {{sgn}}(\varrho ) = {\left\{ \begin{array}{ll} -1, & \text {{if }} \varrho \ is \ entangled; \\ 1, & \text {{if }} \varrho \ is \ seperable. \end{array}\right. } \end{aligned}$$

In this work, we convert the classical SVM into a QSVM by employing variational quantum circuits (VQCs). These circuits are parameterized quantum circuits designed to optimize the Lagrange coefficients \(\mu\), which depend on the rotation angles of individual qubits. A PQC (Parameterized Quantum Circuit) is used to generate parametric states:

$$\begin{aligned} |\psi (\varvec{\vec {\theta }})\rangle =U\left( \varvec{\vec {\theta }} \right) | 0\rangle ^{\otimes N} , \end{aligned}$$
(4)

where the unitary operator \(U\left( \varvec{\vec {\theta }} \right)\) , also known as the ansatz, acts on the reference state. By adjusting the parameters \(\vec {\theta }\), the final quantum state is controlled. Depending on the problem, different types of ansatzes, such as the unitary coupled-cluster, low-depth circuit ansatz, or SWAP network, can be employed40,41,42,43.

In this paper, we use a PQC that can be implemented on near-term hardware, which consists of single-qubit gate layers with adjustable parameters, as well as two-qubit gate layers to create entanglement as shown below:

$$\begin{aligned} & U\left( \varvec{\vec {\theta }} \right) =\prod _k U (\theta _k) W_k, \end{aligned}$$
(5)
$$\begin{aligned} & U (\theta _k) =R( \theta _k ^i)^{\otimes n}= \bigotimes _n e^{-i \theta _k ^i \sigma /2}, \end{aligned}$$
(6)

where \(\sigma\) represents one of the Pauli matrices, and \(W_k\) represents a two-qubit gate. The parameters \(\varvec{\vec {\theta }}=(\theta _1,\theta _2,...)\) determine the transitions between states, enabling the PQC to represent the classical decision function in quantum form. The loss function depends on the VQC technique (ansatz) and consists of a series of quantum gates and operations (see Figs. 1 and 2). The optimization parameters \(\mu _i (\varvec{\vec {\theta }})\) are derived from the ansatz and are equivalent to the squared magnitude of the expectation value of the operator \(U(\varvec{\vec {\theta }})\) applied to the initial state. As outlined in Appendix A Eq. (27), we adopt the classical SVM loss function method, enhanced by the integration of quantum-based parameters for improved performance.The quantum-based loss function is expressed as:

$$\begin{aligned} \mathcal {L}_{\psi , \gamma ,C}(\varvec{\vec {\theta }} , \zeta )=\sum _{i=1}^{M} \sum _{j=1}^{M} \mu _i(\varvec{\vec {\theta }}) \mu _j(\varvec{\vec {\theta }}) y_i y_j\left[ \left| \left\langle \psi _i \mid \psi _j\right\rangle \right| ^2+\frac{1}{\gamma }\right] + \frac{1}{C} \sum _{i=1}^{M} \mu _i(\varvec{\vec {\theta }})^2. \end{aligned}$$
(7)
Fig. 1
figure 1

Architectural design of two-qubit VQC circuits. (1) (# circuit 1). (2) (# circuit 2). (3) (# circuit 3).

Fig. 2
figure 2

Architectural design of three-qubit VQC circuits. (1) (# circuit 1). (2) (# circuit 2). (3) (# circuit 3). (4) (# circuit 4).

This framework allows for the efficient detection of entangled and separable quantum states, paving the way for broader applications of QSVMs in quantum machine learning (see Fig.  3).

Fig. 3
figure 3

Two-qubit \(\mu _i (\varvec{\vec {\theta }})\)’s Circuit using four rotation gates and a CNOT.

The measurement results of all qubits provide the probabilities for each basis. The lost function of Eq. (7) is mostly based on the evaluation of the dot product which can be estimated via the Swap test subroutine44,45,46,47. Figure 4 performs the inner product between two quantum state vectors and upon measuring the ancilla qubit, we obtain the count number in two bases \(|0\rangle\) and \(|1\rangle\). Finally, the expression \(R = 1 - \frac{2}{S} \sum _{i=1}^{S} M_{i}\) describes a calculation where the result R is influenced by the number of shots S and M (number of counts for the basis \(|1\rangle\))46,48,49.

Fig. 4
figure 4

The swap gate operation for to calculate dot product states.

After setting up the objective function, we need to minimize it in order to find optimal values of \(\varvec{\vec {\theta }}\). The decision function is represented in Eq. (8) and in this stage, optimal \(\varvec{\vec {\theta }}^*\)s are provided as input. Finally the predicted test data labels reached from \(\hat{y}=\text {{sgn}}(f_{\psi , \gamma }(\varvec{\varvec{\vec {\theta }}^*} , \zeta ,\psi _{test}))\).

$$\begin{aligned} f_{\psi , \gamma }(\varvec{\varvec{\vec {\theta }}^*} , \varvec{\zeta },\psi _{test})=\sum _{i=1}^{M} \mu _i(\varvec{\varvec{\vec {\theta }}^*}) y_i \left[ \left| \left\langle \psi _i \mid \psi _{test}\right\rangle \right| ^2+\frac{1}{\gamma }\right] . \end{aligned}$$
(8)

Alternatively, two-class registers are defined as i \((q_0,\ q_1)\) and j \((q_2,\ q_3)\) in Fig. 5. Utilizing the ansatz \(U(\varvec{\vec {\theta }})\) for \(N=4\), the initial two qubits are assigned to register class one, while the subsequent two qubits are designated for another class.

Fig. 5
figure 5

The final goal of the second factor in the Eq. (7) was prepared with measurement results on \(M_{00..0}\) where M is a projection measurement operator of state and disparity will be greater for smaller shot sizes.

Data preparation and feature sampling

The primary goal of this article is to determine whether a quantum states is entangled or separable using QSVM. So, the starting point is to collect data on quantum states, in two categories. Here we discuss two-qubit, three-qubit, and bipartite states.

Sepearble states

Using (1), we can construct completely separable mixed states and also, any pure state on the Bloch sphere can be obtained according to the rotation as follows:

$$\begin{aligned} \begin{aligned} \sigma _{sep}&= \sum _i p_i |\varphi (\alpha _i,\beta _i)\rangle \langle \varphi (\alpha _i,\beta _i)\rangle ,\\ \end{aligned} \end{aligned}$$
(9)

where

$$\begin{aligned} \begin{aligned} |\varphi (\alpha _i,\beta _i)\rangle =\bigotimes _j^N \cos (\alpha _{ij})|0_j\rangle +e^{\beta _{ij}} \sin (\theta _{ij})|1_j\rangle =\bigotimes _j^N U(\alpha _{ij},\beta _{ij}) |0_j\rangle , \end{aligned} \end{aligned}$$
(10)

with

$$\begin{aligned} U(\alpha _{ij},\beta _{ij}) = \begin{pmatrix} \cos (\alpha _{ij}) & -\sin (\alpha _{ij}) \\ \sin (\alpha _{ij}) & e^{\beta _{ij}}\cos (\alpha _{ij}) \end{pmatrix}, \end{aligned}$$

which can be considered as rotation around axis y, \(R_y(\alpha _{ij})\), and then around axis z,\(R_z(\beta _{ij})\). So,it is possible to create a separable quantum state by operating single-qubit gates on NISQ device. For a two-qubit quantum state, the parameter \(|\varphi \rangle\) can be explained as follows:

$$\begin{aligned} |\varphi (\alpha _i,\beta _i)\rangle =\bigotimes _{j=1}^2 U(\alpha _{i1},\beta _{i1}) |0_j\rangle \otimes U(\alpha _{i2},\beta _{i2}) |0_j\rangle , \end{aligned}$$
(11)

and unitary transformations operate locally, affecting individual qubits independently.

Entangled states

A circuit-based data for creating a entangled two and three qubits states are demonstrated in50,51.

Two-qubit:The concurrence method for preparing a range of minimum and maximum entangled states in terms of the rotation angles of the unitary gates. Let c be a parameter defined as follows:

$$\begin{aligned} \text {Concurrence} = {\left\{ \begin{array}{ll} c = 0 & \quad \text { separable states}; \\ 0< c < 1 & \quad \text { entangled states}; \\ c = 1 & \quad \text {maximally entangled states}. \end{array}\right. } \end{aligned}$$

Concurrence can be described as an informative item in quantum circuits for labeling data and its value in this circuit is equivalent to \(c=\sin (\theta _0) \sin \left( \frac{\theta _1}{2}\right)\) where \(\sin (\theta _0)\) is the control qubits degree of initial superposition (see Fig. 6).

Fig. 6
figure 6

Two-qubit state preparation circuit. The \(|\psi \rangle\) extracted from the highlighted line is fundamental to the computation of the concurrence method. The state is \(|\psi \rangle = \cos (\frac{\theta _0}{2}) |00 \rangle - i \sin (\frac{\theta _0}{2}) \cos (\frac{\theta _1}{2}) |10 \rangle - i \sin (\frac{\theta _0}{2}) \sin (\frac{\theta _1}{2}) |11 \rangle\). For \(\theta _0 = \frac{\pi }{2} ,\theta _1 = \pi ,\) the state becomes maximally entangled (c = 1), while for \(\theta _0 = 0,\theta _1 = \pi ,\) the state is separable (c = 0).

Three-qubit: The GHZ-class can be driven from Eq. (12). The five parameter’s respective ranges are \(\theta _{A,B,C} \in \left( 0, \pi /2\right]\), \(\vartheta \in \left( 0, \pi /4\right]\), \(\phi \in \left[ 0, 2 \pi \right)\), \(P\in \left( \frac{1}{2}, \infty \right)\). Here, P represents a normalization factor.

$$\begin{aligned} |\psi _{\text {GHZ}}\rangle = \frac{1}{\sqrt{P}}\left( \cos (\vartheta )|000\rangle + \sin (\vartheta ) e^{i\phi }|{\Phi _A}{\Phi _B}{\Phi _C}\rangle \right) , \end{aligned}$$
(12)

where

$$\begin{aligned} \begin{aligned} |\Phi _i\rangle&= \cos (\theta _i)|0\rangle + \sin (\theta _i)|1\rangle , \\&\quad \quad i = A, B, C. \end{aligned} \end{aligned}$$
(13)

and

$$\begin{aligned} P = \left( 1 + 2\cos (\vartheta ) \sin (\vartheta ) \cos (\theta _A) \cos (\theta _B) \cos (\theta _C) \cos (\phi )\right) . \end{aligned}$$
(14)
Fig. 7
figure 7

Quantum state circuit preparation. (1) An example of a Bi-partite entangled state circuit for three qubits. (2) Separable state circuit.

The required data for bi-partite state section is assembled from circuit (Fig. 7(1)). We have three possible combinations for this strategy A|BC, B|AC, C|AB (only one of three bi-partite state combinations is explained B|AC). Figure  7(2) illustrates how we prepare three-qubit separable product states.

Entangling capability and expressibility

The entangling capability of a parameterized quantum circuit (PQC) quantifies its ability to generate entanglement between quantum states. This property is crucial for achieving quantum advantage, as entangled states play a central role in quantum algorithms. One method to measure entangling capability is through the Meyer-Wallach entanglement measure52, which uses average linear entropy. According to Ref.53, the measure of entanglement of a multi-qubit system is expressed as the average entanglement of each qubit with the rest of the system, as follows:

$$\begin{aligned} \begin{aligned} Q(|\psi \rangle ) = 2[1-1/n\sum _{k=1}^{N} tr(\rho _k^2)]. \end{aligned} \end{aligned}$$
(15)

It can be seen that the value of \(Q(\psi )\) depends on the purity of the subsystem states. For instance, a maximally entangled state \(Q(\frac{|0,0+|1,1\rangle )}{\sqrt{2}})=1\), while a separable state \(Q(|0,0\rangle )=0\).

In this study, we examined 19 (see 11) distinct VQCs to evaluate and optimize their efficiency. By testing a diverse set of circuit architectures, we identified configurations that maximized the performance in generating entangled states. This comparative approach allowed us to pinpoint the VQC design yielding the highest efficiency for our objectives.

According to Fig. 8, it can be seen that in the one blocks, we need a smaller amount of entanglement for the quantum circuit in order to reach a high accuracy value. In this case, it shows that the increase of blocks will be accompanied by an increase in cost and space for the quantum circuit, which in this figure shows that this increase in the block and volume of the quantum circuit will not necessarily increase the amount of accuracy in quantum processing. The accuracy and entanglement capability values for circuits C1 through C19 (see Fig. 11) are provided in Table 1

PQC designs can generate pure quantum states, and the overlap of these states across the entire Hilbert space is measured by a quantity known as expressibility. To quantify expressibility, we calculate the fidelity of the state distribution obtained from the PQC and compare it with the fidelity distribution of Haar random states:

$$\begin{aligned} \begin{aligned} EXP= D_{k}(P_{PQC}(F,\theta ) || P_{Haar}(F)). \end{aligned} \end{aligned}$$
(16)

Here, \(D_k\) is the Kullback-Leibler divergence and \(P_{PQC}(F,\theta )\) represents the estimated probability distribution of fidelities obtained by sampling states generated from a PQC. For an ensemble of Haar-random states, the probability density function of fidelities is given by \(P_{Haar}(F)=(N-1)(1-F)^{(N-2)}\), where F and N are the fidelity and dimension of the Hilbert space, respectively. Expressibility measures how well the state distribution from a PQC matches that of Haar random states, indicating the extent to which the states span the Hilbert space. High expressibility or low Kullback-Leibler divergence values indicate how effectively the PQC can generate all possible quantum states within the Hilbert space (For further details and an example involving a single-qubit state, see Ref.53). Figure 9 illustrates that as the number of blocks in a quantum circuit increases, expressibility also rises. This means the quantum states generated by the circuits cover a broader region of the Hilbert space. Consequently, the accuracy of QSVM in detecting quantum states improves with increased expressibility. Also, the values of accuracy and expressibility for circuits C1 through C19 (see Fig. 11) are provided in Table  2

Fig. 8
figure 8

Dispersion of different quantum circuits according to entanglement and accuracy in QSVM.

Table 1 We utilized various circuits, ranging from C1 to C19, as detailed in the Appendix C, and conducted a comparison of their Accuracy and Entangling Capability.
Fig. 9
figure 9

Dispersion of different quantum circuits according to experisibility and accuracy in QSVM.

Table 2 We utilized various circuits, ranging from C1 to C19, as detailed in the Appendix C, and conducted a comparison of their Accuracy and Expressibility.

Investigating IBMQ through experimental trials

The IBM quantum computer is widely recognized as a leader in the quantum computing domain, contributing significantly to advancements in quantum hardware and software. By leveraging quantum phenomena such as superposition, entanglement, and interference, it enables the efficient and accurate resolution of complex problems beyond the capabilities of classical computers. This innovation has driven exploration in quantum algorithms and has led to applications across diverse fields, including chemistry, finance, logistics, and artificial intelligence. With the introduction of Q System One, IBMQ has made strides toward commercializing quantum computing, unlocking opportunities to tackle previously unsolvable challenges. As industries increasingly recognize the transformative potential of quantum computing, IBMQ’s pioneering role is poised to shape the future of computation and machine learning54.

IBM currently offers cloud-based quantum computing services to developers, researchers, and businesses through its Quantum Experience platform. In this study, we report the results of experiments conducted using both IBM’s noisy simulators and real quantum computing systems. First, the Qiskit runtime“ibm-quantum” channel was selected, and the available backends were identified. Among them,“ibm-perth,”“ibm-lagos,”and“ibm-nairobi”are seven-qubit quantum processors, while“simulator-stabilizer,” “simulator-mps,”“simulator-extended-stabilizer,” “ibmq-qasm-simulator,”and“simulator-statevector”are accessible simulator services, each with distinct error maps in computational processes.

Our method necessitated classical optimization, so we incorporated session definitions in our code. The number of circuit shots was set to 8192. During training data sampling, the data dimension was reduced to \(n = 2\) with a size of \(N=4\) to mitigate decoherence effects.Twenty test datasets were generated with random \(\theta\) values using the circuit shown in Fig. 6. The Simultaneous Perturbation Stochastic Approximation (SPSA) minimization tool was chosen as it aligns well with the random nature of quantum states and the data sampling55,56. The optimization steps up to the minimum stage with 200 iterations for Table  4 are shown in Fig.  10. The elapsed time for each circuit’s runtime process is presented in Table 3.

Table 3 Real quantum processor time usage at one stage of the performance.

Experiments were run on the IBM-Perth seven-qubit processor, as well as the ibmq-qasm-simulator. This work incorporates the latest updates from IBMQ services and provider information57.

Table 4 Test accuracy for presented approach.
Table 5 Data usage for two, three and four qubits.
Fig. 10
figure 10

The optimization levels were computed using the SPSA optimizer with 200 iterations, ordering from the first data dimension as shown in Table 4.

Conclusion

In conclusion, we successfully distinguished separable quantum states from entangled states using the QSVM method. We meticulously prepared the training and testing datasets from the generated quantum states (Table 4). For the training dataset, we randomly selected a subset of quantum states, labeling them as either separable or entangled. Similarly, we randomly chose a subset for the testing dataset. Our findings indicate that the QSVM model can accurately predict the labels of these quantum states. The recommendation model was effectively developed to accurately predict both two-qubit and three-qubit states. Specifically, we utilized a two-qubit quantum circuit across at least four training datasets, resulting in optimal performance for both two-qubit and three-qubit datasets. Furthermore, by increasing the training datasets to eight and employing a three-qubit VQC-SVM model, we observed a significant enhancement in accuracy, particularly for the three-qubit datasets. To further assess model performance, we tested several VQC circuits to compare their results and identify the model that provided the highest accuracy, as detailed in Table 5. Overall, this study underscores the effectiveness of the QSVM method in classifying quantum states and highlights the importance of circuit choice in optimizing predictive capabilities.