Abstract
Quantum entanglement is essential to the development of quantum computation, communications, and technology. The controlled SWAP test, widely used for state comparison, can be adapted to an efficient and useful test for entanglement of a pure state. Here we show that the test can evidence the presence of entanglement (and further, genuine n-qubit entanglement), can distinguish entanglement classes, and that the concurrence of a two-qubit state is related to the test's output probabilities. We also propose a multipartite measure of entanglement that acts similarly for n-qubit states. The average number of copies of the test state required to detect entanglement decreases for larger systems, to four on average for many (n ≳ 8) qubits for maximally entangled states. For non-maximally entangled states, the number of copies required to detect entanglement increases with decreasing entanglement. Furthermore, the results are robust to second order when typical small errors are introduced to the state under investigation.
Export citation and abstract BibTeX RIS
Original content from this work may be used under the terms of the Creative Commons Attribution 4.0 licence. Any further distribution of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI.
1. Introduction
Quantum entanglement is an essential resource for obtaining a quantum advantage in communications [15, 37], metrology [10, 42], imaging [1, 32], and computation [8, 13, 34]. Quantum teleportation [9] uses pre-shared entanglement to transfer an unknown quantum state from one location to another using only classical channels. It provides a fundamental primitive for quantum information processing. Teleportation has been realised optically [17, 46] and with ion traps [41], as approaches towards distributed quantum computation [5].
In general, the amount of entanglement in a state determines its usefulness. For example, information can only be teleported perfectly by maximally entangled states [43], which are necessarily pure. The current widely-used method for experimentally determining entanglement, quantum state tomography, does not scale well with an increasing number n of qubits [6]. This makes practical alternative tests of interest. In this paper, we investigate a method for detecting entanglement and quantifying the amount of entanglement in a multipartite pure state: the controlled SWAP test.
The controlled SWAP test for entanglement discussed here is an adapted version of the widely used controlled SWAP test for state comparison, which determines whether a pair of states are inequivalent, and requires only a single application of the test to achieve this. This elegance can be applied to the detection and quantification of entanglement in a state, and so is promising as a more efficient alternative to quantum state tomography. The controlled SWAP test for entanglement was first introduced in [7], and then used by Gutowski et al [23] to prove a series of computational complexity results, by using repeated applications of the controlled SWAP test for entanglement as a product state test. Although detecting entanglement can be done efficiently, the inverse problem—determining whether a given state is a separable, i.e., a product state—is NP-HARD [22]. Our purpose in this paper is practical: to determine the conditions under which the controlled SWAP test for entanglement is likely to be experimentally useful.
The paper is laid out as follows. First, pure state entanglement and its measures are introduced in section 2. The controlled SWAP test for state comparison is then explained in section 2.2, leading on to its adaptation to the controlled SWAP test for entanglement in section 3. Then in section 4.1, we present the outcomes of the test for a range of pure states, and the corresponding results in terms of a multipartite measure of entanglement in section 4.2. The efficiency of the test for these various states is considered in section 4.3, and finally several typical error scenarios are investigated in section 5.
2. Background
With a normalised superposition of the single qubit computational basis states and
with , the probabilities of measuring outcomes 0 and 1 follow respectively from and . Using the notation with i, j ∈ {0, 1} for the basis states of multiple qubit systems, a general two-qubit state takes the form [33]
with and normalisation ∑i,j |Aij |2 = 1.
A composite system is in an entangled state if it cannot be written as a product state for its component systems, i.e. for any pure states , . The concurrence [44]
is a measure of two-qubit entanglement, with 0 ⩽ C2 ⩽ 1, so a separable or 'product' state has C2 = 0 and a maximally entangled state has C2 = 1. There are many other measures of entanglement which quantify the amount of entanglement in a state, though for bipartite pure states they can all be shown to be equivalent to the entropy of the subsystems [35].
For two qubit states, concurrence is simpler to calculate, so more convenient for our work. More generally, an entanglement measure has to satisfy certain properties, such as not increasing on average under local operations and classical communication (LOCC) [33]. In essence, it must be true that [40]
where ɛ is an entanglement measure, j refers to the outcomes of a local measurement, and pj the probability of these outcomes.
For two qubit entangled states, the possibilities are straightforward. There are four orthogonal maximally entangled two-qubit states [33, 38], known as the Bell states:
Under reversible LOCC, Bell states can be transformed into one another, but cannot be transformed into a state with less than maximal entanglement. Bell states are therefore considered equivalent to one another and form a unique class of maximally entangled two-qubit states.
For systems with more than two qubits, there are multiple distinct classes of entanglement, based on whether the states can be transformed into each other under reversible LOCC. Within each class, there is a subset of maximally entangled states. For example, for three qubits, there are two types of pure entangled states, GHZ [12] and W states, which are inequivalent under reversible LOCC. For more qubits, GHZ and W states naturally generalise, alongside further distinct types of entangled states. In the computational basis for n qubits where n ⩾ 3, the maximally entangled GHZ and W states are [14]
where we have introduced the notation for n qubits all in state . Under reversible LOCC, GHZ and W states remain maximally entangled within their respective classes. However, GHZ states are considered more entangled than W states, based on various pure state entanglement measures; while W states are more robust, as loss or measurement of some qubits can still leave an entangled state of the remainder [14]. In this paper, we focus on these two types of entangled states, which are of particular interest due to their applications in quantum computing [12, 27, 29].
Reversible (unitary) transformations of quantum states can be represented as quantum gates, the model used in this paper. An important and relevant single-qubit example is the Hadamard gate H [33]:
Multi-qubit gates of relevance include the two-qubit CNOT gate which flips the target qubit only if the control qubit is . It can be represented by the matrix
where the first qubit is the control and the second the target. The three-qubit Toffoli gate has two controls and one target: the target qubit is flipped only if both the controls are . It has the matrix
where the first two qubits are the controls.
2.1. Experimentally determining entanglement
The most commonly used method for determining entanglement is quantum state tomography. Quantum state tomography builds a system's density matrix entry by entry in order to derive its entanglement. A large ensemble of identical states is prepared to carry out the required number of measurements [2, 4, 28]. The density matrix grows exponentially with the system size and so this method becomes unfavourable for large systems. For an n-qubit state, the number of measurements required is typically [2, 6] in the order of 3n .
If only the entanglement of the system is of interest, there are alternative methods that are arguably more efficient. Entanglement witnesses are functionals of a state's density matrix that can be directly measured and determine whether a state is entangled. To obtain the witness of an n-qubit state, as few as 2n − 1 measurements are required. However, the witness must be optimised for the state, and so this is not a general method [19, 24, 39].
Many attempts have been made to improve upon the above methods in terms of efficiency and generality. The experiment in Walborn et al [38] determines how entangled two-qubit states are by measuring only the final polarisation. This method is able to detect and distinguish Bell states; the probability of measuring the Bell state is then related to the concurrence to quantify the entanglement. Thousands of measurements are needed to achieve sufficient statistics. Theory extending this method to any number of qubits is provided by Harrow and Montanaro [26]. Further proposals include Ekert et al [16] which is also based on the controlled SWAP test for state comparison, and Amaro et al [3] which is an improved witness-based method.
2.2. The controlled SWAP test for equivalence
The controlled SWAP test for equivalence is a widely applied method for determining whether two given pure n-qubit states and are equivalent, detailed in [11] and its optical implementation in [7]. The circuit for this procedure can be seen in figure 1(a). Three states are required, with the initial composite state . A Hadamard gate is applied to the control qubit C, followed by a controlled-SWAP gate on the two test states A and B, controlled on the single qubit [7, 18, 20]. The SWAP gate is applied according to the state at the control qubit C: if there is no change, whereas will result in the states of A and B being swapped [18]. In the case of a single qubit state comparison, the SWAP gate is composed of two CNOT gates [33] and a Toffoli gate [33], as shown in figure 1(b) [7, 30].
Finally, another Hadamard gate is applied to the control qubit. The resulting composite state is then
It is clear that if , the control qubit will be in with absolute certainty. Measuring the control qubit in therefore proves that the two states A and B are inequivalent. If the two states are identical, confidence of this outcome is increased by repeating the test and obtaining multiple measurements of with no measurements of [7, 18, 20].
3. The controlled SWAP test for entanglement
The controlled SWAP (c-SWAP) test for state comparison can be modified to instead test for entanglement. This is outlined for the two-qubit state case in van Dam et al [7], along with a potential optical setup. Harrow and Montanaro [25] discuss multiple applications of the c-SWAP test as a product-state test, proving its correctness for all numbers of qubits and its optimal soundness. Following this, Gutoski et al [23] prove the product-state c-SWAP test is a complete problem for the complexity class BQP. This section details the theory of the c-SWAP test for entanglement.
The quantum circuit used for state comparison, figure 1, is adapted to figure 2. Two copies of the state to be tested for entanglement are required, labelled and , and several control qubits—one control qubit for each qubit in the test state. Figure 2(a) shows the quantum circuit for the simplest case, a two qubit entangled state. Initially, the control state is in . The two Hadamard gates and the SWAP gate act on each qubit in the control state. The SWAP gate is applied to the corresponding qubits in the test states such that the ith qubits in the test and copy states are swapped with one another if the ith qubit in the control is . The initial composite state is
Download figure:
Standard image High-resolution imagePassing this system through the entire test in figure 2 gives the final result
Ideally, the copy state is an exact copy of the test state. In this case, the above equation reduces to
and so the probability of the control being in or is zero. This expression can in fact be written in terms of the concurrence C2 (as given by equation (2)):
with the ±s being + in the case that A00 A11 > A01 A10 and − if A00 A11 < A01 A10. If the system is in a product state then C2 = 0; applying this to the above equation gives
and so the control state is with certainty. Any measurement of for the control qubits therefore proves a non-zero concurrence, and evidences the presence of entanglement [7] in state .
Note that if the test state is a product state, and only then, the final state is the same as the initial state. In this case, the test is non-destructive and so the output state can be used as an input state in the next test iteration.
To expand the setup to any number of qubits n, the test simply requires n control qubits, as shown in figure 2(b). The summation notation above as derived by [7] demonstrates that certain outcomes of the control state evidence entanglement in the test state. However, fully investigating the capability of the c-SWAP test requires the derivation of the expanded resulting state, which we discuss in the next section.
4. The controlled SWAP test on ideal states
We have analytically derived the final probability distributions in the control state for the most general pure two-qubit and three-qubit test states. The final expressions are quite lengthy, and are given in appendices
4.1. Bell, GHZ, and W states
If the test state is a product state, then only will be measured for any qubit in the control state. In the ideal case, where the copy state is an exact copy of the test state (unequal copy states are investigated in section 5.2), a measurement of any number of s in the control evidences the presence of entanglement. These states, with one or more s, that provide evidence of entanglement we call entanglement signatures.
If the test state is a Bell state and the copy state is an exact copy, for example from equation (4), the resulting probability distribution in the control state is:
As seen in section 3, any measurement of evidences some amount of entanglement for any two-qubit state. Therefore this is the entanglement signature for all two-qubit systems.
When as in equation (5), the probability results in the control state are
where n is the number of qubits in the test state. All other states have zero probability. The states are the entanglement signatures for any GHZ-like state. The GHZn probability results are unique within each n.
When as in equation (6), the probability expressions in terms of n are
with as the entanglement signatures for W-like states. For n = 2, the equations for both GHZ and W reduce to those for Bell states, and so for much of the paper we only consider Bell states as the GHZ/W n = 2 case.
As seen in figure 3, the probability of measuring and the entanglement signatures each converge to as n increases, for both maximally entangled cases. The entanglement signature probabilities are always greater for GHZ states than for W states, and as n increases so does the signature probability. This suggests that the entanglement signature probabilities are related to the amount of entanglement in the test states.
Download figure:
Standard image High-resolution image4.2. Quantifying the amount of entanglement
If , the two-qubit probability expressions in terms of the concurrence C2 from equation (2) are
Therefore, if the control state's probability distribution is obtained (from repeats of the c-SWAP test), these results can be used to calculate the concurrence.
Exploration of the results of the c-SWAP test for a range of example states leads us to propose a more general expression for the amount of multipartite entanglement Cn :
which is consistent with two-qubit concurrence from equation (2). Cn therefore has a range of , with the upper limit tending to as n → ∞. Figure 4 shows the behaviour of this expression Cn for the GHZn and Wn states. As expected, the W state has a value of Cn consistently lower than that of a GHZ state. As n approaches infinity the Cn of both W states and GHZ states tends to , but at a lower rate (as a function of n) in the W case.
Download figure:
Standard image High-resolution imageAs previously discussed, a valid measure of entanglement must satisfy the equation (3) for any state, i.e.:
for any . It is trivial to prove that this condition is satisfied for all W-like states (the probability expressions of which are shown in appendix (C.3)), and of course all GHZ-like states (because measuring a single qubit destroys all GHZ-like entanglement). From the results in appendix
4.3. Efficiency
The resource we will be considering as an indicator of efficiency is the number of copies of the test state required for the test. If the operator of the test is only interested in detecting some entanglement in the test state (without obtaining knowledge of the amount, or whether it is genuine n-qubit entanglement), only one entanglement signature needs to be detected. It is straightforward to calculate the average number of iterations of the test, and therefore the average number of copies, required to reveal the first entanglement signature. The expected number of copies is simply
Therefore, the less entangled the state, the lower the entanglement signature probability, and the higher the number of measurements required. This can be illustrated in terms of proposed measure of entanglement Cn from equation (16):
shown in figure 5. This expression depends on n only through Cn , which for a maximally entangled state increases with increasing n from a value of one for n = 2 towards an upper bound of . Thus, for maximally entangled states, entanglement can be detected on average with eight copies or fewer. With increasing level of entanglement, the expected number of copies decreases at a rate inversely proportional to the square of Cn ; as such, there is a large range of Cn for which the expected number of copies is reasonably low.
Download figure:
Standard image High-resolution imageAlso plotted in figure 5 are the values of E(Y) = 3n , the minimum number of copies required for quantum state tomography. This figure therefore illustrates the range of Cn of a given n-qubit state for which the c-SWAP test requires less copies (on average) than quantum state tomography: (the upper bound of which is Cn 's absolute maximum). For example, 0.31 < C4 ⩽ 1.32 for four-qubit states and 0.18 < C5 ⩽ 1.37 for five-qubit states. When evidencing entanglement, there is a large regime in which the c-SWAP test outperforms quantum state tomography in terms of required number of copies. This is especially true for large systems, where for almost any amount of entanglement the c-SWAP test would be more suited than quantum state tomography.
However, if knowledge that the test state is genuinely n-qubit entangled is required then the required number of copies increases. Instead of detecting any one entanglement signature, one more than the total number of entanglement signatures for the (n − 1)-qubit case must be observed. Therefore the expected number of copies are . Example values for x(n) are:
and the respective plots of En (no. of copies) are shown in figure 6(b). The GHZ state and W state cases are shown in figure 6(a). The scaling with both n and Cn is not favourable. However, the values of E(no. of copies) for quantum state tomography have again been plotted and there is a regime where the number of copies required for the c-SWAP test are less than 3n , for states with high entanglement and less than five qubits. Therefore, carrying out this more detailed c-SWAP test is still favourable for highly entangled small systems.
Download figure:
Standard image High-resolution image5. Robustness against errors
To examine the robustness of the c-SWAP test we consider a range of possible errors. Clearly, it is possible that the pure state supplied is not exactly as expected. One typical example of this is that errors in the test and copy state could occur as errors in their existing non-zero amplitudes, which will be referred to as unbalanced. Another typical error could be an additional non-zero amplitude introduced into the state, referred to as corrupted. Furthermore, a quantum state can also interact (entangle) with its environment and through this suffers a level of decoherence. For example, dephasing, energy dissipation, and scattering all cause decoherence, which from an ensemble perspective introduces mixture (and non-zero entropy). From a state perspective, errors in the state amplitudes arise [33]. In this example it may be that only the copy state contains error and so the test state and copy state are not equivalent, which we refer to as unequal, as would be expected from sampling a mixed ensemble. Here we also investigate an example unequal case, where the copy state is unbalanced but the test state is not.
5.1. Unbalanced
Our first example of error is to vary the amplitudes of otherwise maximally entangled states. Consider an unbalanced n-qubit GHZ state:
The c-SWAP test results therefore are
which are shown in figure 7(a) (as well as the unbalanced Bell state which is the n = 2 case). The error introduced by a small non-zero value of δ is . The n dependence goes to zero exponentially, so the leading order is independent of n. Therefore the error is approximately 2δ2 for small delta and so in this case the test is robust, by which we mean that the leading order is δ2, as opposed to δ.
Download figure:
Standard image High-resolution imageAn unbalanced GHZ3 state can replicate the probability results given by a W3 state. This happens in the above parametisation when , i.e.
This requires amplitude percentage errors of 15% and 18%, a large margin of error. If necessary this uncertainty can be overcome by measuring one qubit and then applying the two-qubit c-SWAP test to the remaining state, to detect any remaining entanglement. The result would always be zero for an unbalanced GHZ3 but not for a W3 state. This 'mimic' case is only possible with three-qubit states.
Consider an unbalanced W state with error introduced to one amplitude and the compensating error spread across the remaining amplitudes:
This gives
shown in figure 7(b). For small δ, the error . The n-dependence tends to zero with increasing n. Unlike the GHZ case, there is no term independent of n and so for large n there is very little variation in probability for any δ.
5.2. Unequal
While the c-SWAP test requires two copies of the test state, it may be that the two generated states are not equivalent () if these are drawn from a mixed ensemble.
Consider the error case (or in the n = 2 case) and
giving:
shown in figure 8(a). Any measurement of an odd number of s in the control therefore demonstrates that the test state and copy state are not equivalent.
Download figure:
Standard image High-resolution imageThis is similar to the c-SWAP test for equivalence from section 2.2, where any measurement of in the control qubit demonstrates the two test states are inequivalent. The equivalency c-SWAP test applied to the same test states from equation (19) that we have just considered for the entanglement c-SWAP gives the resulting probability of measuring (and therefore certainty of inequivalence) as:
which with small δ approximates to . This is in fact less robust than the entanglement test, the errors for which are all second order: for small δ, the errors satisfy , , and .
Interestingly, the unequal states signature probability, , has no n-dependence. Where it is present, the n-dependence again is confined to the coefficients and the error tend to zero exponentially with n. As its error has no term independent of n, tends to for large systems and so cannot be used as indicator of large error. and however always vary with δ.
Similarly, for the W case can be investigated where and
This gives:
shown in figure 8(b). For small δ, and . The leading order errors vanish inversely with increasing n2.
5.3. Corrupted
Another source of error is to 'corrupt' an entangled state by introducing an additional non-zero amplitude. The following cases assume the test state and copy state are exact copies. The case
gives:
shown in figure 9(a). For small δ, the error is and so again the errors tend to zero exponentially with n. Unlike the other GHZ examples, the individual signature probabilities are not equal to one another. The probabilities for states ending with s and those ending with s have different values, with the former independent of n. This is due to the final in the additional state and alternative 'extra' states give different individual probabilities.
Download figure:
Standard image High-resolution imageUnlike the GHZ case, the corrupted W state results depend on which state is added. For example if
then
shown in figure 9(b). For small δ the errors are . The leading order is therefore independent of n, with the n dependence tending to zero inversely with n.
6. Summary and conclusions
Entanglement is essential for quantum information processes such as quantum teleportation. The controlled SWAP test is a proposed method to detect and quantify entanglement for any n-qubit pure state. We have investigated when it is practical to use and potentially more efficient than quantum state tomography. In terms of the required number of copies of the test state, the c-SWAP test for entanglement is more efficient for detecting entanglement for almost all states except two-qubit states. The average number of copies required to detect the presence of entanglement can be as low as four for larger high fidelity maximally entangled states. For perfect Bell states, it typically requires eight copies, and for states that are not maximally entangled it can rise to a thousand or more, with more copies required the less entangled the state is. The number of qubits n in the state has considerably less effect on this value, which in fact decreases with increasing n, and so the number of copies scales extremely well with system size. Detecting genuine n-qubit entanglement is more involved, and scales far less favourably with both n and the amount of entanglement, but is feasible for small numbers of qubits.
It should be noted that the short gate sequence required for the c-SWAP test for entanglement is more complicated than the single qubit rotations typically [2] required for quantum state tomography. Especially for linear optics [31], additional ancillary resources are needed if a probabilistic set up is used, to teleport in the gates, for example [9, 21]. In other settings however, for example Rydberg atomic qubits [36], the long range interactions may facilitate the multi-qubit Toffoli gates [45], making the c-SWAP test more viable.
The test is also able to distinguish classes of entanglement in almost all cases (there is one case of three qubits for which the test is fooled, but this requires 18% amplitude error in the generated state). The results from a two-qubit test state are directly related to the concurrence of the state. Further, a multipartite measure of entanglement has been constructed that is given by any state's c-SWAP test results. Hence, the c-SWAP test can be used to estimate amount of entanglement in the test state, though only suited to achieving this with small highly entangled systems.
The suitability of the entanglement SWAP test for experimental implementation is highlighted by the fact that various typical small deviations from ideal states all give second order errors for any number of qubits. This favourable error dependence allows the entanglement to be estimated accurately in a practical set up.
Future work, beyond the results reported here, could investigate in more detail the application of the controlled SWAP test to mixed states and other types of entangled states (qudits, coherent states). This would expand on our consideration of corrupted, unbalanced, and unequal test and copy states, and provide further information to support the practical application of the c-SWAP test for entanglement.
Acknowledgments
We thank Adam Callison for help creating the figures. SF is supported by a UK EPSRC funded DTG studentship project reference 2210204.
Data availability statement
The data that support the findings of this study are available upon reasonable request from the authors.
Appendix A.: Two-qubit probability results
Appendix B.: Three-qubit probability results
For completely general test states where :
For general GHZ-like test states where , and :
For general W-like test states where , and :
Appendix C.: n-qubit probability results
For general unbalanced GHZ case :
For general unbalanced W case :
For general GHZ-like states where , and :
For general W-like states where , , :
and the individual probabilities are:
, .