Dynamic Learning of Pairwise and Threeway Entanglement
Abstract
In previous work, we have developed a dynamic learning paradigm for “programming” a general quantum computer. A learning algorithm is used to find a set of parameters for a coupled qubit system such that the system at an initial time evolves to a state in which a given measurement results in the desired calculation value. This can be thought of as a quantum neural network (QNN). Here, we apply our method to a system of three qubits, and demonstrate training the quantum computer to estimate both pairwise and threeway entanglement.
I Introduction
Detection and quantification of entanglement remains an important basic challenge in quantum information. Many different measures have been proposed[1, 2, 3]. For a system of two qubits (quantum bits) there does exist a general measure[2], but for larger systems[4] there are many problems. Most procedures require optimization[5, 6] and/or reconstruction of the density matrix[7], both of which can rapidly become impractical with increasing size of the system. Also, for systems larger than two qubits there exist inequivalent kinds of entanglement[8]. The “witness” approach[9] is useful, but requires that the state of the system be “close”, in some sense, to a given, known state.
Recently Behrman et al.[10, 11] proposed using an approach based on adaptive computing: finding a set of parameters for the time evolution of a twoqubit system such that the qubitqubit correlation function at the final time is mapped onto an entanglement witness. Remarkably, this witness did not require “closeness” to a given initial state. Here, we extend our work to a more complex threequbit system. Our method succeeds in finding a single set of parameters such that all three qubitqubit pairwise correlation functions give good witness for the pairwise entanglements for large classes of states. In addition, the threepoint correlation function gives a good approximation to the threeway entanglement. No optimization procedure or prior state reconstruction is necessary.
Ii Dynamic Learning for the Coupled Threequbit System: QNN
A quantum system, whether pure or mixed, evolves in time according to the Schrodinger equation:
(1) 
where is the density matrix and is the Hamiltonian, whose formal solution[12] is
(2) 
In practice, especially for timevarying Hamiltonians, the Schrodinger equation is usually integrated numerically; this is the approach we shall use here. We consider a threequbit quantum system whose Hamiltonian is:
(3)  
where are the Pauli operators corresponding to each of the qubits, are the tunneling amplitudes, are the biases, and , the qubitqubit couplings. This represents three interacting qubits, labeled A, B, and C, respectively. We choose the socalled “charge basis ”, which for a system of three qubits is the set: , , , , , , , . The amplitude for each qubit to tunnel to its opposing state, i.e., switch between the 0 and 1 states, is its value; each qubit has an external bias represented by its value; and each qubit is coupled to each of the other qubits, with a strength represented by the appropriate value. We call a “bias” because, if its value is positive, it will tend to force that qubit towards the state (i.e., the energy for being in that state is lower), and if its value is negative, towards the state. Similarly the sign of lowers/raises the energy of the corresponding qubits to be aligned/antialigned. Note that, for example, acts only on qubit A. We can write that operator in the charge basis as an 8x8 matrix: , where is the familiar 2x2 matrix , the identity matrix , and the outer product. Similarly is the 8x8 matrix , where is the matrix . Any product term, e.g., , can also be written as a single matrix: .
The parameters control the time evolution of the system in the sense that, if one or more of them is changed, the way a given state will evolve in time will also change, because of Eq. 1. This is the basis for using our quantum system as a neural network. There is a mathematical isomorphism between Eq. 2 and the equation for information propagation in a neural network: , where is the output vector of the network, the input vector, and the network operator, which depends on the neuron connectivity weight matrix . Here the role of the “weights” of the network is played by the parameters of the Hamiltonian, , all of which can be adjusted experimentally as functions of time[13, 14]. By adjusting the parameters using a neural network type learning algorithm we can train the system to evolve in time to a set of particular final states at the final time , in response to a corresponding set of given inputs. Because the time evolution is quantum mechanical (and, we assume, coherent), a quantum mechanical function like an entanglement witness can be mapped to an observable. Complete details, including a derivation of the quantum dynamic learning paradigm using backpropagation in time[15, 16], are given in [11].
The time evolution of the quantum system is calculated by integrating the Schrodinger equation in MATLAB Simulink [17]. The ODE4 fixed step size solver was used with a integration step size of 0.05 ns. The system was initialized (prepared in) each input state, in turn, then allowed to evolve for 300 ns. All of the parameters were taken to be functions of time; this was done in the simulation by allowing them to change to a different constant value every 75 ns (i.e., four “time chunks”.) Discretization error for the numerical integration was checked by redoing the calculations with a timestep of a tenth the size; results were not affected. Since the error needs to be back propagated through time, the integration has to be carried out from to 0. To implement this in MATLAB Simulink, a change of variable is made by letting .
Iii Pairwise Entanglement Witness
In earlier work on a twoqubit system, we used a training set of only four pure states: the Bell, flat, a correlated product, and a partially entangled state. See Table I. Though only trained on these four states, the net, when tested on states not trained on, successfully reproduced a good approximation to the entanglement of formation for large classes of states, including mixed states and product states as well as fully and partially entangled states. We called this an “experimental” entanglement witness, because no prior knowledge of the state of the system was required: once the net was trained, simple time evolution under the Hamiltonian followed by a single measurement was sufficient to detect entanglement for any input state. Indeed, the QNN did better than this: under most conditions measurement gave an approximate amount of entanglement, as well.
For a threequbit system, we decided to build on this earlier work directly, that is, with an initial training set that attempted only to learn the three distinct amounts of pairwise entanglement present. Thus, we started with a training set of twelve inputoutput pairs: three copies of the set of four we had successfully used earlier for two qubits, one copy for each pair of qubits. The input states are shown in Table II, and the desired (target) outputs, in Table III. For example, the Bell state for qubits B and C (for which we would train the entanglement output for the BC pair to be equal to one) could be any (normalized) state of the form: ; we chose to use the state . Table IV shows the parameters. The starting values for qubits A and B are those found in our earlier work[11]; these were also used as the initial values for qubit C. As before, we took as our output the square of the twoqubit correlation function at the final time. Thus the target values for the pairwise entanglement between qubits B and C were trained to the output function , and similarly for the pairs AB and AC.
State  Relative amplitudes of  Classical  Theoretical entanglement  QNN  
Correlation  Bennett  von Neumann  Bures  target  output  
Bell  1  0  0  1  1  1  1  1  0.99997  
flat  1  1  1  1  0  0  0  0  0  
1  0  0  0  0  0  0  
0  1  1  1  0.55  0.32  0.46  0.44317  0.44317 
Input  

