Detecting and quantifying entanglement on near-term quantum devices

Quantum entanglement is a key resource in quantum technology, and its quantification is a vital task in the current Noisy Intermediate-Scale Quantum (NISQ) era. This paper combines hybrid quantum-classical computation and quasi-probability decomposition to propose two variational quantum algorithms, called Variational Entanglement Detection (VED) and Variational Logarithmic Negativity Estimation (VLNE), for detecting and quantifying entanglement on near-term quantum devices, respectively. VED makes use of the positive map criterion and works as follows. Firstly, it decomposes a positive map into a combination of quantum operations implementable on near-term quantum devices. It then variationally estimates the minimal eigenvalue of the final state, obtained by executing these implementable operations on the target state and averaging the output states. Deterministic and probabilistic methods are proposed to compute the average. At last, it asserts that the target state is entangled if the optimized minimal eigenvalue is negative. VLNE builds upon a linear decomposition of the transpose map into Pauli terms and the recently proposed trace distance estimation algorithm. It variationally estimates the well-known logarithmic negativity entanglement measure and could be applied to quantify entanglement on near-term quantum devices. Experimental and numerical results on the Bell state, isotropic states, and Breuer states show the validity of the proposed entanglement detection and quantification methods.


I. INTRODUCTION
It is widely believed that we are now in the Noisy Intermediate Scale Quantum (NISQ) era [1], where quantum computers with 50-100 qubits are available while noise in quantum gates severely limits the quantum circuits that can be executed reliably.It thus becomes important to make the best use of today's NISQ devices to design practical applications.One promising scheme for near-term quantum applications is the variational quantum algorithms (VQA) [2], which have been applied to solve many tasks including Hamiltonian ground and excited states preparation [3,4], quantum state distance estimation [5,6], quantum metrology [7,8], and quantum data compression [9][10][11].These variational quantum algorithms involve evaluating and optimizing loss functions that depend on parameters in parameterized quantum circuits (PQC).They are regarded as well-suited for execution on NISQ devices by combining quantum computers with classical computers.We refer the readers to [12,13] for a detailed review on VQA.
Quantum entanglement [14], the most nonclassical manifestation of quantum mechanics, has been identified as invaluable resource enabling a tremendous number of tasks ranging from quantum information processing [15,16], quantum cryptography [17][18][19], quantum algorithms [20][21][22], quantum communication [23,24], to measurement-based quantum computing [25][26][27][28].As so, the ability to manipulate quantum entanglement is the cornerstone to achieve real applications of quantum technologies.A number of theoretical and experimental methods have been proposed in the past 20 years for entanglement detection and quantification [14,29,30].For example, entanglement can be detected via entanglement witnesses [31,32], Bell's inequalities [33], quantum Fisher information [34], realignment criterion [35,36], range criterion [37], and majorization criterion [38], to name a few.These methods commonly assume that prior information about the target state is known.A direct way to obtain such information is to perform quantum state tomography and reconstruct the density matrix [39,40].However, tomography becomes unrealistic as the number of required measurement settings scales exponentially with the size of the system.Briefly speaking, though there are many methods proposed for detecting and quantifying quantum entanglement, they are not specially designed for near-term quantum devices and thus are not directly applicable in most cases, rendering reliable detection and quantification of quantum entanglement on near-term quantum devices a vital challenge.
In this paper, we combine VQA and the quasi-probability decomposition technique [41][42][43][44][45][46][47] to propose the Variational Entanglement Detection (VED) and Variational Logarithmic Negativity Estimation (VLNE) algorithms, aiming to detect and quantify quantum entanglement on near-term quantum devices, respectively.VED uses criteria based on positive maps as a bridge and works as follows.Given an unknown target bipartite quantum state, it firstly decomposes the chosen positive map into a linear combination of NISQ implementable quantum operations.Then, it variationally estimates the minimal eigenvalue of the final state, which is obtained by executing these quantum operations on the target state and averaging the output states.Two methods are proposed to compute the average: the first one averages the output states according to the quasi-probability distribution, and the second one estimates the average via the sampling technique and is probabilistic.At last, it asserts that the target state is entangled if the optimized minimal eigenvalue is negative.Following the idea of VED, VLNE variationally computes the well-known log-negativity entanglement measure, building on a linear decomposition of the transpose map into Pauli terms and the recently proposed trace distance estimation algorithm.Our main contributions can be summarized as follows: 1. We combine VQA and the quasi-probability decomposition technique to propose the VED framework, con-arXiv:2012.14311v1[quant-ph] 28 Dec 2020 tributing a feasible solution for detecting entanglement on near-term quantum devices.
2. We combine VQA and the quasi-probability decomposition technique to propose the VLNE algorithm that could estimate the well-known logarithmic negativity [48], which may lead to various applications in nearterm quantum information processing.
Experimental and numerical results reveal the validity of the proposed entanglement detection and quantification methods.
Our paper is structured as follows.In Sec.II, we set the notations and briefly summarize the entanglement criteria based on positive maps.In Sec.III, we present our first main result: the VED framework.In Sec.IV, we elaborate on three prominent positive maps to illustrate how the VED framework is applied.In Sec.V, we present our second main result: the VLNE framework, which estimates the logarithmic negativity entanglement measure.In Secs.VI and VII, experiments on IBM-Q and numerical simulations on Paddle Quantum are conducted on various bipartite quantum states of interests to show the validity of the proposed methods.We finally conclude in Sec.VIII.

