Extracting dynamical equations from experimental data is NP-hard
aa r X i v : . [ qu a n t - ph ] F e b Extracting dynamical equations from experimental data is NP-hard
Toby S. Cubitt, Jens Eisert, and Michael M. Wolf Departamento de An´alisis Matem´atico, Universidad Complutense de Madrid,Plaza de Ciencias 3, Ciudad Universitaria, 28040 Madrid, Spain Dahlem Center for Complex Quantum Systems, Freie Universit¨at Berlin, 14195 Berlin, Germany Zentrum Mathematik, Technische Universit¨at M¨unchen, 85748 Garching, Germany
The behavior of any physical system is governed by its underlying dynamical equations. Much of physics isconcerned with discovering these dynamical equations and understanding their consequences. In this work, weshow that, remarkably, identifying the underlying dynamical equation from any amount of experimental data,however precise, is a provably computationally hard problem (it is NP-hard), both for classical and quantummechanical systems. As a by-product of this work, we give complexity-theoretic answers to both the quantumand classical embedding problems, two long-standing open problems in mathematics (the classical problem, inparticular, dating back over 70 years).
A large part of physics is concerned with identifying thedynamical equations of physical systems and understandingtheir consequences. But how do we deduce the dynamicalequations from experimental observations? Whether deduc-ing the laws of celestial mechanics from observations of theplanets, determining economic laws from observing monetaryparameters, or deducing quantum mechanical equations fromobservations of atoms, this task is clearly a fundamental partof physics and, indeed, science in general. The task of identi-fying dynamical equations from experimental data also turnsout to be closely related, in both the classical and quantummechanical cases, to long-standing open problems in mathe-matics (in the classical case, dating back to 1937 [1]).In this letter, we give complexity-theoretic solutions to boththese open problems. And these results lead to a surprisingconclusion: regardless of how much information one obtainsthrough measuring a system, extracting the underlying dy-namical equations from those measurement data is in generalan intractable problem. More precisely, it is
NP-hard . Thismeans that any computationally efficient method of determin-ing which dynamical equations are consistent with a set ofmeasurement data would solve the (in)famous P versus NPproblem [2], by implying that P = NP. Thus, if P = NP, as iswidely believed, there cannot exist an efficient method of de-ducing dynamical equations from any amount of experimentaldata. We also prove the other direction: by reducing to an NP-complete problem we show that, if P = NP, then there does ex-ist an efficient algorithm for extracting dynamical equationsfrom experimental data. Thus the question of whether thereexists an efficient method for determining dynamical equa-tions from measurement data is equivalent to the P versus NPquestion.Note that we are not restricting ourselves here to fundamen-tal theories, where other theoretical considerations may im-pose simplifications on the desired form of the equations. Weare also considering effective dynamical equations, as encoun-tered in the majority of experiments, where the full range ofpossible dynamical equations can in principle be observed.In the classical setting, the problem of extracting dynami-cal models from experimental data has spawned an entire fieldknown as system identification [3], which forms part of con- trol engineering – after all, the precise knowledge of the dissi-pation is crucial for actually understanding what control stepsto apply. In the quantum case, interest in understanding quan-tum dynamics, especially externally-induced noise and deco-herence, has been spurred on by efforts to develop quantuminformation processing technology [4, 5]. Indeed, the primarygoal of many experiments is precisely to characterize and un-derstand the dynamics of a specific quantum system [6–10].This is precisely the task that we show to be computationallyintractable in general (assuming P = NP), both in quantum me-chanics and in classical physics.
FIG. 1. In an experiment, we can gather snapshots of the state of aphysical system at various points in time. To understand the physicsbehind the system’s behavior, we must reconstruct the underlyingdynamical equations from the snapshots.
Results.
Let us make the task more concrete. We willthroughout consider open system dynamics which takes exter-nal influences and noise into account. Recall that in classicalmechanics, the most general state of a system is describedby a probability distribution p over its state space, which forsimplicity we will take to be finite-dimensional. Its evolutionis then described by a master equation , whose form is deter-mined by the system’s Liouvillian, corresponding to a matrix L , as ˙ p = L p . The Liouvillian expresses interactions, con-servation laws, external noise etc., in short, it describes theunderlying physics. In order for the probabilities to remainpositive and sum to one, the elements L i,j must obey two sim-ple conditions [11]: (i) L i = j ≥ , (ii) P i L i,j = 0 .In the quantum setting, the density matrix ρ plays the anal-ogous role to that of the classical probability distribution, butthe quantum master equations are still determined by a Liou-villian: ˙ ρ = L ( ρ ) . (1)In his seminal 1976 paper [12], Lindblad established the gen-eral form that any quantum Liouvillian must take if it is to gen-erate a completely-positive trace-preserving evolution (so thatdensity matrices always evolve into density matrices, directlyanalogous to probabilities remaining positive and normalisedin the classical case): L ( ρ ) = i [ ρ, H ] + X α,β G α,β (cid:16) F α ρF † β − { F † β F α , ρ } + (cid:17) . (2)Here, H is the Hamiltonian of the system, G is a positive semi-definite matrix and, along with the matrices F α , describes de-coherence processes. ( [ ., . ] and { ., . } + denote respectively thecommutator and anti-commutator.) These master equationsof Lindblad form have become the mainstay of the dynami-cal theory of open quantum systems, and are crucial to thedescription of quantum mechanics experiments [13]. In prin-ciple, the Liouvillian could itself be time-dependent, describ-ing a system whose underlying physics is changing over time.Here, we restrict our attention to the problem of finding a time-independent Liouvillian, as this is a good assumption for ex-periments in which external parameters are held constant. Themore general time-dependent problem is expected to be harderstill.What is the best possible data that an experimentalist canconceivably gather about an evolving system? At least in prin-ciple, they can repeatedly prepare the system in any choseninitial state, allow it to evolve for some period of time, andthen perform any measurement. In fact, for a careful choiceof initial states and measurements, it is possible in this way toreconstruct a complete “snapshot” of the dynamics at any par-ticular time. In the quantum setting, this technique is knownas quantum process tomography [5]. Quantum process tomog-raphy is now routinely carried out in many different physicalsystems, from NMR [6, 7] to trapped ions [8], from photons[9] to solid-state devices [10].A tomographic snapshot tells us everything there is to knowabout the evolution at the time t when the snapshot was taken.Each snapshot is a dynamical map E t , which describes howthe initial state, p or ρ , is transformed into p ( t ) = E t ( p ) or ρ ( t ) = E t ( ρ ) . Any measurement at time t can be viewedas an imperfect version of process tomography, giving partialinformation about the snapshot, and the outcome of any mea-surement of the system at time t can be predicted once E t isknown. Thus the most complete data that can be gatheredabout a system’s dynamics consists of a set of snapshots takenat a sequence of different points in time.Let us concentrate first on the quantum case. Quantumdynamical maps E t are described mathematically by com-pletely positive, trace-preserving (CPT) maps [5] (also knownas quantum channels ). The problem of deducing the dynami-cal equations from measurement data is then one of finding a Lindblad master equation (1) that accounts for the CPT snap-shots E t . This is essentially the converse problem to that con-sidered by Lindblad [12, 14]. Given its relevance, it is notsurprising that numerous heuristic numerical techniques havebeen applied to tackle this problem [7, 15]. But unfortunatelythese give no guarantee as to whether a correct answer hasbeen found. Our results show that the failure of these heuris-tic techniques is an inevitable consequence of the inherent in-tractability of the problem.Before tackling the problem of finding dynamical equa-tions, let us start by considering an apparently much simplerquestion: given a single snapshot E , does there even exist a Li-ouvillian L that could have generated it? Not every CPT map E can be generated by a Lindblad master equation [16, 17], sothe question of the existence of such a Liouvillian (Eq. (2)) isa well-posed problem. A dynamical map that is generated bya Lindblad form Liouvillian is said to be Markovian , so thisproblem is sometimes referred to as the
Markovianity problem .Non-Markovian snapshots [18] can arise if the environmentcarries a memory of the past, so that the system’s evolutioncannot be described by Eq. (1) in the first place, as that as-sumes the system is sufficiently isolated from its environmentfor its dynamics to be described independently.It is important to note that, for the results to apply to realexperimental data, we must take into account the fact that asnapshot can only ever be measured up to some experimentalerror. We should therefore be satisfied if we can answer thequestion for some approximation E ′ to the measured snapshot E , as long as the approximation is accurate up to experimentalerror. Mathematically, this is known as a weak membership formulation of the problem.To address the Markovianity problem, we will require somebasic concepts from complexity theory. Recall that P is theclass of computational problems that can be solved efficientlyon a classical computer. The class NP instead only requires anefficient verification of solutions, and contains problems thatare believed to be impossible to solve efficiently, such as thefamous 3SAT problem, and the travelling salesman problem.A problem is NP-hard if solving it efficiently would also leadto efficient solutions to all other NP problems. A problemthat is both NP-hard and is also itself in the class NP is saidto be
NP-complete . The 3SAT and travelling salesman prob-lems are both examples of NP-complete problems, whereasthe problem of factoring large integers is an example of an NPproblem that is believed not to be NP-hard [19].Rather than considering 3SAT, it is more convenient hereto consider the equivalent 1- IN -3SAT problem, into which3SAT can easily be transformed [19], and which is thereforealso NP-complete. We will show that any instance of the 1- IN -3SAT problem can be efficiently transformed into an instanceof the Markovianity problem (see also [20]), thus proving thatthe latter is at least as hard as 1- IN -3SAT; any efficient proce-dure for determining whether a snapshot has some underlyingLiouvillian would immediately imply an efficient procedurefor solving 1- IN -3SAT. But 1- IN -3SAT is NP-complete, sothis would immediately give an efficient algorithm for solv-ing any NP-problem, implying P = NP. However, as discussedabove, the Markovianity problem is just a special case of themore general—and more important—problem of extractingthe underlying dynamical equations from experimental data.If P = NP, as is widely believed, then there cannot exist a com-putationally efficient method of deducing dynamical equationsfrom any amount of experimental data.
We can go further than this. Through the relation to NP-complete problems such as 1- IN -3SAT, we can reduce theMarkovianity problem to the task of solving an NP-completeproblem. This gives the first rigorous, provably correct algo-rithm for extracting the underlying dynamical equations froma set of experimental data, albeit one that is necessarily inef-ficient for systems with more than a few degrees of freedom(otherwise we would have proven P = NP!).We have focussed so far on the more complex case of quan-tum systems, and one might perhaps expect that systems gov-erned by classical physics would be easier to analyse. How-ever, essentially the same argument proves that exactly thesame results hold for classical systems, too. (See also [20].)
The technical argument.
It is convenient to represent asnapshot E of the dynamics of a quantum system (a CPT map)by a matrix E , E i,j ; k,l = Tr (cid:2) E (cid:0) | i ih j | (cid:1) · | k ih l | (cid:3) (3)(the row- and column-indices of E are the double-indices i, j and k, l , respectively). Looked at this way, each measurementthat is performed pins down the values of some of these matrixelements [5]. A snapshot of a Markovian evolution is then onewith a Liouvillian L (represented in the same way by a matrix L ) such that E = e L , and, for all times t ≥ , E t = e Lt arealso valid quantum dynamical (CPT) maps.The Markovianity problem can be transformed into anequivalent question about the Liouvillian. Inverting the re-lationship E = e L , we have L = log E . There are, how-ever, infinitely many possible branches of the logarithm, sincethe phases of complex eigenvalues of E are only definedmodulo πi . The problem then becomes one of determiningwhether any one of these is a valid Liouvillian (i.e. of Lind-blad form (2)). This translates into the following necessaryand sufficient conditions on the matrix L [17]:(i). L Γ is Hermitian, where Γ is defined by its action onbasis elements: | i, j ih k, l | Γ = | i, k ih j, l | .(ii). L fulfils the normalisation h ω | L = 0 , where | ω i = P i | i, i i / √ d is maximally entangled.(iii). L satisfies conditional complete positivity (ccp), i.e. ( − ω ) L Γ ( − ω ) ≥ , ω = | ω ih ω | .All branches L m of the logarithm can be obtained by addinginteger multiples of πi to the eigenvalues of the principlebranch L , so we can parametrise all the possible branches by a set of integers m c : L m = log E = L + X c m c A ( c ) , (4) A ( c ) = 2 πi (cid:0) | l c ih r c | − F ( | l c ih r c | ) (cid:1) , (5)with | l c i and h r c | the left- and right-eigenvectors of E . F isthe operation F ( | i, j ih k, l | ) = | j, i ih l, k | ∗ , where ∗ denotesthe complex-conjugate, and we have already restricted theparametrisation to logarithms that satisfy condition (i).We will prove that this Liouvillian problem is NP-hard, byshowing how to encode any instance of the NP-complete 1- IN -3SAT problem into it. Recall that the task in 1- IN -3SAT isto determine whether a given logical expression can be sat-isfied or not. The expression is made up of “clauses”, allof which must be satisfied simultaneously. Each clause in-volves three boolean variables (variables with values “true” or“false”), which can be represented by integers m c = 0 , . In 1- IN -3SAT, a clause is satisfied if and only if exactly one of thevariables appearing in the clause is true (as opposed to 3SAT,in which at least one must be true), and no boolean negationis necessary. Note that, in terms of integer variables m c , a 1- IN -3SAT clause containing variables m i , m j and m k can beexpressed as ≤ m i + m j + m k ≤ , (6a) ≤ m i , m j , m k ≤ . (6b) If the matrices appearing in conditions (i) to (iii) were di-agonal , condition (iii) would give us a concise way of writ-ing the coefficients and constants of a set of inequalities suchas Eqs. (6) in the diagonal elements. However, the problemwe are facing here is significantly more challenging: diagonalmatrices will never satisfy conditions (i) and (ii), and the ma-trices L and A ( c ) cannot be chosen independently, since theyare determined by the eigenvectors and eigenvalues of a singlematrix E .These substantial obstacles can be overcome, however. Thekey step in encoding the above boolean constraints in a quan-tum Liouvillian is to restrict our attention to matrices L and A ( c ) with the following special forms: L = 2 π X i,j Q i,j | i, i ih j, j | + 2 π X i = j P i,j | i, j ih i, j | , (7) A ( c ) = 2 π X i = j B ( c ) i,j | i, i ih j, j | , (8)with coefficient matrices Q = X r v r v Tr ⊗ (cid:18) (cid:19) ⊗ (cid:18) k + λ r λ r λ r k + λ r (cid:19) + X c v c v Tc ⊗ (cid:18) − − (cid:19) ⊗ (cid:18) k − k (cid:19) (9) + X c ′ v c ′ v Tc ′ ⊗ (cid:18) − − (cid:19) ⊗ (cid:18) k k (cid:19) ,B ( c ) = v c v Tc ⊗ (cid:18) − − (cid:19) ⊗ (cid:18) − (cid:19) . (10)The sets of real vectors { v r } and { v c , v c ′ } should each forman orthogonal basis, and the parameters k , λ r and P i,j arealso real. The advantage of this restriction is that the actionof the Γ operation on matrices of this form is somewhat easierto analyse, as can readily be seen from its definition (given incondition (i), above).It is a simple matter to verify that the eigenvalues and eigen-vectors of L and B ( c ) do indeed parametrise the logarithmsof a matrix E , and that the Hermiticity and normalisation con-ditions conditions (i) and (ii) necessary for L to be a validquantum Liouvillian are indeed satisfied by the forms givenin Eqs. (7) to (10), as long as w T Q = 0 and diag( P ) Γ is Her-mitian (where for d –dimensional Q , w = (1 , , . . . , T / √ d ,and diag( P ) denotes the d –dimensional matrix with P i,j down its main diagonal). Furthermore, the ccp condition con-dition (iii) reduces for this special form to the pair of condi-tions: X c B ( c ) i,j m c + Q i,j ≥ i = j, (11a) (cid:0) − ww T (cid:1) (diag Q + offdg P ) (cid:0) − ww T (cid:1) ≥ , (11b)where M = (diag Q + offdg P ) denotes the d –dimensionalmatrix with diagonal elements M i,i = Q i,i and off-diagonalelements M i = j = P i,j .We now encode the coefficients of the 1-in-3SAT problemfrom Eqs. (6) into the elements of v c . For each clause inEq. (6a), write a “1” in a new element of v i , v j and v k , anda “0” in the corresponding element of all other v c ’s. For each v c , write a “1” in a new element of the vector, writing a “0” inthe corresponding element of all the other v c ’s (these elementswill be used to restrict each m c to the values 0 or 1). Finally,extend the vectors so that they are mutually orthogonal andhave the same length, which can always be done. One cannow verify directly that, by choosing appropriate v r , Eqs. (6)are equivalent to the 1-in-3SAT inequalities of Eq. (11b). Fur-thermore, conditions (i) and (ii) are always satisfied. (See [20]for more detail.) Thus we have succeeded in encoding 1-in-3SAT into the Liouvillian problem. As the latter is equivalentto the Markovianity problem, this proves that the Markovian-ity problem is itself NP-hard. This construction easily gen-eralizes to the original question of finding which dynamicalequations (if any) could have generated a given set of snap-shots [20]: any method of finding dynamical equations consis-tent with the data would obviously also answer the questionof whether these exist, allowing us to solve all NP problems.Note that, on the positive side, by carrying out a brute-forcesearch for solutions of the corresponding satisfiability prob-lem (in the case considered above, this is 1- IN -3SAT, butmore generally it is an integer semi-definite constraint prob-lem defined by conditions (i) to (iii), which is obviously inNP), we immediately obtain an algorithm for extracting dy-namical equations from measurement data that is guaranteedto give the correct answer. Although such an algorithm willnot work in practice even for moderately complex systems, theNP-hardness proves that we cannot hope for an efficient algo-rithm (unless P = NP). And it can be applied to systems with few degrees of freedom, making it immediately applicable atleast to many current quantum experiments.What of the classical setting? The classical analogue ofthe Markovianity problem is the so-called embedding problem for stochastic matrices, originally posed in 1937 [1]. Despiteconsiderable effort [21] the general problem has, however, re-mained open until now [22]. Strictly speaking, the quantum re-sult does not directly imply anything about the classical prob-lem. Nevertheless, the arguments we have given in the morecomplicated quantum setting can straightforwardly be adaptedto the classical embedding problem [20], proving that this isNP-hard, too. (See [20] for details.)
Discussion.
On the one hand, this work leads to a rigor-ous algorithm for extracting the underlying dynamical equa-tions from experimental data. For systems with few effectivedegrees of freedom, as encountered for example in all quan-tum tomography experiments to date [6–10], this gives thefirst practical and provably correct algorithm for this key task.For systems with many degrees of freedom, the algorithm isnecessarily inefficient, with a run-time that scales exponen-tially. But our complexity-theoretic NP-hardness results showthat we cannot hope for a polynomial-time algorithm. Notealso that the hardness cannot be attributed to allowing high-energy processes in the dynamics (high branches of the log-arithm), as the reduction from the 1- IN -3SAT problem onlyneeds low-energy dynamics ( m is restricted to or ).On the other hand, our results also prove that for generalsystems, deducing the underlying dynamical equations fromexperimental data is computationally intractable, unless onecan show that P = NP. This hardness result is true whether thesystem is quantum or classical, and regardless of how muchexperimental data we gather about the system. These resultsalso imply that various closely related problems, such as find-ing the dynamical equation that best approximates the data, ortesting a dynamical model against experimental data, are alsointractable in general, as any method of solving these prob-lems could easily be used to solve the original problem.Experience would seem to suggest that, whilst general clas-sical and quantum dynamical equations may be impossible todeduce from experimental data, the dynamics that we actu-ally encounter are typically much easier to analyse. Our re-sults pose the interesting question of why this should be, andwhether there is some general physical principle that rules outintractable dynamics.
Acknowledgements.
The authors would like to thank J. I.Cirac, A. Winter, C. Goldschmidt, and J. Martin for valuablediscussions. This work has been supported by a Leverhulmeearly career fellowship, by the EU (QAP, QESSENCE, MI-NOS, COMPAS, COQUIT, QUEVADIS), by Spanish grantsQUITEMAD, I-MATH, and MTM2008-01366, by the EU-RYI, the BMBF (QuOReP), and the Danish Research Council(FNU). [1] G. Elfving, Acta Soc. Sei. Fennicae n. Ser. A, (1937).[2] S. Cook, (2000).[3] L. Ljung, System identification: Theory for the user (PrenticeHall, 1999).[4] Nature Insight , 1003 (2008).[5] M. A. Nielsen and I. L. Chuang,
Quantum computation andquantum information (CUP, 2000).[6] M. Nielsen, E. Knill, and R. Laflamme, Nature , 52 (1998).[7] N. Boulant, T. Havel, M. Pravia, and D. Cory, Phys. Rev. A ,042322 (2003).[8] M. Riebe et al. , Phys. Rev. Lett. , 220407 (2006).[9] J. L. O’Brien et al. , Phys. Rev. Lett. , 080502 (2004).[10] M. Howard et al. , New J. Phys. , 33 (2006).[11] J. R. Norris, Markov chains (CUP, 1997).[12] G. Lindblad, Commun. Math. Phys. , 119 (1976). [13] H. J. Carmichael, Statistical methods in quantum optics , Vol. 1(Springer, 2003).[14] V. Gorini, A. Kossakowski, and E. C. G. Sudarshan, J. Math.Phys. , 821 (1976).[15] M. Howard et al. , New Journ. Phys. , 33 (2006).[16] M. M. Wolf and J. I. Cirac, Commun. Math. Phys. , 147(2008).[17] M. M. Wolf, J. Eisert, T. S. Cubitt, and J. I. Cirac, Phys. Rev.Lett. , 150402 (2008).[18] H.-P. Breuer, Phys. Rev. A , 022103 (2007).[19] M. R. Garey and D. S. Johnson, Computers and intractabil-ity: A guide to the theory of NP-completeness (W. H. Freeman,1979).[20] T. S. Cubitt, J. Eisert, and M. M. Wolf, “Supporting material,”online.[21] J. F. C. Kingman, Z. Wahrscheinlichkeitstheorie , 14 (1962).[22] A. Mukherjea, in Matrix theory and applications , edited byC. R. Johnson (AMS, Providence, R.I., 1990)
SUPPORTING MATERIAL
Encoding 3SAT in a Liouvillian
We start from the special form for the matrices L and A ( c ) defined in the main text: L = 2 π X i,j Q i,j | i, i ih j, j | + 2 π X i = j P i,j | i, j ih i, j | , (1) A ( c ) = 2 π X i = j B ( c ) i,j | i, i ih j, j | , (2)with Q = X r v r v Tr ⊗ (cid:18) (cid:19) ⊗ (cid:18) k + λ r λ r λ r k + λ r (cid:19) + X c v c v Tc ⊗ (cid:18) − − (cid:19) ⊗ (cid:18) k − k (cid:19) (3) + X c ′ v c ′ v Tc ′ ⊗ (cid:18) − − (cid:19) ⊗ (cid:18) k k (cid:19) ,B ( c ) = v c v Tc ⊗ (cid:18) − − (cid:19) ⊗ (cid:18) − (cid:19) . (4)Recall that the ccp condition (iii), given on page 3 of the maintext, reduces for this special form to the pair of conditions: X c B ( c ) i,j m c + Q i,j ≥ i = j, (5a) (cid:0) − ww T (cid:1) (diag Q + offdg P ) (cid:0) − ww T (cid:1) ≥ . (5b)As explained in the main text, we encode a 1- IN -3SATproblem into these matrices by writing the clauses into thevectors v c . Denote the total number of variables and clausesby V and C , respectively. For each clause n involving the i th , j th and k th boolean variables, write a “1” in the n th elementof v i , v j and v k , and write a “0” in the same element of allthe other v c ’s. Now, for each v c , write a “1” in its C + c ’thelement, writing a “0” in the corresponding element of all theother vectors. Finally, extend the vectors so that they are mu-tually orthogonal and have the same length, which can alwaysbe done. This produces vectors with at most C + 2 V elements.This procedure encodes the coefficients for the 1- IN -3SATinequalities into some of the on-diagonal × blocks of the B ( c ) matrices. Specifically, if we imagine colouring B ( c ) in achess-board pattern (starting with a “white square” in the top-leftmost element), then the coefficients for one 1- IN -3SATconstraint from Eq. (7) of the main text are duplicated in allthe “black squares” of one diagonal × block.Colouring Q in the same chess-board pattern, the contribu-tion to its “black squares” from the first term of Eq. (3) isgenerated by the off-diagonal elements λ r : X r v r v Tr ⊗ (cid:18) (cid:19) ⊗ (cid:18) · λ r λ r · (cid:19) = S ⊗ (cid:18) (cid:19) ⊗ (cid:18) · · (cid:19) . (6) Since v r and λ r can be chosen freely, the first tensor factorin this expression is just the eigenvalue decomposition of anarbitrary real, symmetric matrix S . If we choose the first C diagonal elements of S to be / , and choose the next V di-agonal elements to be / , then it is straightforward to verifythat the equations in the ccp condition of Eq. (5a) correspond-ing to the “black squares” in on-diagonal × blocks aregiven by m i , m j , m k ≥ − , − m i , m j , m k ≥ − ,m i + m j + m k ≥ , − m i − m j − m k ≥ − , (7)for all m i , m j , m k appearing together in a 1- IN -3SAT clause.Since the m c are integers, these inequalities are exactly equiv-alent to the 1- IN -3SAT constraints given in Eq. (7) of themain text.We have successfully encoded the correct coefficients andconstants into certain matrix elements of B ( c ) and Q . But allthe other elements of these matrices also generate inequalitiesvia Eq. (5a). To “filter out” these unwanted inequalities, wechoose the remaining diagonal elements and all off-diagonalelements of the symmetric matrix S to be large and positive,thereby ensuring all unwanted inequalities are always triviallysatisfied. L m , as constructed so far, will not satisfy the normalisationcondition (ii) given on page 3 of the main text. For that, weneed to ensure that w T Q = 0 , i.e., that the columns of Q sum to zero. We use the “white squares” of Q , generated bythe diagonal elements in the third tensor factors of Eq. (3),to renormalise these column sums to zero. Recall that both { v r } and { v c , v c ′ } are complete sets of mutually orthogonalvectors. Rearranging Eq. (3), Q is therefore given by Q = k + S ⊗ (cid:18) (cid:19) ⊗ (cid:18) (cid:19) + X c v c v Tc ⊗ (cid:18) − − (cid:19) ⊗ (cid:18) − (cid:19) , (8)where is the identity matrix. Now, the only requirementon the off-diagonal elements of S is that they be sufficientlypositive to filter out the unwanted inequalities. Also, from theform of Eq. (8), the columns in any individual × block of Q sum to the same value. Thus, by adjusting the elements of S , we can ensure that all columns of Q − k sum to the same positive value, σ say. Choosing k = − σ , the negative on-diagonal element in each column generated by the k = − σ term will cancel the positive contribution from the other terms,thereby satisfying the normalisation condition, as required.Finally, we must ensure that the second ccp condition fromEq. (5b) is always satisfied, for which we require the followingLemma: Lemma 1 If Q = − k is d -dimensional, then for any real k there exists a matrix P such that diag P = 0 and ( − ww T )( Q + P )( − ww T ) ≥ , (9) where w = (1 , , . . . , T / √ d . Proof
Choose P = α ( − ww T ) + α (1 − d ) ww T . Then thediagonal elements of P are P i,i = α (cid:18) − d (cid:19) + α (1 − d ) 1 d = 0 , (10)and ( − ww T )( Q + P )( − ww T ) = ( α − k )( − ww T ) , (11)which is positive semi-definite for α ≥ k . (cid:3) The coefficients P i,j in Eq. (1) can be chosen freely, since theyplay no role in either the normalisation or in encoding 1- IN -3SAT, so the [offdg P ] term in the ccp condition of Eq. (5b)can be chosen to be any matrix with zeros down its main di-agonal. Also, from Eq. (8), all diagonal elements of Q areequal to k = − σ . Thus Eq. (5b) is exactly of the form givenin Lemma 1, and choosing P accordingly ensures that it isalways satisfied. Furthermore, since gives a P Γ that is Hermi-tian, condition (i) of the main text is automatically also satis-fied.We have constructed L and A ( c ) such that there exists an L m satisfying conditions (i), (ii) and (iii) from page 3 of themain text if (and only if) the original 1- IN -3SAT instance wassatisfiable. But we have already shown that condition (iii),along with conditions (i) and (ii), are satisfied if (and only if) L m is of Lindblad form, which in turn is equivalent to E = e L m = e L being Markovian.Furthermore, the integer solutions of Eqs. (7) are insensitiveto small perturbations of the coefficients and constants, so anysufficiently good approximation E ′ will still be Markovian if E is, and vice versa, as long as we impose sufficient precisionrequirements. Indeed, it is natural to expect that if a snapshot E is close to being Markovian, it will have a generator L m that is close to being of Lindblad form. Making this rigorousis less trivial, but follows from continuity properties of thematrix exponential [1] and logarithm [2]. The Markovianityproblem is therefore equivalent to the problem of determiningwhether any L m obeys the three conditions (i) to (iii), up to thenecessary approximation accuracy. Thus we have successfullyencoded 1- IN -3SAT into the Liouvillian problem, such thatthe corresponding snapshot E is Markovian if (and only if)the 1- IN -3SAT instance was satisfiable.Using standard perturbation theory results for eigenvaluesand eigenvectors [3, 4], a careful analysis reveals that a preci-sion of O ( V − ( C + 2 V ) − ) is sufficient, which scales onlypolynomially with the number of degrees of freedom in thesystem (i.e., with the size of the Liouvillian matrix). Though apolynomial scaling is not strictly speaking necessary to proveNP-hardness, it makes the result more compelling, as it showsthat the complexity does not result from demanding unreason-able precision requirements. This is sometimes called strongNP-hardness of a weak-membership problem (cf. Ref. [5]).This so-called weak-membership formulation of theproblem—allowing for approximate answers—is vital if the question is to be reasonable from an experimental perspective:the snapshot E can only be measured up to some experimen-tal error. Allowing for approximate answers can only makethe problem easier than requiring an exact answer, so the factthat the problem remains NP-hard even for finite (even polyno-mial) precision is crucial to the experimental relevance of thehardness result. In fact, the weak-membership formulation isalso necessary from a theoretical perspective. If E happenedto be close to the boundary of the set of Markovian maps, thenit would be close to both Markovian and non-Markovian maps,and an exact answer could require the matrix elements of E tobe specified to infinite precision, which is not reasonable eventheoretically. Several snapshots
Clearly, if we can find a set of dynamical equations when-ever they exist, we can also determine whether they exist. Sofinding the dynamical equations is at least as hard as answer-ing the existence question. For a single snapshot, the latter isjust the Markovianity problem again. But, having constructed L and A ( c ) as described above, it is easy to generalise thisto any number of snapshots E t : simply take E t = e L t for asmany different times t as desired. The classical setting
The analogue of the Markovianity problem in the classicalsetting is known as the embedding problem . Given a stochas-tic matrix, this asks whether it can be generated by any contin-uous, time-homogeneous Markov process (i.e., by dynamicsobeying a time-independent classical master equation). Thequantum mechanical proof described above does not directlyimply anything about the classical problem (nor vice versa).Nevertheless, it turns out that the arguments used in the quan-tum setting can readily be adapted to the classical embeddingproblem.We can reduce the embedding problem to a question aboutthe (classical) Liouvillian, in the same way as in the quantumcase. Comparing the conditions for L to be a valid classical Li-ouvillian (see conditions (i) and (ii) on page 1 of the main text)with the matrices Q and B ( c ) from Eqs. (3) and (4), we seethat Q + P m c B ( c ) is a valid classical Liouvillian if and onlyif the 1- IN -3SAT problem was satisfiable. In other words,for the classical case, we simply need to use the matrices Q and B ( c ) , rather than the full matrices L and A ( c ) used inthe quantum construction. The rest of the arguments proceedas in the quantum case, thereby proving that the embeddingproblem too is NP-hard. [1] R. A. Horn and C. R. Johnson, Topics in Matrix Analysis (CUP,1994).[2] J. Weilenmann, Journ. Func. Anal. , 1 (1978). [3] R. A. Horn and C. R. Johnson, Matrix Analysis (CUP, 1990).[4] G. H. Golub and C. F. van Loan,