0.5  0.5  0.5  0  0  0  
0  0  0  0  0.5  0.5  0  0  0  0  0  
0  0  0  0.5  0  0.5  0  0  0  0  
0  0  0  0  0.5  0  0  0  0  0  0  
0  0  0  0.5  0.5  0  0  0  0  
0  0  0  0.5  0  0  0  0  0  0  0  
0  0  0.5  0  0  0  0  0  0  0  0  
0  0  0  0  0  0  0  0  0  0  0  0 
Targets:  AB  1  0  0  0  0  0  0  0  0  0.44  0  0   

Set 1  AC  0  1  0  0  0  0  0  0  0  0  0.44  0   
BC  0  0  1  0  0  0  0  0  0  0  0  0.44    
Trained  AB  0.9943  0.0016  0.0001  0.0003  0.0018  0.0001  0.0007  0.0001  0.0002  0.4399  0.0008  0.0003   
AC  0.0000  0.9930  0.0001  0.0006  0.0001  0.0012  0.0003  0.0002  0.0018  0.0010  0.4385  0.0016    
BC  0.0000  0.0017  0.9945  0.0000  0.0009  0.0000  0.0013  0.0048  0.0002  0.0000  0.0000  0.4392    
Targets:  AB  1  0  0  0  0  0  0  0  0  0.44  0  0  0 
Set 2  AC  0  1  0  0  0  0  0  0  0  0  0.44  0  0 
BC  0  0  1  0  0  0  0  0  0  0  0  0.44  0  
ABC  0  0  0  0  0  0  0  0  0  0  0  0  1  
Trained  AB  0.9911  0.0012  0.0000  0.0002  0.0023  0.0012  0.0010  0.0006  0.0005  0.4384  0.0016  0.0014  0.0039 
AC  0.0002  0.9964  0.0000  0.0015  0.0001  0.0018  0.0000  0.0017  0.0001  0.0049  0.4386  0.0021  0.0001  
BC  0.0002  0.0012  0.9969  0.0002  0.0001  0.0000  0.0000  0.0009  0.0000  0.0026  0.0006  0.4396  0.0066  
ABC  0.0012  0.0000  0.0028  0.0001  0.0014  0.0002  0.0000  0.0001  0.0003  0.0006  0.0024  0.0007  0.9883 
Timechunk  

