Brought to you by:
Paper The following article is Open access

The controlled SWAP test for determining quantum entanglement

, and

Published 1 April 2021 © 2021 The Author(s). Published by IOP Publishing Ltd
, , Citation Steph Foulds et al 2021 Quantum Sci. Technol. 6 035002 DOI 10.1088/2058-9565/abe458

2058-9565/6/3/035002

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 $\left\vert {\psi }_{1}\right\rangle $ a normalised superposition of the single qubit computational basis states $\left\vert 0\right\rangle $ and $\left\vert 1\right\rangle $

with ${A}_{0},{A}_{1}\in \mathbb{C}$, the probabilities of measuring outcomes 0 and 1 follow respectively from $P\left(\left\vert 0\right\rangle \right)={\vert {A}_{0}\vert }^{2}$ and $P\left(\left\vert 1\right\rangle \right)={\vert {A}_{1}\vert }^{2}$. Using the notation $\left\vert i\right\rangle \left\vert j\right\rangle =\left\vert ij\right\rangle $ with i, j ∈ {0, 1} for the basis states of multiple qubit systems, a general two-qubit state takes the form [33]

Equation (1)

with ${A}_{ij}\in \mathbb{C}$ and normalisation ∑i,j |Aij |2 = 1.

A composite system $\left\vert {\psi }_{2}\right\rangle $ is in an entangled state if it cannot be written as a product state for its component systems, i.e. $\left\vert {\psi }_{2}\right\rangle \ne \left\vert {\psi }_{1}\right\rangle \left\vert {\phi }_{1}\right\rangle $ for any pure states $\left\vert {\psi }_{1}\right\rangle $, $\left\vert {\phi }_{1}\right\rangle $. The concurrence [44]

Equation (2)

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]

Equation (3)

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:

Equation (4)

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]

Equation (5)

Equation (6)

where we have introduced the notation ${\left\vert 0\right\rangle }^{n}$ for n qubits all in state $\left\vert 0\right\rangle $. 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]:

Equation (7)

Multi-qubit gates of relevance include the two-qubit CNOT gate which flips the target qubit only if the control qubit is $\left\vert 1\right\rangle $. It can be represented by the matrix

Equation (8)

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 $\left\vert 1\right\rangle $. It has the matrix

Equation (9)

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 $\left\vert {{\Psi}}^{-}\right\rangle $ 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 $\left\vert \psi \right\rangle $ and $\left\vert \phi \right\rangle $ 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 $\left\vert {\Psi}\right\rangle ={\left\vert \psi \right\rangle }_{A}{\left\vert \phi \right\rangle }_{B}{\left\vert 0\right\rangle }_{C}$. 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 $\left\vert C\right\rangle ={\left\vert 0\right\rangle }_{C}$ there is no change, whereas ${\left\vert 1\right\rangle }_{C}$ 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].

Figure 1.

Figure 1. The quantum circuit for an equivalency SWAP test on the two states $\left\vert \psi \right\rangle $ and $\left\vert \phi \right\rangle $. H is a Hadamard gate from equation (7). (a) The SWAP gate swaps all qubits in the test states on the condition that the control qubit is in state $\left\vert 1\right\rangle $. (b) Shows the SWAP gate broken down into individual gates for the one-qubit test state case. The central gate, shown in red, is a Toffoli gate from equation (9) and the two gates either side in blue are CNOT gates from equation (8), where the crossed circles are controlled on the dots. The final CNOT gate—not necessary for the test outcome—returns the system to its initial state in the case of equivalent states.

Standard image High-resolution image

Finally, another Hadamard gate is applied to the control qubit. The resulting composite state is then