A. Notations
In this section, we set the notation and define several quantities that will be used throughout this paper.We will frequently use symbols such as H A and H B to denote Hilbert spaces associated with quantum systems A and B, respectively.We use d A to denote the dimension of the system A. The set of linear operators acting on A is denoted by L(H A ).We write an operator with subscript to indicate the system that the operator acts on, e.g., X AB , and write X A := Tr B X AB .For a linear operator X ∈ L(H A ), we define its modulus |X| := √ X † X, where X † is the adjoint operator of X.The trace norm of X is defined as X 1 := Tr |X|.We use X ≥ 0 to indicate that A is positive semidefinite.A quantum map N that transforms linear operators to linear operators in the system A is abbreviated as N A→A .We use the calligraphic letters (e.g., N , R, and O) to represent linear quantum maps and use id A to represent the identity map on system A. We say Given a Hermitian operator X in system A, we denote by λ min (X) its minimal eigenvalue.We have the following variational characterization: where the minimization ranges over the set of pure states on system A.

B. Pauli operators and Pauli channels
The four Pauli operators in the qubit space are defined as They provide a basis for the qubit linear operators, i.e., arbitrary qubit linear operator can be decomposed w.r.t.this basis.
For the n-qubit case, one can construct a set of Pauli operators, which we call the Pauli set, as The n-qubit Pauli set has size |P n | = 4 n .Note that P n forms a basis for the n-qubit linear operators.One can see from (3) that each Pauli operator P ∈ P n can be represented uniquely by a quaternary sequence: As so, we use P q to represent the n-qubit Pauli operator that is uniquely determined by the sequence q.Since each qubit Pauli operator is unitary, so is each n-qubit Pauli operator, due to the construction.Given a Pauli operator P ∈ P n , we denote by P(•) := P (•)P † its induced Pauli channel.

C. Entanglement detection via positive maps
Let ρ AB be a bipartite quantum state in the composite system AB.By definition ρ AB is separable if it can be decomposed into a convex combination of tensor products of states describing local systems as [49] where p x ≥ 0, x p x = 1, and {|ψ x } x and {|φ x } x are two sets of pure states in systems A and B, respectively.Otherwise, ρ AB is entangled.Given the definition, it is natural to ask whether a given unknown bipartite quantum state is separable or entangled, known as the separability problem.This problem has been shown to be NP-hard [50,51].There are many separability criteria that have been proposed to determine the separability or entanglement of bipartite quantum states as necessary conditions [14,29].One of the most celebrated criteria for distinguishing separable states from entangled states are the positive map criterion.The core of the positive map criterion is that one subjects a subsystem of ρ AB to a positive (but not completely positive) map N B→B that preserves the positivity of inputs.If ρ AB is a product state, i.e., it is of the form ρ A ⊗ ρ B , the resulting operator ρ A ⊗ N (ρ B ) is still positive.Consequently, due to the linearity, an arbitrary separable state is mapped into some positive operator by this map.On the other hand, if ρ AB is entangled, the output operator N B→B (ρ AB ) may be no longer positive; the transpose map is a prominent example [52].That is to say, the negative spectrum of the output operator indicates entanglement of the input state.Mathematically, the positive map criterion states that a bipartite quantum state ρ AB is separable if and only if for arbitrary system C and arbitrary positive (but not completely positive) map N B→C , it holds that N B→C (ρ AB ) ≥ 0 [31].
Despite its proven efficiency in entanglement detection, the positive map criterion is not directly applicable in practice, especially on recent NISQ devices.This is an immediate consequence of the fact that generically positive but not completely positive maps do not represent physically implementable quantum operations [53] and thus cannot be realized in near-term quantum devices.In the following, we show how to overcome this obstacle and employ the positive map criterion to detect entanglement on NISQ devices.