Initial  1  2.3576  2.3576  2.3576  0.10913  0.10913  0.10913  0.04503  0.04503  0.04503 
2  2.3576  2.3576  2.3576  0.03768  0.06377  0.06377  0.10117  0.10117  0.10117  
3  2.3577  2.3576  2.3576  0.08671  0.03880  0.03880  0.10771  0.10771  0.10771  
4  2.3461  2.3546  2.3546  0.07146  0.07239  0.07239  0.04422  0.04422  0.04422  
Set 1  1  2.0133  2.4955  2.4376  0.08676  0.44110  0.32887  0.35415  0.06745  0.08465 
2  2.2238  2.0328  2.4116  0.11451  1.08901  0.39170  0.81660  0.22532  0.27369  
3  2.4349  2.2618  2.4203  0.05961  0.31644  0.04549  0.61235  0.33585  0.24552  
4  2.5836  2.3423  2.3853  0.03040  0.05885  0.02624  0.28887  0.07233  0.13128  
Set 2  1  2.1024  2.5880  2.3032  0.39188  0.55015  0.79315  0.62404  0.26318  0.41928 
2  2.4013  2.1874  2.3051  0.04748  0.38236  0.37284  0.64560  0.21584  0.09610  
3  2.4969  2.2845  2.3047  0.53340  0.48951  0.34083  0.97289  0.92255  0.74675  
4  2.5908  2.4842  2.4072  0.31082  0.10772  0.16904  0.26100  0.17536  0.01217 
Training results are shown in Tables III and IV for the outputs and the trained parameters, respectively. RMS error per output for the set of 36 outputs (three for each member of the training set of 12), after 5000 passes through the training set, was . To determine whether the net has actually learned, we then tested on a large number of states not included in the training set, including fully entangled states, partially entangled states, product (unentangled) states, and also mixed states. A representative sample is shown in Table V. RMS error per output for the set of 39 outputs was . While errors are significantly larger, it is also clear from the output matrix that there is definite separation, in two senses: first, that it is easy to see where the pairwise entanglement is (e.g., to distinguish between a state with AB entanglement and one with BC entanglement); and, second, that it is easy to tell the difference among unentangled, partially entangled, and fully entangled states. In other words, while this is not, strictly speaking, an entanglement measure, it is quite a good witness.
Targets  AB  1  0  0  0  0  0  0.44  0  0  1  0  0  0 