It is clear that if $\left\vert \phi \right\rangle =\left\vert \psi \right\rangle $, the control qubit will be in ${\left\vert 0\right\rangle }_{C}$ with absolute certainty. Measuring the control qubit in ${\left\vert 1\right\rangle }_{C}$ 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 ${\left\vert 0\right\rangle }_{C}$ with no measurements of ${\left\vert 1\right\rangle }_{C}$ [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 ${\left\vert A\right\rangle }_{A}$ and ${\left\vert B\right\rangle }_{B}$, 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 ${\left\vert 00\right\rangle }_{C}$. 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 ${\left\vert 1\right\rangle }_{C}$. The initial composite state is

Figure 2.

Figure 2. The quantum circuit used to carry out an SWAP test for entanglement on test state $\left\vert A\right\rangle $ and copy state $\left\vert B\right\rangle $. H denotes a Hadamard gate. Initially, $\left\vert C\right\rangle ={\left\vert 0\right\rangle }_{C}^{n}$. (a) Shows the SWAP gate broken down into individual gates in the case of a two-qubit test state, composed of CNOT gates and Toffoli gates. The final two CNOT gates are to return the test and copy states to their original states (in some cases) and so are optional. (b) Shows the circuit for an n-qubit test state in compact form.

Standard image High-resolution image

Passing 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 ${\left\vert 01\right\rangle }_{C}$ or ${\left\vert 01\right\rangle }_{C}$ is zero. This expression can in fact be written in terms of the concurrence C2 (as given by equation (2)):

Equation (10)

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

Equation (11)

and so the control state is ${\left\vert 00\right\rangle }_{C}$ with certainty. Any measurement of $\left\vert 11\right\rangle $ for the control qubits therefore proves a non-zero concurrence, and evidences the presence of entanglement [7] in state $\left\vert A\right\rangle $.

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 A and B respectively. Specialising to more symmetric classes of states, for which these expressions simplify, we then extrapolated the probability expressions to those for n-qubit states, verified these by computation up to six qubits for non-symmetric test states, and to eight qubits for symmetric test states. In this section, we present the results for GHZ and W states, discuss their relationship to the amount of entanglement in the test state, and investigate the resource efficiency of the test.

4.1. Bell, GHZ, and W states

If the test state is a product state, then only $\left\vert 0\right\rangle $ 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 $\left\vert 1\right\rangle $s in the control evidences the presence of entanglement. These states, with one or more $\left\vert 1\right\rangle $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 $\left\vert A\right\rangle =\left\vert B\right\rangle =\left\vert {{\Psi}}^{+}\right\rangle $ from equation (4), the resulting probability distribution in the control state is:

Equation (12)

As seen in section 3, any measurement of ${\left\vert 11\right\rangle }_{C}$ evidences some amount of entanglement for any two-qubit state. Therefore this is the entanglement signature for all two-qubit systems.

When $\left\vert A\right\rangle =\left\vert B\right\rangle =\left\vert {\text{GHZ}}_{n}\right\rangle $ as in equation (5), the probability results in the control state are

Equation (13)

where n is the number of qubits in the test state. All other states have zero probability. The states ${\left\vert \text{even}\;\text{no.}\;\text{of}\;1\text{s}\right\rangle }_{C}$ are the entanglement signatures for any GHZ-like state. The GHZn probability results are unique within each n.

When $\left\vert A\right\rangle =\left\vert B\right\rangle =\left\vert {\text{W}}_{n}\right\rangle $ as in equation (6), the probability expressions in terms of n are

Equation (14)

with ${\left\vert \text{exactly}\;\text{two}\;1\text{s}\right\rangle }_{C}$ 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 ${\left\vert 0\right\rangle }_{C}^{n}$ and the entanglement signatures each converge to $\frac{1}{2}$ 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.

Figure 3.

Figure 3. The probability results for maximally entangled GHZ and W states for increasing number of qubits n. P0 refers to $P\left({\left\vert 0\right\rangle }_{C}^{n}\right)$, Peven to $P\left({\left\vert \text{even}\;\text{no.}\;\text{of}\;1\text{s}\right\rangle }_{C}^{n}\right)$, and Ptwo to $P\left({\left\vert \text{exactly}\;\text{two}\;1\text{s}\right\rangle }_{C}^{n}\right)$.

Standard image High-resolution image

4.2. Quantifying the amount of entanglement

If $\left\vert A\right\rangle =\left\vert B\right\rangle $, the two-qubit probability expressions in terms of the concurrence C2 from equation (2) are

Equation (15)

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 :

Equation (16)

which is consistent with two-qubit concurrence from equation (2). Cn therefore has a range of $0{\leqslant}{C}_{n}{\leqslant}2{\left(\frac{1}{2}-\frac{1}{{2}^{n}}\right)}^{\frac{1}{2}}$, with the upper limit tending to $\sqrt{2}$ 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 $\sqrt{2}$, but at a lower rate (as a function of n) in the W case.

Figure 4.

Figure 4. The value of Cn from equation (16) against number of qubits for the GHZ state from equation (5) and W state from equation (6).

Standard image High-resolution image

As previously discussed, a valid measure of entanglement must satisfy the equation (3) for any state, i.e.:

for any $\left\vert \psi \right\rangle $. 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 B we have shown computationally that this condition is satisfied for any three-qubit pure state, and we thus conjecture that it is true for any n-qubit pure state.

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 $\sqrt{2}$. 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.

Figure 5.

Figure 5. The expected number of copies against the amount of entanglement Cn to find any entanglement in n-qubit test states. The vertical line segments show the upper limit of Cn for each n. The crosses show the crossover points where the number of copies equal 3n , the quantum state tomography minimum scaling. Therefore those values of Cn between each coloured cross and the vertical line segment of the same colour represent the regime for each n (colour) under which the c-SWAP test is more favourable than quantum state tomography.

Standard image High-resolution image

Also 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: ${\left(\frac{8}{{3}^{n}}\right)}^{\frac{1}{2}}{< }{C}_{n}{\leqslant}2{\left(\frac{1}{2}-\frac{1}{{2}^{n}}\right)}^{\frac{1}{2}}$ (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 ${E}_{n}\left(\text{no.}\;\text{of}\;\text{copies}\right)=2{\left[\frac{1}{2}{E}_{\text{any}}\left(\text{no.}\;\text{of}\;\text{copies}\right)\right]}^{x\left(n\right)}$. 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.

Figure 6.

Figure 6. Expected number of copies needed to find genuine n-qubit entanglement. (a) Shows test states $\left\vert A\right\rangle =\left\vert {\text{GHZ}}_{n}\right\rangle =\frac{1}{\sqrt{2}}\left({\left\vert 0\right\rangle }^{n}+{\left\vert 1\right\rangle }^{n}\right)$ and $\left\vert A\right\rangle =\left\vert {\text{W}}_{n}\right\rangle =\frac{1}{\sqrt{n}}{\sum }_{i=1}^{n}\left\vert 0\dots {1}_{i}\dots 0\right\rangle $. Also the minimum scaling for quantum state tomography, E(no. of copies) = 3n . (b) Shows general GHZ-like (continuous line) and W-like states (dotted line) in terms of the amount of entanglement Cn . The greater n, the greater En (no. of copies). Also shown are the crossover points (marked with crosses) for minimum scaling for quantum state tomography, E(no. of copies) = 3n , such that values of Cn right of the tomography plots give numbers of copies less than 3n .

Standard image High-resolution image

5. 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:

Equation (17)

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 ${\Delta}=\left(2-\frac{4}{{2}^{n}}\right){\delta }^{2}$. 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 δ.

Figure 7.

Figure 7. Unbalanced states with various numbers of qubits n, where the continuous line is $P\left({\left\vert 0\right\rangle }^{n}\right)$. (a) Shows the probability results against δ for unbalanced GHZ test states from equation (17). The dashed line denotes $P\left({\left\vert \text{even}\;\text{no.}\;\text{of}\;1\text{s}\right\rangle }_{C}\right)$. (b) Shows the results for unbalanced W test states from equation (18). The dashed line denotes $P\left({\left\vert \text{exactly}\;\text{two}\;1\text{s}\right\rangle }_{C}\right)$.

Standard image High-resolution image

An unbalanced GHZ3 state can replicate the probability results given by a W3 state. This happens in the above parametisation when $\delta ={\pm}\left({\mathrm{sin}}^{-1}\sqrt{\frac{2}{3}}-\frac{\pi }{4}\right)\approx {\pm}0.17$, 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:

Equation (18)

This gives

shown in figure 7(b). For small δ, the error ${\Delta}=\frac{2}{{n}^{2}}{\delta }^{2}$. 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 ($\left\vert A\right\rangle \ne \left\vert B\right\rangle $) if these are drawn from a mixed ensemble.

Consider the error case $\left\vert A\right\rangle =\left\vert {\text{GHZ}}_{n}\right\rangle $ (or $\left\vert A\right\rangle =\left\vert {{\Phi}}^{+}\right\rangle $ in the n = 2 case) and

Equation (19)

giving:

shown in figure 8(a). Any measurement of an odd number of $\left\vert 1\right\rangle $s in the control therefore demonstrates that the test state and copy state are not equivalent.

Figure 8.

Figure 8. Unequal states for various numbers of qubits n. The continuous line denotes $P\left({\left\vert 0\right\rangle }^{n}\right)$. (a) Shows the probability results against δ for inequivalent copy states where one is a GHZ state and the other is equation (19). The dashed line denotes $P\left({\left\vert \text{even}\;\text{no.}\;\text{of}\;1\text{s}\right\rangle }_{C}\right)$ and the dotted line denotes $P\left({\left\vert \text{odd}\;\text{no.}\;\text{of}\;1\text{s}\right\rangle }_{C}\right)$ (which is the same for all n). (b) Shows the results for one W state and copy state equation (20). The dashed line denotes $P\left({\left\vert \text{exactly}\;\text{two}\;1\text{s}\right\rangle }_{C}\right)$ and the dotted line denotes $P\left(\left\vert \text{exactly}\;\text{one}\;1\right\rangle \right)$.

Standard image High-resolution image

This is similar to the c-SWAP test for equivalence from section 2.2, where any measurement of $\left\vert 1\right\rangle $ 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 ${\left\vert 1\right\rangle }_{C}$ (and therefore certainty of inequivalence) as:

which with small δ approximates to ${{\Delta}}_{1}=\frac{1}{2}\delta $. This is in fact less robust than the entanglement test, the errors for which are all second order: for small δ, the errors satisfy ${{\Delta}}_{0}=\frac{1}{{2}^{n}}{\delta }^{2}$, ${{\Delta}}_{\text{odd}}=\frac{1}{2}{\delta }^{2}$, and ${{\Delta}}_{\text{even}}=\left(\frac{1}{2}-\frac{1}{{2}^{n}}\right){\delta }^{2}$.

Interestingly, the unequal states signature probability, $P\left({\left\vert \text{odd}\;\text{no.}\;\text{of}\;1\text{s}\right\rangle }_{C}\right)$, 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, $P\left({\left\vert 0\right\rangle }_{C}^{n}\right)$ tends to $\frac{1}{2}$ for large systems and so cannot be used as indicator of large error. $P\left({\left\vert \text{odd}\;\text{no.}\;\text{of}\;1\text{s}\right\rangle }_{C}\right)$ and $P\left({\left\vert \text{even}\;\text{no.}\;\text{of}\;1\text{s}\right\rangle }_{C}\right)$ however always vary with δ.

Similarly, $\left\vert A\right\rangle \ne \left\vert B\right\rangle $ for the W case can be investigated where $\left\vert A\right\rangle =\left\vert {\text{W}}_{n}\right\rangle $ and

Equation (20)

This gives:

shown in figure 8(b). For small δ, ${{\Delta}}_{0}={{\Delta}}_{\text{two}\;1\text{s}}=\frac{1}{4{n}^{2}}{\delta }^{2}$ and ${{\Delta}}_{\text{one}\;1}=\frac{1}{2{n}^{2}}{\delta }^{2}$. 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

Equation (21)

gives:

shown in figure 9(a). For small δ, the error is ${\Delta}=\frac{2}{{2}^{n}}{\delta }^{2}$ 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 $\left\vert 1\right\rangle $s and those ending with $\left\vert 0\right\rangle $s have different values, with the former independent of n. This is due to the final $\left\vert 1\right\rangle $ in the additional state and alternative 'extra' states give different individual probabilities.

Figure 9.

Figure 9. Corrupted states with various numbers of qubits n. The continuous line denotes $P\left({\left\vert 0\right\rangle }^{n}\right)$. (a) Shows the probability results against δ for states equation (21). The dotted line denotes $P\left({\left\vert \text{even}\;\text{no.}\;\text{of}\;1\text{s}\right\rangle }_{C}\right)$. (b) Shows the results for states equation (22). The dotted line denotes $P\left({\left\vert \text{exactly}\;\text{two}\;1\text{s}\right\rangle }_{C}\right)$.

Standard image High-resolution image

Unlike the GHZ case, the corrupted W state results depend on which state is added. For example if

Equation (22)

then

shown in figure 9(b). For small δ the errors are ${\Delta}=\left(1-\frac{1}{n}\right){\delta }^{2}$. 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

For completely general test states from equation (1) where $\left\vert A\right\rangle \ne \left\vert B\right\rangle $:

Equation (A.1)

If $\left\vert A\right\rangle =\left\vert B\right\rangle $:

Equation (A.2)

where C2 is the concurrence.

Appendix B.: Three-qubit probability results

For completely general test states where $\left\vert A\right\rangle =\left\vert B\right\rangle $:

Equation (B.1)

For general GHZ-like test states where $\left\vert A\right\rangle \ne \left\vert B\right\rangle $, $\left\vert A\right\rangle ={A}_{000}\left\vert 000\right\rangle +{A}_{111}\left\vert 111\right\rangle $ and $\left\vert B\right\rangle ={B}_{000}\left\vert 000\right\rangle +\left\vert 111\right\rangle {B}_{111}$:

Equation (B.2)

For general W-like test states where $\left\vert A\right\rangle \ne \left\vert B\right\rangle $, $\left\vert A\right\rangle ={A}_{001}\left\vert 001\right\rangle +{A}_{010}\left\vert 010\right\rangle +{A}_{100}\left\vert 100\right\rangle $ and $\left\vert B\right\rangle ={B}_{001}\left\vert 001\right\rangle +{B}_{010}\left\vert 010\right\rangle +{B}_{100}\left\vert 100\right\rangle $:

Equation (B.3)

Appendix C.: n-qubit probability results

For general unbalanced GHZ case $\left\vert A\right\rangle =\left\vert B\right\rangle ={\alpha }_{0}{\left\vert 0\right\rangle }^{n}+{\alpha }_{1}{\left\vert 1\right\rangle }^{n}$:

Equation (C.1)

For general unbalanced W case $\left\vert A\right\rangle =\left\vert B\right\rangle ={a}_{1}\left\vert 00\dots 1\right\rangle +{a}_{2}{\sum }_{j=2}^{n}\left\vert 0\dots {1}_{j}\dots 0\right\rangle $:

Equation (C.2)

For general GHZ-like states where $\left\vert A\right\rangle \ne \left\vert B\right\rangle $, $\left\vert A\right\rangle ={\alpha }_{0}{\left\vert 0\right\rangle }^{n}+{\alpha }_{1}{\left\vert 1\right\rangle }^{n}$ and $\left\vert B\right\rangle ={\beta }_{0}{\left\vert 0\right\rangle }^{n}+{\beta }_{1}{\left\vert 1\right\rangle }^{n}$:

Equation (C.3)

For general W-like states where $\left\vert A\right\rangle \ne \left\vert B\right\rangle $, $\left\vert A\right\rangle ={\sum }_{i=1}^{n}{a}_{i}\left\vert 0\dots {1}_{i}\dots 0\right\rangle $, $\left\vert B\right\rangle ={\sum }_{j=1}^{n}{b}_{j}\left\vert 0\dots {1}_{j}\dots 0\right\rangle $:

Equation (C.4)

and the individual probabilities are:

$P\left({\left\vert 0\dots {1}_{i}\dots 0\right\rangle }_{C}\right)=\frac{1}{4}{\sum }_{j=1,j\ne i}^{n}{\left({a}_{i}{b}_{j}-{a}_{j}{b}_{i}\right)}^{2}$, $P\left({\left\vert 0\dots {1}_{i}\dots {1}_{j}\dots 0\right\rangle }_{C}\right)=\frac{1}{4}{\left({a}_{i}{b}_{j}+{a}_{j}{b}_{i}\right)}^{2}$.

Please wait… references are loading.
10.1088/2058-9565/abe458