III. QUANTUM ENTANGLEMENT DETECTION
In this section, we integrate variational quantum algorithms with the quasi-probability decomposition technique [41][42][43][44][45][46][47] to propose a bipartite entanglement detection framework specially designed for near-term quantum devices, using positive map criterion as a bridge.For simplicity, we assume A and B are two n-qubit quantum systems throughout this section.However, we remark that the proposed framework can applied to bipartite systems with different dimensions directly.
Let ∆ be a discrete set of quantum operations that are implementable in the near-term quantum devices.For example, one may choose ∆ to be the set of implementable operations introduced in [45,46].Alternatively, one may set ∆ to be the set of Pauli channels induced by Pauli operators from the Pauli set (3).For a positive (but not completely positive) and tracepreserving map N B→B , we assume that it can be decomposed w.r.t.∆ as Note that such a decomposition always exists if ∆ contains a universal basis [45].The trace-preserving condition imposes O r O = 1.We emphasize that there must exist negative coefficients r O since otherwise, N is completely positive.Given a bipartite quantum state ρ AB , we have To see if ρ AB can be detected by N , i.e., if ρ AB is entangled from N 's perspective, we need to check if the output state σ AB has a negative eigenvalue or not.Denote by λ min (σ AB ) as the smallest eigenvalue of σ AB .By the positive map criterion, if ρ AB is separable, then it must hold that λ min (σ AB ) ≥ 0. Equivalently, if λ min (σ AB ) < 0, we safely conclude that ρ AB is entangled and it can be detected by the positive map N B→B .This highlights the importance of computing or estimating λ min (σ AB ) in entanglement detection.

A. Deterministic detection
As we have argued, σ AB cannot be obtained directly via N (ρ) since N does not represent physically implementable quantum operations.Fortunately, the decomposition (7) empowers us an effective way to simulate the role of N and reconstruct σ AB as an average of a set of output states, obtained using quantum circuits implementable in near-term devices.This decomposition technique, combined with the variational quantum algorithm, enables a general framework that estimates λ min (σ AB ), whose value can witness the entanglement of the input state ρ AB .We call this framework the Variational Entanglement Detection (VED).The core idea is to use the linear decomposition (7) of the target state σ AB and the framework goes as follows.First of all, by (1) it holds that = min where the minimization ranges over all pure bipartite quantum states |ψ AB in AB.We use a variational quantum circuit with parameters α to prepare the test state |ψ .More precisely, we choose a parametrized quantum circuit ansatz that generates a unitary U (α) and prepare the test state via |ψ = U (α)|0 ⊗2n .Each inner product ψ|O(ρ)|ψ in ( 9) can be estimated via the canonical Swap Test subroutine [54], as both U (α) and O can be implemented in near-term devices.However, this subroutine costs a total number of 4n + 1 qubits and requires a 4n-qubit SWAP gate, which is resource consuming when n becomes large.Here we explore the special structure of the overlap ψ|O(ρ)|ψ and propose an qubit efficient estimating procedure which uses 2n qubits and avoids the use of expensive SWAP gate.First of all, notice that where the second equality follows from the cyclic property of trace function.Since each O is implementable on nearterm quantum devices, we may use ρ AB as input to the quantum circuit implementing O, and estimate the overlap ψ|O(ρ AB )|ψ using the quantum circuit illustrated in Fig. 1.
The overlap is obtained by counting the relative frequency of the measurement outcome 0 2n .Then, we repeat the estimation procedure |∆| times, where |∆| is the size of ∆, to obtain the overlaps for different O in (9).With these data in hand, we compute the following loss function At last, we perform gradient-based optimization methods including SGD [55] and Adam [56] to minimize the loss function L(α) by varying the parameters α, whose value will determine the separability of the input state ρ AB .More precisely, if L(α) is negative, we conclude that ρ AB is entangled, since by the positive map criterion, separable states cannot yield a negative spectrum.
Taking into account the noise in NISQ quantum devices, we may introduce a tolerance threshold δ > 0 so that L(α) < −δ implies the input state is entangled.This threshold δ can be set with prior knowledge about the noise characterization on the NISQ devices.What's more, for the purpose of entanglement detection, it is unnecessary to minimize L(α) since the condition L(α) < 0 is sufficient to assert that the input state is entangled.Based on this observation, we can terminate the optimization procedure that minimizes the loss function L(α) in advance to save the optimization cost.The detailed VED framework is summarized in Algorithm 1.We name it the deterministic VED to distinguish it from the probabilistic framework described in the next section.where rO is given by the decomposition (6); 7: end for 8: Perform optimization methods to minimize L(α); terminate the optimization if the error tolerance is satisfied: L(α) < −δ; 9: Output "Entangled" if the optimized L(α) < −δ.