AC  0  1  0  0  0  0  0  0.44  0  0  1  0  0  
BC  0  0  1  0  0  0  0  0  0.44  0  0  1  0  
Outputs  AB  0.9365  0.0000  0.0004  0.0019  0.0006  0.0051  0.4798  0.0022  0.0001  0.9661  0.0005  0.0004  0.0002 
AC  0.0000  0.7991  0.0023  0.0010  0.0002  0.0006  0.0003  0.4034  0.0017  0.0028  0.9227  0.0009  0.0004  
BC  0.0005  0.0001  0.9419  0.0080  0.0013  0.0081  0.0011  0.0022  0.3276  0.0026  0.0002  0.7692  0.0010 
Iv Threeway entanglement
Clearly the net has been trained successfully to calculate an approximation to pairwise entanglement. But can it distinguish between pairwise and threeway entanglement? To find out, we then tested the pairwisetrained net on the GHZ states . All the pairwise entanglements tested as very small: ; ; and , while the threepoint correlation function at the final time was significantly nonzero: . This seemed to indicate that the QNN was able to distinguish between pairwise entanglement, as exhibited in the Bell and EPR states, and the inequivalent, threeway entanglement of a GHZ state. Perhaps the net could be trained to find yet another output. Buoyed by hope and encouraged by these results, we then proceeded to add one additional output for the net to train, the threepoint correlation function at the final time, , and one additional training pair to the input matrix: , for which we set the target outputs as 0, 0, 0, and 1 (for each of the two point functions and the three point function, respectively: see Table III.) The net was then retrained, beginning from the values of the parameters found in the previous section, with the new training set of thirteen. Results are shown in Table III, and the new values for the parameters are shown in Table IV. Testing on product states and on pairwiseentangled states was repeated; though errors were slightly larger, results were substantially similar. We also tested ; the outputs for the pairwise entanglements and for the threeway entanglement were indistinguishable from the outputs for the trained state . The net now seems to be able to recognize both pairwise and threeway entanglement.
If we had an experimental realization of the threequbit system, we could use these results to find (approximately) a pairwise or threeway entanglement for any (initial) state of the system, by setting the various parameters to the determined values, allowing the system to evolve for the set time, then measuring the appropriate correlation function. Of course, any real experimental system will have nonzero sources of error, like noise and decoherence, which will mean the results of the simulation will not be exactly correct. One of the great advantages of the neural network approach is its ability to deal easily with complications like these: with “online” training, the QNN can take these into account in the training phase, adjusting the values of the parameters accordingly.
Within the theoretical simulation, it is a simple matter to calculate the entanglement of any state we wish. Some interesting results are shown in the two figures. In Figure 1, we plot the entanglement, as calculated by the QNN, for the state , as a function of both and . The graph shows two kinds of pairwise entanglement, AB (red) and AC (blue), and threeway entanglement (green). The threeway entanglement (green) is zero on the scale of the graph for all states plotted; the other pairwise entanglement, BC, lies right on top of the AC (blue) entanglement on this scale, and so is omitted for clarity. Along the axis, when (left hand edge), the pairwise entanglements AB (red) and AC (blue) are equal (i.e., the surfaces meet); this must be true, of course, by symmetry. When and (front right corner), this is the EPR state in qubits A and B, outerproducted with ; its AB pairwise entanglement (red) is maximal while other pairwise entanglements (blue), as well as the threeway entanglement (green), are zero. When and (front corner), this is the socalled “W”[6] state (the threequbit generalization of the EPR state), in which entanglement is shared among all three qubits, but in a dissimilar manner to that in the GHZ state[18]. The net calculates that the W state has all three kinds of pairwise entanglement, in (approximately) equal amounts: ; ; and , while the threeway (GHZ) entanglement is calculated to be essentially zero: . In the other direction, at and (back corner), this is the twoqubit partially entangled “P” state for the AB pair, and the net correctly calculates that the AB entanglement (red) is about 0.4 while the other pairwise entanglements (blue) are approximately zero (see Table III for precise numbers.)
Figure 2 shows threeway (GHZ) entanglement (green) and pairwise AB entanglement (red), for the state , as a function of both and . For and , this is the product state, for which pairwise (red) and threeway entanglement (green) are both zero; for and , this is the state (outer producted with ), , which has maximal AB entanglement (red) but zero threeway entanglement (green) ; when and , this is the GHZ state , which has zero AB entanglement (red) and maximal threeway entanglement (green). The two surfaces can be seen to cross each other along the black line which is projected onto the plane; on the scale of these calculations it is indistinguishable from .
V Conclusion
We have shown that a quantum computer of three qubits can be “trained” to compute, approximately, its own degree of entanglement. Pairwise and threeway entanglement can each be determined. No prior state reconstruction or tedious optimization procedure is necessary, nor is “closeness” to any particular state; rather, any unknown state’s entanglement can be estimated, whether pure or mixed.
Acknowledgment
This work was supported in part by the National Science Foundation under Grant No. NSF PHY0551164, through the the KITP Scholars program (ECB). We thank J.F. Behrman for extremely helpful discussions.
References
 [1] C.H. Bennett, D.P. DiVincenzo, J.A. Smolin, and W.K. Wootters (1996), Mixedstate entanglement and quantum error correction, Phys. Rev. A 54, pp. 38243851.
 [2] W.K. Wootters (1998), Entanglement of formation of an arbitrary state of two qubits , Phys. Rev. Lett. 80, pp. 22452248.
 [3] G. Toth and O. Guhne (2005), Detecting genuine multipartite entanglement with two local measurements, Phys. Rev. Lett. 94, 060501.
 [4] D.M. Greenberger, M.A. Horne, and A. Zeilinger (1989), in Bell’s Theorem and the Conception of the Universe, M. Kafatos, ed. , Kluwer Acdemic (Dordrecht), p 107.
 [5] V. Vedral, M.B. Plenio, M.A. Rippin, and P.L. Knight (1997), Quantifying entanglement, Phys. Rev. Lett. 78, pp. 22752279; V Vedral and M.B. Plenio (1998), Entanglement measures and purification procedures, Phys. Rev. A 57, pp. 16191633; L. Henderson and V. Vedral (2001), Classical, quantum and total correlations, J. Phys. A 34, pp. 68996905.
 [6] S. Tamaryan, A. Sudbery, and L. Tamaryan (2010), Duality and the geometric measure of entanglement of general multiqubit W states, Phys. Rev. A 81, 052319.
 [7] H.S. Park, S.S.B. Lee, H. Kim, S.K. Choi, and H.S. Sim (2010), Construction of optimal witness for unknown twoqubit entanglement, Phys. Rev. Lett. 105, 230404.
 [8] R. Lohmayer, A. Osterloh, J. Siewert, and A. Uhlmann (2006), Entangled threequbit states without concurrence and threetangle, Phys. Rev. Lett. 97, 260502.
 [9] R. Filip (2002), Overlap and entanglementwitness measurements , Phys. Rev. A 65, 062320; F.G.S.L. Brando (2005), Quantifying entanglement with witness operators , quantph/0503152.
 [10] E. C. Behrman, L. R. Nash, J. E. Steck, V. G. Chandrashekar, and S. R. Skinner (2000), Simulations of quantum neural networks, Information Sciences 128, pp. 257269.
 [11] E.C. Behrman, J.E. Steck, P. Kumar, and K.A. Walsh (2008), Quantum algorithm design using dynamic learning, Quantum Information and Computation 8, pp. 1229.
 [12] A. Peres, Quantum Theory: Concepts and Methods. Dordrecht, The Netherlands: Kluwer, 1995.
 [13] T. Yamamoto, Yu.A. Pashkin, O. Astafiev, Y. Nakamura, and J.S. Tsai (2003), Demonstration of conditional gate operation using superconducting charge qubits, Nature 425, pp. 941944.
 [14] CP Yang, SI Chu, and S. Han (2003), Possible realization of entanglement, logical gates, and quantuminformation transfer with superconductingquantuminterferencedevice qubits in cavity QED, Phys. Rev. A 67, 042311.
 [15] Yann le Cun (1988), A theoretical framework for backpropagation in Proc. 1998 Connectionist Models Summer School, D. Touretzky, G. Hinton, and T. Sejnowski, eds., Morgan Kaufmann, (San Mateo), pp. 2128.
 [16] Paul Werbos (1992), in Handbook of Intelligent Control , Van Nostrand Reinhold, p. 79.

[17]
MATLAB Simulink documentation notes [Online].
Available at
http://www.mathworks.com/access/helpdesk/help/toolbox/simulink  [18] This is easy to see as follows. Suppose the state of the system is , and the A qubit is measured. Then if the result of the measurement is 0, qubits B and C are still fully entangled  in fact, they are in the EPR state, . (If the result were 1, then the state of the system becomes , which is of course not entangled.) On the other hand, suppose the state of the system is , and again we measure A. It is obvious that no matter the result, the entanglement is completely destroyed, with the state of the system becoming either or , depending on the result of the measurement.
 [19] V. Coffman, J. Kundu, and W.K. Wootters (2000), Distributed entanglement, Phys. Rev. A 61, 052306.
 [20] S. B. Papp, K. S. Choi, H. Deng, P. Lougovski, S. J. van Enk and H. J. Kimble (2009), Characterization of Multipartite Entanglement for One Photon Shared Among Four Optical Modes, Science 324, 764.