B. Probabilistic detection
In Algorithm 1, we have used a brute-force approach, where we iterate over the set of implementable operations ∆, to estimate the loss function L(α).Actually, L(α) can be estimated in a probabilistic way using the sampling technique, by virtue of the quasi-probability decomposition (6).This new method would be beneficial when the number of decomposed operations in (6) with non-zero coefficients is large while the sampling cost is relatively low.Now we describe the sam-pling method accurately.First of all, notice that the decomposition (6) induces a quasi-probability distribution {r O } O∈∆ over ∆.From this quasi-probability distribution, we can construct a probability distribution {p O } O∈∆ using the canonical technique, i.e., Substituting ( 14) into (13) yields where E(X) denotes the expectation of the random variable X, and the expectation in ( 16) is evaluated w.r.t. the probability distribution {p O } O∈∆ .Based on ( 16), we propose Algorithm 2, which can be viewed as a probabilistic version of Algorithm 1.In particular, Algorithm 2 replaces the bruteforce approach (steps 3-7) in Algorithm 1 with the sampling approach, yielding a probabilistic algorithm.
Algorithm 2 Probabilistic VED 1: Input: 2n-qubit quantum state ρAB, decomposition (6) of the positive map N , parameterized quantum circuits U (α) with initial parameters α, error tolerance δ, and fail probability ε.Let's analyze Algorithm 2 in depth.First, we remark that the obtained L (α) in step 11 of Algorithm 2 is an unbiased estimator of true value L(α) due to (16).Second, since |L (m) | ≤ γ, we can apply the Hoeffding inequality [57] to ensure that M = 2γ 2 log(2/ε)/δ 2 number of samples would estimate the true value L(α) within error δ with success probability no less than 1 − ε, i.e., This confirms the validity of the sampling procedure (steps 4-9) of Algorithm 2. We call γ the sampling cost since it determines M , the number of samples required to achieve the desired precision.At last, we examine the success probability of the algorithm, given the success probability condition (17) of the sampling procedure.Assume the optimization procedure repeats K times.The overall success probability of Algorithm 2 is no less than 1 − Kε, as a direct corollary of (17) and the union bound.That is to say, if Algorithm 2 outputs "Entangled", ρ AB is entangled with probability larger than 1 − Kε.
To summarize, we have proposed two variational entanglement detection methods.Algorithm 1 is deterministic in the sense that whenever it outputs "Entangled", one can safely assert that ρ AB is entangled.On the other hand, Algorithm 2 is probabilistic in the sense that even if it outputs "Entangled", one can only declare that ρ AB is entangled with certain success probability.Nevertheless, when the number of decomposed operations in (6) with non-zero coefficients is large while the simulation cost γ is relatively low, the latter method may be beneficial.In this case, one can reduce the number of iterations via sampling and thus save computational resources.Algorithm 2 scarifies precision for efficiency in entanglement detection.

IV. PROMINENT POSITIVE MAPS
In Sec.III we have outlined the general deterministic and probabilistic VED frameworks for detecting entanglement via positive map criterion.In this section, we elaborate on three prominent positive maps-the transpose map [52], the reduction map [58], and the enhanced reduction map [59,60]-to illustrate how the deterministic VED framework works.We choose the set of NISQ implementable quantum operations ∆ to be the set of Pauli channels induced by Pauli operators from the Pauli set (3), i.e., ∆ := P P(•) = P (•)P † , P ∈ P n . ( For each of the three positive maps under consideration, we firstly decompose it w.r.t.∆ as (6) and then adopt the variational framework summarized in Algorithm 1 to fulfill entanglement detection.However, we remind that not all positive maps can be decomposed w.r.t. the set of Pauli channels.
Here are remarks for the three criteria under consideration.First, the reduction criterion is strictly weaker than both the transpose criterion and the enhanced reduction criterion, in the sense that the states that can be detected by the first criterion can also be detected by the latter two criteria.Second, there is no inclusion relation between the PPT criterion and the enhanced reduction criterion.That is, there are states that can be detected by one but not by the other.As so, given an unknown state, one may execute VED twice, one adopts the PPT criterion, and the other adopts the enhanced reduction criterion.The state is necessarily entangled if at least one of these two VEDs output "Entangled."We also show by example how VED works in qutrit systems in Appendix A, utilizing the Choi map [61,62].

A. PPT criterion
A necessary condition for entanglement detection is the positive partial transpose (PPT) criterion [52], which we briefly review as follows.Let ρ AB be a bipartite quantum state.We can express it as where {|i } i and {|k } k are the computational bases of A and B, respectively.Its partial transpose with respect to system B is defined as where T B denotes the transpose map on system B. The PPT criterion says that if ρ AB is separable, then ρ T B AB ≥ 0. Conversely, the negative spectrum witnesses entanglement of ρ AB .What's more, the PPT criterion is not only necessary but also sufficient for separability of the 2 ⊗ 2 and 2 ⊗ 3 cases [31,63,64].
We begin with the two-qubit bipartite quantum state case.Notice that the qubit transpose map admits the following decomposition w.r.t.∆ specialized in (18): where X, Y, Z are the Pauli matrices defined in (2).The validity of this decomposition can be checked by direct calculation.Substituting ( 23) into (22), we obtain where the quantum operation X B ρ AB X B should be understood as (I A ⊗ X B )ρ AB (I A ⊗ X B ), and similarly for Y ρY and ZρZ.Adapting the decomposition (25) into Algorithm 1, we successfully apply the proposed VED to accomplish the PPT criterion in the qubit case.Now we show the above detection method can be generalized to the multi-qubit bipartite quantum state case.Let B ≡ B 1 B 2 • • • B n be a composite system with n qubits, i.e., B i represents the i-th qubit system.A key observation is that the transpose operation satisfies the tensor product property: transposing the composite system B is equivalent to transposing the local qubit systems B i individually.More precisely, where T Bi is the transpose operation on the i-th qubit.Eqs. ( 26) and ( 23) together give T B a linear combination into Pauli channels of 4 n terms in total.Using this decomposition, we may apply VED (Algorithm 1 or Algorithm 2) to accomplish the multi-qubit PPT criterion deterministically or probabilistically.

B. Reduction criterion
In this section, we first review the reduction criterion [58] and then propose a variational algorithm implementing this criterion within the VED framework described in III.
which is known as the reduction map.The reduction criterion says that if a bipartite quantum state ρ AB is separable, then it must hold that Equivalently, if σ AB has negative eigenvalues, then ρ AB is entangled.It is based on this observation that our variational algorithm works.
To apply the framework in III, we have first to decompose R B→B into a linear combination of Pauli channels.Indeed, we can do so since where 0 ≡ (0, • • • , 0) of size n, and the second equality follows from the twirling property of Pauli channels [65, Exercise 4.7.3].Using this decomposition, we can call Algorithm 1 or Algorithm 2 to accomplish the reduction criterion.Specially, in the qubit case where n = 1, the reduction map is of the form As one might see, deterministic VED using the reduction criterion is not efficient in the multi-qubit case since it has to compute exponentially many numbers of overlaps: for a 2n-qubit bipartite quantum state, one has to compute 4 n overlaps.In Section IV E, we consider another version with better efficiency by exploring the simple structure of the reduction map (27).
On the other hand, probabilistic VED using the reduction criterion is also not efficient due to the sampling cost γ ≈ 2 n for R.This observation leads to a simple way to improve the efficiency of the probabilistic VED.For example, we introduce the trace-preserving reduction map, defined via One can check that as a positive map, R has the same entanglement detection range as the original reduction map R.
On the contrary, the sampling cost of R is γ = 1 + 1/2 n , which is exponentially smaller than that of R.This implies that probabilistic VED using the trace-preserving reduction map R is very efficient in terms of the number of samples consumed.However, the efficiency is achieved at the cost of the high precision required in estimating the minimal eigenvalue of R(ρ AB ), which decreases exponentially in n in general.We point out this is a trade off between efficiency and precision.Similar arguments can be applied to the transpose map and the enhanced reduction map discussed in the next section.

C. Enhanced reduction criterion
In this section, we consider an enhanced version of the reduction map [59,60] for bipartite quantum states.This enhanced criterion is based on an elementary positive map which operates on state spaces with even dimension.It is known that the enhanced reduction criterion detects many bound entangled states (states that satisfy the PPT criterion).As before, we first review this enhanced reduction criterion and show how to combine it with the VED framework proposed in Sec.III to detect entanglement.
Define the following anti-symmetric unitary in a n-qubit Hilbert space: where antidiag means anti-diagonal.For example, when n = 2, the corresponding anti-symmetric unitary has the form Indeed, one can check that the n-qubit U a can be decomposed w.r.t. the Pauli set as U a = X ⊗ • • • ⊗ X ⊗ iY , where there are n − 1 X operators in the tensor product.Based on U a , we define the following map [59] where R B→B is the reduction map defined in (27) and T B is the transpose map defined in (22).This map has been shown to be positive but not completely positive [59].What's more, this map improves the reduction criterion and can detect bound entangled states that cannot be detected by the PPT criterion.Substituting the Pauli decomposition (31) of R and the Pauli decomposition (26) of T B into (36) and regrouping the Pauli terms, we obtain a Pauli decomposition of K, where there is a total number of 4 n Pauli terms.Using on this decomposition, we can use VED (Algorithm 1 or Algorithm 2) to accomplish the enhanced reduction criterion.

D. Discussion on the measurement cost
Note that another way to detect and quantify entanglement of a state ρ AB is to obtain its density matrix via quantum state tomography [66].Full density matrix reconstruction of an unknown (n A +n B )-qubit state in the worst-case costs exponential copies of the state [67,68], e.g., Ω(4 n A +n B ) measurement results are necessary to reconstruct a matrix close to ρ in the sense of trace distance [68].Using the learned density matrix, we can either numerically apply a positive map on it or compute the fidelity between ρ AB and any entangled target states.However, such methods are resource-demanding compared to the VED framework.
To use the decomposed maps for entanglement detection on the state ρ AB , we can apply them either to subsystem A or to subsystem B, which requires poly(D)4 min{n A ,n B } measurement results with circuit depth D in gradient-based optimization loops.Besides the measurement cost, methods based on state tomography need vast memory to store and process the density matrix on a classical computer, which are resourcedemanding as well.The VED framework, on the other hand, doesn't require such classical memory and post-processing.

E. VED based on reduction criterion without decomposition
In Sec.IV B we have shown how VED uses the reduction criterion to detect entanglement; it works by decomposing the reduction map R into a linear combination of Pauli channels and then variationally estimate the minimal eigenvalue of the averaged output state.
Here we propose another variational entanglement detection algorithm for the reduction criterion, motivated by the simple structure of the reduction map.The intuition behind this protocol is as follows.We know that ρ AB is entangled if R B→B (ρ AB ) is not semidefinite positive.Using (1), this means that = min = min where the minimization ranges over all pure bipartite quantum states |ψ AB in system AB, ψ AB ≡ |ψ ψ| AB and ψ B := Tr A ψ AB .From Eq. ( 39), one can see that it suffices to compute the difference of two overlaps and then variationally estimate the minimal eigenvalue.The crucial point is that the number of overlaps is independent on the dimension of the n-qubit system B.This new detection method could save a large amount of computing resources when n becomes large.The improved VED based on the reduction criterion is summarized in Algorithm 3.
We remark that this idea can also be adopted to improve the efficiency of VED using the enhanced reduction criterion.
V. QUANTUM ENTANGLEMENT QUANTIFICATION One of the most well-known entanglement measure is the logarithmic negativity [69,70], which has various applications in quantum information theory.For a bipartite state ρ AB , its logarithmic negativity is defined as Based on the recently developed near-term quantum algorithm for trace distance estimation [6] and the fact that E N is defined via the transpose map T B , we introduce a variational quantum algorithm to estimate E N using an ancillary qubit system R.
According to [6, Corollary 3], it holds that where , and the maximization ranges over all unitaries on the composite system ABR.Note that the second equality follows from the fact that T B is trace-preserving.Following the idea of VED, we may decompose the transpose map T B appeared in the operator Q ABR (correspondingly, Q R ) into a linear combination of Pauli terms via ( 25) and ( 26), compute the overlaps in (42) one by one, and then variationally estimate the maximal value.For illustrative purposes, we give Algorithm 4, the Variational Logarithmic Negativity Estimation (VLNE), as an example of estimating the logarithmic negativity of a two-qubit quantum state ρ AB .However, we emphasize that method outlined in Algorithm 4 can be easily generalized to quantify multi-qubit bipartite entanglement, as the transpose operation satisfies the preferable tensor product property (26).What's more, Algorithm 4 can be modified to use the sampling technique to estimate the average state, following the idea illustrated in Algorithm 2. Algorithm 4 Variational Logarithmic Negativity Estimation 1: Input: a 2-qubit quantum state ρAB and parameterized circuits UABR(α) with initial parameters α; 2: Apply UABR(α) respectively to and obtain the states σ (0) , σ (1) , σ (2) , σ (3) , respectively.One may also evaluate the entanglement measures [71][72][73] based on the sandwiched Rényi relative entropy [74,75] of order 1/2, making use of the recently proposed variational quantum algorithm estimating the fidelity between two quantum states [6].

VI. EXPERIMENTS IN IBMQ
In this section, we discuss how to apply the VED framework to detect the two-qubit maximally entangled state |Φ := (|00 + |11 )/ √ 2 on IBM-Q superconducting quantum hardware accessible to the public.The specific quantum device used is ibmq-santiago (5 qubits) with a quantum volume of 32.The positive map adopted here for detection purpose is the qubit reduction map R B→B defined in Eq. ( 27).After implementing the decomposed reduction map by 4 Pauli terms as Eq. ( 32), we use a parametrized quantum circuit U (α) to prepare 4 identical test states ψ AB (α) = U (α)|00 00| AB U † (α) and compute the loss function defined in Eq. (13).The PQC used is depicted in Fig. 2 with three randomly initialized parameters α = (α 1 , α 2 , α 3 ).During the optimization procedure, we apply the gradient descent algorithm [76] to guide the learning process where the analytical gradient is calculated via the following parameter-shift rule [77]: Due to the finite sampling restriction for measurements, the optimization procedure essentially falls into the regime of Stochastic Gradient Descent (SGD) [55].The optimized loss values converges to L min ≈ −0.43.The gap between the experiment data and simulation result λ min = −0.5 is due to various hardware noises on the ibmq-santiago processor.One can further adopt error mitigation methods [12] to improve the result.This result proves the validity of our VED framework.Note that if we adopt the termination setup in Algorithm 1, it will require much fewer optimization iterations (4 to 5 rounds are sufficient) to obtain the detection result.As mentioned in Ref. [78], the communication bottleneck between the IBM-Q hardware and classical optimizer blocks us from efficiently conducting experiments without any specified reservation.This leads to a 9-minutes waiting time on average for each circuit evaluation from the IBM-Q cloud service.As a comparison, we conduct numerical simulations on Quantum Leaf platform and receive a similar result by repeating the simulation on qiskit-Aer simulator.We summarize the experimental and numerical results in Fig. 3. Quleaf simulator [79].Learning rate in the gradient descent algorithm is set to be LR = 0.5.

VII. NUMERICAL SIMULATIONS
In this section, we carry out numerical simulations that apply VED to detect a variety of bipartite quantum states of interest to investigate the performance of VED and its motivated entanglement quantification algorithm.All simulations, including optimization loops, are conducted using the Paddle Quantum [80] toolkit on the PaddlePaddle Deep Learning Platform [81,82].

A. Entanglement detection
For the entanglement detection purpose, we adopt the circuit ansatz shown in Fig. 4 to prepare the test state |ψ AB .It consists of parameterized single-qubit gates U 3 (θ, φ, ϕ) = R z (φ)R y (θ)R z (ϕ) and circular layers of CNOT gates.Note that this ansatz can be easily generalized to multi-qubit case.

Four-qubit isotropic states
The four-qubit isotropic state family is defined as [83, Eq. ( 32)] where p ∈ [0, 1] is a parameter, Φ AB is the four-qubit maximally entangled state, and I AB is the identity operator in AB in which A ≡ A We numerically carry out Algorithm 1 together with the three prominent positive maps-the PPT criterion, the reduction criterion, and the enhanced reduction criterionintroduced in Sec.IV, using four-qubit isotropic states as inputs.The minimized loss values of these three maps obtained by our simulations on the isotropic states are represented by different markers in Fig. 5.As can be seen from this figure, VED can successfully identify the range of p for which the corresponding isotropic state can be detected by each positive map.The markers representing results from simulations fall on the lines that give the minimums of the loss function L(α), verifying the validity and viability of our VED framework.Note that for detecting entanglement in four-qubit isotropic states, all three maps are both necessary and sufficient.However, this phenomenon is not universal for all four-qubit states, as we shall see in the experiment using Breuer states.FIG.5: Numerical results on the four-qubit isotropic states defined in (48).Each line depicts the smallest eigenvalue of every isotropic state with parameter p ∈ [0, 1] under the corresponding map.This line of the smallest eigenvalues is a lower bound of the loss function L(α).Each marker depicts the minimized loss value obtained by simulations (sim) of Algorithm 1 on a chosen isotropic state, aligning with the theoretical line.

Four-qubit Breuer states
As we have mentioned in Sec.IV C, there are states that can be detected by the enhanced reduction criterion yet cannot be detected by the PPT criterion.In this section, we use the proposed VED framework to numerically consolidate this statement.The four-qubit Breuer state family is defined as [59, Eq. ( 7)] where λ ∈ Following the same line of the case of the isotropic state, we carry out Algorithm 1 on the three criteria using four-qubit Breuer states as inputs.The minimized loss values obtained by our simulations on selected Breuer states are represented in Fig. 6 by markers, which again aligns with the theoretical lines.From the numeric results, we can see that while the enhanced reduction criterion is sill necessary and sufficient for entanglement detection in the four-qubit Breuer states, neither the reduction criterion nor the PPT criterion can detect all entangled states in the Breuer state family, attesting the advantage of the enhanced reduction criterion in this case.FIG. 6: Numerical results on the four-qubit Breuer states defined in (49).Each line depicts the smallest eigenvalue of every Breuer state with parameter p ∈ [0, 1] under the corresponding map.This line of the smallest eigenvalues is a lower bound of the loss function L(α).Each marker depicts the minimized loss value obtained by simulations (sim) of Algorithm 1 on Breuer state, aligning with the theoretical line.

B. Logarithmic negativity estimation
For simulations of variational entanglement quantification with logarithmic negativity, we adopt the hardware efficient ansatz used for trace distance estimation in [6] where the circuit depth is 4. The simulations are carried out on two-qubit isotropic states, which is defined as ρ iso AB (p) := pΦ AB + (1 − p) where Φ AB is the two-qubit maximally entangled state.As shown in Fig. 7, the logarithmic negativity of a two-qubit isotropic state is positive if and only if its parameter p > 1/3, which matches the range of p where the corresponding isotropic states are entangled.The estimated logarithmic negativities by our method, which are represented by markers in Fig. 7, agree with the precisely calculated values given by the blue line.

VIII. CONCLUSION AND OUTLOOK
In this work, we combined two novel techniques that find crucial applications in the NISQ quantum devices, the variational quantum algorithms and the quasi-probability decomposition method, to propose the Variational Entanglement Detection (VED) and Variational Logarithmic Negativity Estimation (VLNE) frameworks, contributing feasible solutions to detect and quantify entanglement on near-term devices.VED is built upon the positive map criterion and works as follows.Firstly, it decomposes a chosen positive map into a linear combination of NISQ implementable quantum operations.Then, it variationally estimates the minimal eigenvalue of the output state of some positive map acting on the target bipartite state.Two methods are proposed to generate the output state: the first one averaged the output states according to the quasi-probability distribution; the second one estimated the average via the sampling technique.At last, it asserts that the target state is entangled if the optimized minimal eigenvalue is negative, guaranteed by the positive map criterion.We elaborated three well-known positive maps to illustrate how the VED framework is applied.Following the idea of VED, VLNE variationally computes the log-negativity entanglement measure, relying on a linear decomposition of the transpose map into Pauli terms and the recently proposed trace distance estimation algorithm.Experimental and numerical results on various bipartite states of interest have validated the proposed entanglement detection and quantification methods.
We expect that the VED framework can be upgraded to detect more entangled states.A crucial step towards this aim is to explore what kind of positive maps can be decomposed into a linear combination of Pauli channels.In Sec.V we showed by case how to variationally compute the log-negativity entanglement measure.It would be meaningful to design novel quantum algorithms to estimate other distance-based entanglement measures [72,[84][85][86][87].

FIG. 3 :
FIG.3:Estimated λmin by VED using the reduction criterion on the Bell state |Φ .The red curve records the results from ibmq-santiago with shots = 8192 for each circuit evaluation.The blue curve records the simulation results on Quantum Leaf platform using the Baidu Quleaf simulator[79].Learning rate in the gradient descent algorithm is set to be LR = 0.5.

FIG. 7 :
FIG. 7: Numerical results on the two-qubit isotropic states.The blue line represents the precisely calculated logarithmic negativity of isotropic states with parameter p ∈ [0, 1].The yellow markers depict the estimated logarithmic negativity by simulations of Algorithm 4 on selected isotropic states.
1 A 2 and B ≡ B 1 B 2 .The qubit systems A 1 and A 2 are at Alice's hand, while the qubit systems B 1 and B 2 are at Bob's hand.Intuitively, the isotropic state is a convex combination of the maximally entangled state Φ AB and the maximally mixed state I AB /16.It has been shown that ρ iso AB (p) is separable (w.r.t. the A:B cut) if and only if p ≤ 1/5 [83].
[59]B ≡ B 1 B 2 .The qubit systems A 1 and A 2 are at Alice's hand while the qubit systems B 1 and B 2 are at Bob's hand.It has been shown that ρ Breuer is separable (w.r.t. the A:B cut) if and only if λ = 0 and can be detected by the enhanced reduction criterion[59].On the other hand, it has positive partial transpose if and only if λ ≤ 1/6[59], witnessing the power of the enhanced reduction criterion.