<<

A local model of quantum Turing machines

Dong-Sheng Wang∗ Institute for and Department of Physics and Astronomy, University of Waterloo, Waterloo, ON, N2L 3G1, Canada (Dated: December 10, 2019) The model of local Turing machines is introduced, including classical and quantum ones, in the framework of matrix-product states. The locality refers to the fact that at any instance of the computation the heads of a have definite locations. The local Turing machines are shown to be equivalent to the corresponding circuit models and standard models of Turing machines by simulation methods. This work reveals the fundamental connection between tensor-network states and information processing.

PACS numbers: 03.67.-a, 03.67.Lx, 03.67.Bg

I. INTRODUCTION which results in the superposition of head position and the nonlocal interactions between the tape and the pro- Matrix-product states and tensor-network states have cessor. Observe that quantum systems do not have to be been playing central roles in fully quantum; on the contrary, there are usually classical science [1–4]. They could be used, but not lim- ingredients (e.g., sites on a lattice, temperature, external ited, to characterize entanglement in many-body sys- potential) in models of quantum systems. We find that, a tems [5], construct topological quantum error-correcting local and simplified QTM can be defined by making the codes [6], and enable universal quantum computing in head position classical, without loss of universality for the measured-based models [7]. quantum computing. Local interactions are physically In this work, we reveal a fundamental connection be- appealing, and it is not hard to see that it is present tween matrix-product states and quantum computation. in the circuit models (with local gates), as well as the We find that a universal [8–10], classical TM (CTM). which is equivalent to the usual model, can be defined in the framework of matrix-product states. There are also other study that provides hints for vari- On the one hand, our model of quantum Turing machines ations of TM. With teleportation and gates realized by greatly simplifies the functionality of the standard ones nonunitary means [28], a measurement-based QTM was with a locality structure; on the other hand, our model es- introduced [24, 29], which, by construction, does not have tablishes a sort of ‘duality’ between information process- problems such as halt [18, 19, 21] and the local- ing and matrix-product states (and also tensor-network ity issue of head position. With as passive mem- states), hence bringing together perspectives and results ory, i.e., no direct interactions among them, computing from both sides. models with projections on ancilla [30] and automati- Quantum computation is a computing model that op- cally decoupled ancilla [31] are proven to be universal erates according to quantum mechanical rules. In gen- by simulating a universal set of gates. In both models eral, information can be processed by the interaction be- each register qubit may be acted upon many times, i.e., tween registers (i.e., string of bits) and an external drive, the interaction is not sequential. In , a or interaction among the registers [11–14]; quantum Tur- so-called qubus model [32] was developed, which real- ing machines (QTM) belongs to the first case, and quan- izes gates on qubits by non-sequential interactions with tum circuit model (QCM) belongs to the second case. a quantum bus, which is infinite dimensional. While QCM has been the canonical model for quantum arXiv:1912.03767v1 [quant-ph] 8 Dec 2019 computing, QTM, as a universal computing model, are Motivated by the observation above, the model of lo- relatively less understood for physicists [15–27]. cal TM is introduced in this work, including classical Turing machine, which lies at the heart of the theory and quantum ones. The probabilistic (or stochastic) TM of computation, is a universal mathematical or compu- and quantum stochastic TM are also introduced, and tational model to study algorithms and the process of are shown to be reducible to local CTM and QTM, re- computation. Physically, a Turing machine (TM) is a spectively. The local structure is brought and imprinted bipartite system including a register tape and a proces- onto a TM from the matrix-product states (MPS) for- sor, interaction between which is enabled by a read/write malism [1–4]. head. The standard QTM [8–10] is ‘fully’ quantum [18– 21] in the sense that all elements of TM are quantized, This work contains the following sections. We first present MPS formalism and also develop techniques that are suitable for TMs in section II. We then define local TMs in section III. A study of probabilistic TMs is also ∗ [email protected] presented in the Appendix. 2

II. MATRIX-PRODUCT STATES is the . Tracing out the system results in a se- quence of quantum channels En on the correlator such that E (ρ) = P Ain ρAin†, and P Ain†Ain = 1 for A. Quantum channels n in in each n = 1,...,N. We first review some basic properties of quantum chan- The boundary condition is specified by the set of col- i1 iN nels, which are needed to understand matrix-product umn vectors {|A i} and the set of row vectors {hA |}. For the first site, P Ai1†Ai1 = 1, each Ai1 is a column states. From Stinespring dilation theorem and Kraus i1 operator-sum representation [33–35], a vector but not-normalized, while its norm is a singular value. For the last site, P AiN †AiN = 1, each AiN is a E, i.e., a completely positive trace preserving (CPTP) iN map, can be represented as row vector and normalized, and they come from each col- umn of a unitary operator that appears in the first step X † of singular value decomposition (SVD) to derive MPS [4]. E(ρ) = K ρK , ∀ρ (1) ` ` For the OBC case, the form of MPS is usually simplified ` as P † for a set of Kraus operators {K } and K K = 1. X iN i1 ` ` ` ` |Ψi = hR|A ··· A |Li|i1 . . . iN i, (5) Furthermore, the set of Kraus operators corresponds to P i1,...,iN an isometry operator V := ` |`iK` for |`i as ancilla state. The isometry can be embedded into a unitary which may not be normalized due to the probability of operator U such that V = U|0i and K` = h`|U|0i. the final projection hR|. However, the normalization con- The transfer matrix [35, 36] of a quantum channel E is dition can be easily handled, so it does not cause problem. For the PBC case, the MPS takes the following form X ∗ TE = K` ⊗ K` . (2) X iN i1 |Ψi = tr(A ··· A )|i1 . . . iN i. (6) ` i1,...,iN

The dynamics E : ρ 7→ E(ρ) is equivalent to TE : P We observe that this state can be prepared by using |ρi 7→ TE |ρi, for a ρ = ij ρij|iihj| P |ωi = i |iii as both the initial and final states of the P P ` 2 and |ρi = ij ρij|ii|ji. For K` = ij kij|iihj|, then correlator. The bond dimension is actually χ , but the P ` ¯` TE = `ijkl kijkkl|ikihjl|. Ignoring the part A matrices only act on half of the space, so the effec- the matrix tive bond dimension is still χ. Also the PBC case can be viewed as a special case of OBC when each vector |Ai1 i X ` ¯` iN i1 SE = kijkij|iiihjj| (3) is equivalent to |A i and {|A i} forms a basis of the `ij correlation space. Next we study how to prepare a MPS (4) by a quantum P ` 2 is stochastic (not doubly) as `i |kij| = 1, and can be circuit. To do so, the dilation for each of the channels treated as the stochastic version of TE . Note |iii can En is employed. The first channel E1 is defined by the i1 be simply viewed as an encoding of |ii, same for hjj|. set of Kraus operators {|A i}, and the last channel EN P 2 iN For example, SU = ij |uij| |iihj| of a unitary operator is defined by {hA |}. The channel E1 maps from dimen- U is doubly stochastic, and also orthostochastic. The sion χ0 = 1 to dimension χ1, while the channel EN maps stochastic version of a random unitary channel is also from dimension χN−1 to dimension χN = 1, while each doubly stochastic. other channel En in between maps the bond dimension from χn−1 to χn. From the SVD process there exists relations between each χ and d, e.g., χN−1 ≤ d [4]. Im- B. Matrix-product states and quantum circuits plementing each En requires the dilation of channels that alter dimension. For a rank-r CPTP channel from di- rm Any finite-dimensional N-partite quantum state can mension n to m, one input ancilla with dimension d n e be expressed as a MPS is needed. Note that the input system and ancilla do not correspond to the output system and ancilla, respec- X iN iN−1 i2 i1 |Ψi = hA |A ··· A |A i|i1 . . . iN i (4) tively, due to the change of dimension. Now a channel

i1,...,iN En can be realized by a unitary Un with dimension dχn, in in and from A = hin|Un|0i, {A } occupy the first block- for the open boundary condition (OBC) case. This column of Un. For the last unitary UN , special cares are form is in the so-called right-canonical form, while left- needed. If χN−1 = d, then no ancilla is needed, which canonical and other forms are also available [4]. These means the correlator itself becomes the last physical , A matrices act on the so-called correlation space, also and then it is traced out after a unitary rotation UN such iN known as virtual space, ancillary space etc, and the cor- that hA | = hiN |UN , which appears in the first step of relation space dimension χ is also known as the bond SVD for the right-canonical form. If χN−1 < d then an iN or virtual dimension. Regarding LQTM, the N particles ancilla is needed and hA | = hiN |UN |0i for |0i as the (or ’spins’, qubits) are on the tape, and the correlator initial state of this ancilla. 3

decoupled at the end, here this method is extended for the general qudit case. With the isometry V := P |i iAin for each site, a n in n MPS with OBC (5) can be written as FIG. 1. Quantum circuit to prepare a general MPS with constant bond dimension χ and an automatically decoupled |Ψi = hR|VN ··· V1|Li. (9) correlator |0i at the end. Each unitary Un is the dilation of 0 Vn, the embedding of Vn. The initial state of the correlator 1 can be chosen to be |0i by absorbing a unitary gate, which With hR|VN = ( d ⊗ hR|)VN and from SVD converts |0i to |L0i, into the first gate . U1 1 0 ( d ⊗ hR|)VN = VN MN , (10)

0 for (i) d < χ, MN of size d × χ, unitary VN of size d × d, The whole state preparation process is as follows. 0 and (ii) d ≥ χ, MN of size χ×χ, isometry V of size d×χ. First, apply a sequence of unitary gates from U1 till UN−1 N Now MN VN−1 is (1d ⊗ MN )VN−1, and perform SVD for the rest sites, and for the last one define |L0i = M |Li, UN−1 ··· U1|0iv|0i1 · · · |0iN−1 (7) 1 so X iN−1 i2 i1 = A ··· A |A i|i1 . . . iN−1i, 0 0 0 i1,...,iN−1 |Ψi = VN ··· V1 |L i. (11) where |0i is the initial state of the virtual correlator. If 0 v From a rank consideration, the size of VN−k is χ = d, apply U first and trace out the correlator, k k+1 N−1 N d min(χ, d ) × min(χ, d ), and the size of Mk is always the state becomes at most χ × χ. Now each V 0 can be embedded into an X isometry V of size dχ × χ, although the embedding is not hiN |UN UN−1 ··· U1|0iv|0i1 · · · |0iN−1|iN i (8) unique. This means a quantum circuit to realize the se- iN quence of Vk can be used to prepare the MPS: start from X X iN−1 i2 i1 0 = hiN |UN A ··· A |A i|i1 . . . iN−1i|iN i, the state |L i, and perform the dilation Uk for each Vk. iN i1,...,iN−1 To show that the correlator can automatically decouple at the end, there are three cases to consider: which is the MPS (4). If χN−1 < d, append the last an- iN 2 0 2 cilla with |0i such that W := UN |0i and hA | = hiN |W . 1. For d ≥ χ > d, the size of VN−1 is d × χ, while Applying UN and tracing out the final system (both cor- the size of its embedding VN−1 is dχ × χ. This relator and ancilla) yields the MPS (4). embedding can be done by appending χ − d rows 0 As we can see, the change of bond dimension compli- of zeros to each of the d × χ matrices in VN−1, and 0 cates the MPS circuit, so instead, these matrices can be this means after the action of VN−1, the χ-level cor- enlarged to have the same bond dimension as the largest relator will only have amplitude on d levels. The one, and indeed, in practice many states can be described embedding VN can be obtained by first appending by MPS with constant bond dimensions. Therefore, it χ − d columns of normalized vectors, and then in- 0 can be assumed that all the A matrices have dimen- serting χ−1 rows of zeros after each row in VN , and sion χ, and each quantum channel becomes dimension- this means that the state of the correlator will be 0 preserving. For the quantum circuit, the first dilation annihilated by VN , i.e., mapped to dimension one, U1 maps from dimension dχ to d-dimensional spin and and the correlator is converted to the last spin by 0 χ-dimensional correlator, and the channels in the middle VN . are simple to deal with, while the last one deserves some 2. For χ ≤ d, the size of V 0 is dχ × χ, and its attention. The set {hAiN |} still forms a channel, but now N−1 embedding is the same with itself; and size of V 0 it may hold d ≤ χ, while injectivity requires d ≥ χ2. This N means for both injective and also χ2 ≥ d ≥ χ cases the is d × χ, and its embedding VN can be obtained by inserting χ−1 rows of zeros after each row in V 0 . In method described above can be used. For the case d < χ, N this case, after V 0 all levels of the correlator are the channel cannot be TP since each vector hAiN | is ex- N−1 occupied, yet V 0 will still annihilate the correlator. tended to a larger vector. This means partial projection N on the correlator is required, which leads to probabilistic 2 0 2 2 3. For χ > d , the size of VN−1 is d × d , and its em- events. However, we can employ the method in subsec- bedding can be obtained by first appending χ − d2 tion II C to avoid this. columns of normalized vectors, and then appending χ − d rows of zeros to each of the d × χ matrices in V 0 . Still in this case after V 0 only d lev- C. Avoid the final projection on correlation space N−1 N−1 els of the correlator are occupied, which are further annihilated by VN . Consider the generation of a MPS in the form (5) with a constant bond dimension. From Ref. [37] a MPS can The quantum circuit can be shown as that in Fig. 1. be prepared deterministically such that the correlator is This also shows that in a LQTM one does not need to 4 implement a projection on the correlator, which is the processor of LQTM. Here we apply this technique to the Bell states |Φ±i = √1 (|00i ± |11i), and |Ψ±i = √1 (|01i ± |10i). We only 2 2 need the MPS form for |Φ+i ≡ |ωi, and others can be easily obtained. Let the two qubits be α and β, and a FIG. 2. The model of Turing machines. qubit ancilla be a, we find |ωi = h0| BA|0i , (12) a a III. TURING MACHINES 0 1 0 1 for A = |0iαA + |1iαA , B = |0iβB + |1iβB , with the tensors defined as A. Preliminary √ √ 0 1 x 0 1 + A = 1/ 2,A = σ / 2,B = P0,B = σ , (13) We first review the standard description of TM [9, 12]. z + x y for P0 = (1+σ )/2, σ = (σ +iσ )/2, and Pauli matri- For convenience, we will use ‘cbit’ for classical bit, and ces σx, σy, σz, and |0i = (1, 0)t, |1i = (0, 1)t. The pair ‘bit’ as a general notion for a cit, pbit, or qubit. A TM, of matrices A0 and A1, B0 and B1 each form a quantum classical, probabilistic, or quantum, has a processor (also channel. The quantum circuit to prepare |ωi is also easy known as control), denoted by the symbol Q, state of to find which is often called ‘internal state’, and a register (tape) Γ of a string of non-interacting bits, which usually con- |ωi = h0| U U |000i , (14) a βa αa βαa tains the input and output, and a head, which can read, 0 1 for Uβa = Sβa as a swap gate realizing B and B , Uαa = write, move left or right by at most one step, see Fig. 2. CNOTαaHα with the controlled-not (α as control) and Usually the processor Q is specified to have an initial in- 0 1 Hadamard gate realizing A and A . The qubit ancilla ternal state q0 ∈ Q and a set of halting states F ⊆ Q so a automatically decouples simply because it is swapped that the machine halts when the internal state reaches with the qubit β. a halting state. There is a transition function δ which forms the program to solve a certain problem. The tran- sition function takes the form D. Composition δ : Q\F × Γ × Q × Γ × {L, R, N} → D, (17) In the MPS circuit the starting state of system is usu- ally |0i ≡ |0 ··· 0i. If the input |0i is substituted by an- for DCTM = {0, 1}, DPTM = [0, 1], DQTM = C [9, 12]. other MPS, the output is still a MPS, but with a larger Here L (left), R (right), and N (no movement) specifies bond dimension. Such a composition is useful when we the motion of the head [38]. consider a sequence of computations by a LQTM. A state of the whole machine is often known as a ‘con- figuration’, including the state of tape, head position, Let’s denote a MPS by |Ξai and the sequence of unitary (a) (a) processor (and some others). A computation on TM can operators in it as U , and |Ξai := hRa|U |Lai|0i with be viewed as a sequence of configurations, and a conver- bond dimension χa, and similarly for another MPS by sion between any successive two configurations can be |Ξbi. The composition of the two circuits leads to the state described by a permutation, stochastic process, or uni- tary evolution. The tape is a passive memory, i.e., the (b) (ab) |Ξabi = hRb|U |Lbi|Ξai = hRb|hRa|U |Lbi|Lai|0i, bits on the tape do not interact with each other. This (15) means the computation is not carried out on the tape it-

(ab) (a) (b) self, instead it is induced by the interaction between the with U := U  U for composition  defined as tape and the processor. (a) Q (a) (b) Q (b) ˜ (a) follows. For U := i Ui , U := i Ui , Let Ui = To define a QTM [8, 9], we employ the tuple form (a) 1(b) ˜ (b) (b) 1(a) (ab) Q (ab) Ui ⊗ , Ui = Ui ⊗ , then U = i Ui for hQ, F, H, P, Γ, Σ, δi: U (ab) := U˜ (a)U˜ (b). The state |Ξ i has bond dimension i i i ab 1. Q: Hilbert space of the internal states. χab = χaχb, and the boundary states of the correlator are |Lbi|Lai and hRb|hRa|. This property also holds when the 2. F ⊆ Q: the set of starting and halting states of the technique to avoid the final projection from section II C processor. is employed. In addition, the tensor product of |Ξai and |Ξbi also 3. H: Hilbert space of the halt qubit. yields a new MPS |Ξa⊗bi with bond dimension χa⊗b = χaχb and 4. P : Hilbert space of head position P = {|pi}. (a⊗b) |Ξa⊗bi =hRb|hRa|U |Lbi|Lai|00i, (16) 5. Γ: Hilbert space of the quantum tape.

(a⊗b) Q (a⊗b) (a⊗b) (a) (b) with U = i Ui for Ui := Ui ⊗ Ui . 6.Σ ⊆ Γ: the set of input states on the tape. 5

7. δQTM: transition map Q × Γ × P × H → Q × Γ × 3. Γ: Space of the tape as a product of local ones, Γn. P × H. 4. Σ ⊆ Γ: the set of input states on the tape. Compared with the CTM and PTM, it is clear that all the components in the configuration of a machine including 5. δc: local computing map Q × Γn → Q × Γn. the head position, tape, processor, transition map and the halt operation become quantum. 6. δs: classical head position shift function Z → Z : The tape is formed by a string of non-interacting p` 7→ p`+1 for p`+1 = p` ± 1, 0. qubits, while each qubit has a quantum position index 7. C: classical control, i.e., a finite set of classical |pi. The transition map δ corresponds to a uni- QTM internal states. tary operator, and there are two important features of it. First, the state of the head position P has quantum The local space Γn on the tape is that for a bit. The correlations with the tape Γ and the processor Q, so the processor Q can be represented as a set of bits, which evolution on the tape and processor itself would not be could interact with each other or not, while the tape Γ unitary if the computing part is isolated from the global contains a string of non-interacting bits. The sets F and unitary on the whole configuration. Second, the ‘quan- Σ are defined for completeness, yet we will not explicitly tum walk’ of the head can at most shift one position in analyze their roles in this work. each step, i.e., from |pi to |p ± 1, 0i. This can be under- The computing maps (or gates) δc specify a two-body stood as a kind of locality in the space P , which, however, interaction between the processor and each bit on the does not correspond to a locality in the real space, which tape. Four types of gate are possible: permutation, is still a classical space. After several steps of computa- stochastic process, unitary evolution, or completely pos- tion, there will be a superposition of the head position itive trace preserving (CPTP) map, also known as quan- and one will not be able to see where the head sits, and tum channel or quantum stochastic process [39]. The uni- the interaction between the processor Q and the tape Γ tary (channel) case generalizes the permutation (stochas- will become nonlocal. The head also has quantum corre- tic) case. There might be final measurements on the tape lations with Γ and Q, so the evolution on Γ and Q would for the LQTM, as we will see later on. not be unitary if the other parts are traced out. The classical control C is formed by a set of classical states {c} that corresponds to the computing part, and it has a starting state c for the starting state, and some B. Local Turing machines 0 halting states {cf } for the halting states of the processor. The function of C is to signal the process of the machine The form (17) is a global description of a TM and does such that the machine halts when the classical control is not reveal the locality of interactions explicitly. For a at a halting state. It is also implicitly present in QCM CTM, the head has a definite position in each step, and while usually not mentioned. needs to move in both directions to achieve universality. The fundamental way to prove universality and study The interaction between the processor and one cbit of the the relation among various models is by simulation [14]. tape is two-body and local in the space of position, i.e., There are many kinds of simulations according to conver- the ‘real’ space (compared to the momentum space) in gence of variables or operator topology [8–10, 21, 40–43]. physics. A PTM can be viewed as a randomized CTM, Our framework of simulation is as follows. The simula- and the computation by a PTM is a randomized per- tion of a TM m by another TM u is a task such that mutation, i.e., a (doubly) stochastic process. Each ‘tra- jectory’ of PTM is a CTM, hence the local structure of u([m], [x]) = [m(x)], ∀x, (18) interactions in CTM carries over to PTM (Appendix A). To make the physical locality explicit and simplify the here [·] represents encoding, e.g., [m] is the bit-string de- functionality of TM, we now introduce the model of local scription of m. The simulation is efficient if there is only TM (LTM). We will prove its universality and draw the a polynomial overhead of cost for all input x. Further- connection with matrix-product states (MPS). Instead more, as [m] is only being read during the simulation, of a global description, a LTM is described via the local [m] does not have to be the input of u, hence in fact interactions between the tape Γ and the processor Q. u([x]) = [m(x)], ∀x, and there exists a program We will show that the model of LTM is equivalent to the standard TM and the circuit model correspondingly. A p([m], [x]) = [u], ∀x, (19) LTM is specified as follows. such that p specifies the process of u to simulate m on Definition 1. A LTM is represented by a tuple arbitrary x. Each x is an input of p since the simulation hQ, F, Γ, Σ, δc, δs,Ci: is to simulate the action of m on x, and both p and u are 1. Q: Space of the internal states. generically x-independent. We will focus on simulation efficiency without a specification of simulation accuracy, 2. F ⊆ Q: the set of starting and halting states of the which simplifies our study and does not affect our con- processor. clusions. 6

Proposition 1. The models of LCTM, CTM, and CCM for swap gate S. As a result, the circuit U can be effi- are equivalent. ciently simulated by a LQTM. The simulation of a LQTM by a circuit in QCM is simple: with the states of the Proof. We only need to show the equivalence between m processor encoded by qubits, each local gate in can LCTM and CTM, LCTM and CCM, since CTM and m be simulated by an array of gates, and in all simulated CCM are known to be equivalent. Given a computa- efficiently by a quantum circuit. tion on LCTM, with a processor Q and a tape Γ of a certain size, each permutation Π acts on a tape bit and The universality of QCM transfers to LQTM. We ob- the processor Q. The simulation by a CTM is simple by serve that the simulation of the gate CZ (20) is non- observing that each step in CTM is a permutation Π. A sequential. It is known that direct sequential unitary gate Π can be simulated by a sequence of Boolean gates simulation of entangling gates are impossible [45]. How- in CCM. A Boolean circuit acts on |Γ|+|Q| bits can sim- ever, with teleportation we find the structure of LQTM ulate the LCTM efficiently, for |Q| (|Γ|) as the number can be further simplified. of bits to represent states of Q (Γ). Given a CTM which is a sequence of configurations, Proposition 3. There exists a unilateral universal the simulation by LCTM is as follows. If at step ` the LQTM. head position is p`, the symbol at position p` on the tape is γ(p`), and the internal state is q` ∈ Q\F , then the Proof. The non-sequential simulation of the gate CZ (20) transition to the next step is simulated by a shift opera- can be converted as a sequential one with teleportation tion on the head p` 7→ p`+1, for p`+1 = p` ± 1, 0 ∈ Z, and gadget. With the MPS form of the Bell state |ωi dis- a permutation operation on the corresponding tape bit cussed in section II C, a gate CZij can be simulated as and the processor to realize (q`, γ(p`)) 7→ (q`+1, γ(p`+1)). Given a Boolean circuit, each gate in it can be simulated CZij|ψii|ψji|0ie|0ia (21) m m efficiently by a local permutation in a LCTM. = σα Miβ UβaCZjeSαeUαaSie|ψii|0iα|ψji|0iβ|0ie|0ia. It is also clear to see there exists a universal LTM such m m The Bell measurement Miβ with Pauli correction σα will that it can simulate a given LTM efficiently. The univer- teleport the state of i to α. This product of unitary gates sality can also be seen from the universality of Boolean is sequential, and qubits e and a belong to the processor, circuits, which states that any Boolean function can be and qubits i and β on the tape will be measured. Such computed efficiently by a Boolean circuit. a LQTM is unilateral while the exception is that Bell When the bits in LTM are qubits and the computing measurements have to be done on the tape at the end maps are unitary operations, we arrive at a LQTM. The of the computation. A Bell measurement here can be key difference from the classical cases is the quantum simplified to projective measurements on i and β since superposition, which is an additional feature and shall the state of i is |0i. not be viewed as a generalization of mixing. Mixing and probability can be included in the quantum formalism This compares to the classical case. A CTM with a by quantum channels. However, replacing unitary op- one-direction moving head is not universal. It is also erations by quantum channels do not change the com- known as a finite state transducer, which is a determinis- putational power of quantum computers [44] due to the tic finite automata that the input is only read once [14]. dilation theorem [33–35]. As far as we know, the dilation This highlights the crucial role of entanglement and tele- theorem does not exist for the classical case; namely, it portation for quantum computing. is not clear if a stochastic process can be embedded in a A unilateral LQTM is nothing but the process to pre- permutation on a larger space. Instead, a doubly stochas- pare MPS. The interaction between processor Q and tape tic process is a convex sum of permutations on the same Γ is sequential, and furthermore, we showed that Q can space. be automatically decoupled at the end of the computa- It is well known that QCM is equivalent to QTM [9, tion, with the output contained solely on the tape Γ. 10, 12, 27], so we will not show the equivalence between QTM and LQTM directly. Instead, we will show the equivalence between QCM and LQTM. C. Multipartite setting Proposition 2. The models of LQTM and QCM are equivalent. In general, a LQTM can have multiple tapes and pro- cessors as in the classical cases for various practical pur- Proof. Given a unitary circuit U in the QCM, its gates poses, e.g., each processor can be a small system, even a are assumed from the universal gate set {CZ,H,T } [39]. single qubit. This requires a slight extension of MPS to The Hadamard gate H and T gate can be easily simu- tensor-network states (TNS). lated. Each gate CZij acting on qubits i and j can be simulated easily with a qubit ancilla e at state |0i which In a MPS the correlator (processor) is acted upon belongs to the processor with by a sequence of quantum channels, without a detailed structure of the channels and the free propagations be- CZij|ψii|ψji|0ie = SieCZjeSie|ψii|ψji|0ie (20) tween them. To make this clear, let us define MPS 7

FIG. 3. Schematic diagrams of examples of TNS. The boxes with numbers represent channels, after dilation, each channel yields a spin that belongs to the final TNS. The left one with a linear information flow is the usual (linear) MPS with nine stages of the flow. The dashed circles highlight the stages in other states: the sequential TNS has five stages, radial TNS has two stages, PEPS has three stages, and the coupled MPS also has three stages. The channels within a stage can also be ordered according to their flows. with more general information flows as quantum tensor- 1D systems, while PEPS is used for 2D or 3D systems on network states (TNS), and the standard setting with a different lattices. linear information flow as (linear) MPS. The flow in a TNS represents the evolution of the an- Below we introduce TNS from the viewpoint of chan- cilla (correlator), corresponding to the sequence of matrix nel networks. For a directed acyclic graph G = (E,V ) multiplications (or tensor contractions). For LQTM, the with edge set E and vertex set V , assign a quantum chan- lattice of qubits form the tape, the correlator serves as nel to each vertex, and then the composition of quantum the processor, and there might be qubits that need to channels E := E|V | ◦ · · · E2 ◦ E1 forms an acyclic quan- be measured at the end of computation due to the sim- tum channel network. The requirement of cycle-free is ulation of entangling gates. A multipartite LQTM has to avoid causality problem, i.e., the output of a channel a more complicated information flow structure, with its cannot become the input of it at a later time. Also note output described as a tensor-network state (TNS), which here in this section, a general CP map, which may not can still be simulated by a single-tape single-processor be trace-preserving or dimension-preserving, is viewed as universal LQTM, since a TNS is also a MPS with a larger a quantum channel. bond dimension. The output of E` is from the input of E`+1, and each Proposition 4. A LQTM with multiple tapes and/or channel E` can contain several parts, e.g., E` = E` ⊗E` or 1 2 processors can be simulated by a single-tape single- E` = p1E`1 +p2E`2 for p1+p2 = 1 as a convex combination, or other complicated forms, and accordingly, the input processor universal LQTM. and output of each channel E` can contain several parts. Similar definitions can be found in other settings [46–48], Proof. If the processor is single-partite while the tape is and have been called quantum networks [47], quantum m-partite, then in the MPS circuit each unitary opera- channels with memory [48], while the definition above is tor acts on the processor and m qubits, with one from used to introduce TNS. each tape. If the processor is also multi-partite, then this leads to multi-tape multi-processor machine, for which Given the Kraus operator representation {K } of i there could be coupling between different parts, and this a channel E, which may not be trace-preserving or corresponds to the coupled MPS scheme shown in Fig. 3. dimension-preserving, the channel can also be written as The resulting TNS on the tape is still a MPS, which can an operator V = P |iiK , which is an isometry if trace- i i be prepared on a universal LQTM. preserving. For a channel network E = EN ◦ · · · E2 ◦ E1 with boundary states |Ii and hO|, given the operator V` of each channel E`, a TNS is IV. CONCLUSION Y |Ψi = hO| V`|Ii. (22) ` In this work a model of local Turing machines is intro- duced. We show that the model of local classical (quan- The channels act on the correlation space. Examples tum) Turing machine is equivalent to the model of stan- of TNS are shown in Fig. 3. The linear MPS has the dard classical (quantum) Turing machine and classical simplest information flow structure, while all others are (quantum) circuit model. The structure of a local quan- still MPS but with branches. Note that the motivation to tum Turing machine can be described based on matrix allow non trace-preserving or dimension-preserving chan- product states (and teleportation). Our work simplify nels is that the norm of a TNS does not play a central the construction of quantum Turing machines and estab- role. For instance, in the PEPS form the channel at each lish a close relationship with quantum many-body sys- vertex is usually not trace-preserving, and in the cou- tems. pled MPS form there are dimension-altering channels. While the interaction between a tape bit and the pro- In many-body physics, MPS is usually used to represent cessor seems no more easier than that between bits, the 8 model is suitable for situations when direct interaction this actually does not cause physical problems thanks among bits is difficult, such as distributed computing to different interpretations of probability: the frequency and communication and when the tape and processor interpretation and . In the for- encoded in different physical systems. Models like the mer one, probability is the ratio n/N of the number of qubus model in quantum optics can be viewed as special times n for the occurrence of a particular event to the kinds of local Turing machines. Finally, the processor total amount of runs N. In the latter one, given a total can also contain multiple parts, and the design and com- amount N of a collection of objects, the probability of a plexity of its structure are nontrivial subject on its own. particular object is the weight n/N given n copies of this This work does not intend to study Turing machine object. The probability in PTM is in the frequency in- from the viewpoint of computer scientists. Issues like terpretation. As a result, a PTM can be viewed as a ran- grammar, language, complexity etc, and relations with domized CTM. However, there is no such interpretations other universal quantum computing models shall also be of , which causes the subtlety of pursued for separate investigations. locality for QTM as we studied in the main text. A LPTM can be defined by deleting the randomness of head positions. A LPTM can also be viewed as a V. ACKNOWLEDGEMENTS LCTM with one additional tape of pbits. Given a LPTM, it can be simulated by a PTM easily since LPTM is a This research has been supported by NSERC. The au- restricted version of PTM. Given a PTM, the simulation thor acknowledges the Department of Physics and As- by a LPTM contains two steps: first decompose the PTM tronomy at the University of British Columbia, Vancou- as pbits and a collection of CTMs, then the CTMs each ver, where the first draft of the paper was completed. can be simulated by a LCTM according to the pbits. With this, we see that the model of LPTM is equivalent to PTM, except that the pbits are given as a free resource. Appendix A: Probabilistic Turing machines

Here we present a study of probabilistic Turing ma- 1. Stochastic matrix product states chines (PTM) and the local versions. Recall that a PTM can be understood as a randomized CTM, and the ran- Here we show that pbits (when not free) can be pre- domness can be realized by random variables, which can pared by a LPTM. The reason is that, the states of pbits, be encoded by a string of pbits on a so-called random as probability vectors, can be written as stochastic MPS tape, and the computation by a PTM is a random- (sMPS)(see, e.g., Ref. [49]). We show that each pbit on ized permutation, which can be described by a doubly the tape is only acted upon once, i.e., the read/write stochastic matrix. Also each step of a PTM is a stochas- head is unilateral, and the processor is automatically de- P tic matrix S = λ pλΠλ for a set of permutations Πλ coupled at the end. with probability pλ, which is represented on the random It is shown that [49] any probability vector |pi can be tape. The product of a sequence of stochastic matrices written as a sMPS form can be expressed as X [1] [1] [2] [N−1] [N] |pi = A P A ··· P A |i1 . . . iN i (A3) ! i1 i2 iN Y X Y i1,...,iN Si = pλ1 pλ2 ··· Πλi , (A1) i λ1,λ2,... i such that S[n] := P [n−1]C[n] is a stochastic matrix for C[n] = P A[n]. Furthermore, we find this can also and each sequence in the parenthese above represents a in in CTM with corresponding probability. That is, a CTM be proved using the non-negative matrix factorization realizes a particular trajectory of a PTM. Each permu- (NMF) method [50–53]. A matrix is non-negative iff all its entries are equal to or greater than zero. In particu- tation Πλi acts on the processor and a single cbit. The output of a PTM contains the final states γ ∈ Γ on the lar, given a m × n non-negative matrix A, it can be well tape with probability approximated by X A0 = PDQt (A4) P(γ) = P(p, q, γ), (A2) p∈Z,q∈Q such that the generalized Kullback-Leibler divergence 0 where the sum is over position p and internal state q for D(A||A ) is minimized for k ≤ min(m, n), wherein P is m×k, Q is n×k, and both are column stochastic, and D the same γ. P P Observe that the PTM is fully probabilistic: the com- is diagonal non-negative such that i Dii = ij Aij [52]. putation on the whole configuration of the machine is The elements Dii play similar roles with singular values. stochastic. As a result, there is also a probability dis- Given a multi-partite probability vector |pi written as |pi = Pd p(i , . . . , i )|i . . . i i, define a matrix C tribution of the head position: it is uncertain where the i1,...,iN 1 N 1 N N−1 head is during each step of the computation. However, with dimension d × d and elements Ci1,(i2,...,iN ) = 9

t p(i1, . . . , iN ). By NMF C = PDQ and The next problem now is to automatically decouple the correlator from the system at the final step. The r1 X method is to apply NMF sequentially again. Let Sn = C = P D Qt , (A5) i1,(i2,...,iN ) i1,a1 a1,a1 a1,(i2,...,iN ) P [n] i Bi |ini. Now assume the bond dimension is χ. a1 n n First, as the matrix (1 ⊗ h`|)SN is non-negative, it can for r ≤ d. Denote D Qt = be factorized as 1 a1,a1 a1,(i2,...,iN ) i1 p(a1, i2, . . . , iN ), and a row vector B with element Bi1 = P , then C = a1 i1,a1 i1,(i2,...,iN ) 0 r1 (1 ⊗ h`|)S = S T (A10) P Bi1 p(a , i , . . . , i ). Put Bi1 on the most left. N N N a1 a1 1 2 N The coefficients p(a1, i2, . . . , iN ) can form a new matrix C0. By NMF again 0 for SN column stochastic and TN non-negative. The ma- r r X1 X2 trix TN SN−1 can be factorized again, and then C = Bi1 Bi2 p(a , i , . . . , i ), (A6) i1,(i2,...,iN ) a1 a1,a2 2 3 N a1 a2 |pi = S0 ··· S0 |r0i, (A11) for r ≤ r d, and elements Bi2 form a r × r matrix. N 1 2 1 a1,a2 1 2 At the end

r1,...,rN 0 X for each Sn column stochastic and a probability vec- p(i , . . . , i ) = Bi1 Bi2 ··· BiN−1 BiN , 0 0 1 N a1 a1,a2 aN−2,aN−1 aN −1 tor |r i. Now each Sn can be embedded into a column a1,...,aN stochastic matrix Sn of size dχ × χ and as the result, (A7) and also 0 d |pi = SN ··· S2S1|r i. (A12) X [1] [2] [N−1] [N] |pi = hB |B ··· B |B i|i . . . i i (A8) i1 i2 iN−1 iN 1 N i1,...,iN Given = P |i iB[n], a non-unique square column- Sn i n in such that each S[n] := P B[n] is column stochas- n in in stochastic matrix Qn of dimension dχ can be defined such tic. The dimension of B matrices is upper bounded by that Sn occupies its first block-column. The matrix Qn dN/2−1 ×dN/2. Note this is a left-canonical form, a right- can be viewed as SEn , the stochastic version of TEn for a canonical form and mixed form can also be derived analog quantum channel En according to section II A. As the re- with the quantum case [4]. Also two boundary probabil- sult, any probability vector can be generated sequentially ity vectors h`| and |ri can be pulled out such that using stochastic matrices {Qn}, each acting on the corre- lator and a pbit initialized at |0i, such that the correlator X [1] [N] |pi = h`|B ··· B |ri|i . . . i i. (A9) is automatically decoupled at the end. i1 iN 1 N i1,...,iN

[1] Ian Affleck, Tom Kennedy, Elliott H Lieb, and Hal 2009. Tasaki. Rigorous results on valence-bond ground states [8] . Quantum theory, the Church-Turing in antiferromagnets. Phys. Rev. Lett., 59(7):799, 1987. principle and the universal quantum computer. In Pro- [2] Mark Fannes, Bruno Nachtergaele, and Reinhard F ceedings of the Royal Society of London A: Mathematical, Werner. Finitely correlated states on quantum spin Physical and Engineering Sciences, volume 400, pages chains. Commun. Math. Phys., 144(3):443–490, 1992. 97–117. The Royal Society, 1985. [3] David Perez-Garc´ıa,Frank Verstraete, Michael M Wolf, [9] Ethan Bernstein and . Quantum com- and J Ignacio Cirac. Matrix product state representa- plexity theory. SIAM Journal on Computing, 26(5):1411– tions. Quant. Inform. Comput., 7(5-6):401–430, 2007. 1473, 1997. [4] Ulrich Schollw¨ock. The density-matrix renormalization [10] A. Chi-Chih Yao. Quantum circuit complexity. In Foun- group in the age of matrix product states. Ann. Phys., dations of Computer Science, 1993. Proceedings., 34th 326(1):96–192, 2011. Annual Symposium on, pages 352–361. IEEE, 1993. [5] J. Eisert, M. Cramer, and M. B. Plenio. Colloquium: [11] Attila Kondacs and John Watrous. On the power of quan- Area laws for the entanglement entropy. Rev. Mod. Phys., tum finite state automata. In Proceedings 38th Annual 82:277–306, Feb 2010. Symposium on Foundations of Computer Science, pages [6] A Yu Kitaev. Fault-tolerant quantum computation by 66–75. IEEE, 1997. anyons. Annals of Physics, 303(1):2–30, 2003. [12] Lance Fortnow. One complexity theorist’s view of [7] Hans J Briegel, David E Browne, W D¨ur, Robert quantum computing. Theoretical Computer Science, Raussendorf, and Maarten Van den Nest. Measurement- 292(3):597–610, 2003. based quantum computation. Nat. Phys., 5(1):19–26, [13] John Watrous. Quantum computational complexity. En- 10

cyclopedia of complexity and systems science, pages 7174– algebras. Proc. Am. Math. Soc., 6(2):211–216, Apr 1955. 7201, 2009. [34] Karl Kraus. States, Effects, and Operations: Fundamen- [14] Sanjeev Arora and Boaz Barak. Computational complex- tal Notions of Quantum Theory, volume 190 of Lecture ity: a modern approach. Cambridge University Press, Notes in Physics. Springer-Verlag, Berlin, 1983. Cambridge U.K., 2009. [35] Man-Duen Choi. Positive linear maps on complex matri- [15] Rolf Landauer. Irreversibility and heat generation in ces. Linear Algebra Appl., 290(10):285–290, 1975. the computing process. IBM J. Res. Dev., 5(3):183–191, [36] Ingemar Bengtsson and Karol Zyczkowski.˙ Geometry 1961. of Quantum States. Cambridge University Press, Cam- [16] C. H. Bennett. Logical reversibility of computation. IBM bridge U.K., 2006. J. Res. Dev., 17(6):525–532, 1973. [37] C. Sch¨on, E. Solano, F. Verstraete, J. I. Cirac, and [17] Seth Lloyd. Ultimate physical limits to computation. M. M. Wolf. Sequential generation of entangled multi- Nature, 406(6799):1047–1054, 2000. qubit states. Phys. Rev. Lett., 95:110503, Sep 2005. [18] John M. Myers. Can a universal quantum computer be [38] Also C needs to be substituted by a punctured version 0 fully quantum? Phys. Rev. Lett., 78:1823–1824, Mar C according to an efficiency argument [9, 12], and there 1997. are also blank symbols (vacuum) on the tape, while here [19] Masanao Ozawa. Quantum nondemolition monitoring of only physical issues are concerned. universal quantum computers. Phys. Rev. Lett., 80:631– [39] Michael A. Nielsen and Isaac L. Chuang. Quantum Com- 634, Jan 1998. putation and Quantum Information. Cambridge Univer- [20] Masanao Ozawa and Harumichi Nishimura. Local tran- sity Press, Cambridge U.K., 2000. sition functions of quantum Turing machines. RAIRO- [40] Maarten Van den Nest. Simulating quantum computers Theoretical Informatics and Applications, 34(05):379– with probabilistic methods. Quant. Inform. Comput., 402, 2000. 11(9-10):784–812, 2011. [21] Yu Shi. Remarks on universal quantum computer. Phys. [41] Michael J. Bremner, Richard Jozsa, and Dan J. Shep- Lett. A, 293(5):277–282, 2002. herd. Classical simulation of commuting quantum com- [22] Takayuki Miyadera and Masanori Ohya. On halting pro- putations implies collapse of the polynomial hierarchy. In cess of quantum Turing machine. Open Systems & Infor- Proceedings of the Royal Society A: Mathematical, Phys- mation Dynamics, 12(03):261–264, 2005. ical and Engineering Science, pages 459–472, 2011. [23] Willem Fouch´e, Johannes Heidema, Glyn Jones, and [42] Dong-Sheng Wang. Weak, strong, and uniform quantum Petrus H Potgieter. Deutsch’s universal quantum Tur- simulations. Phys. Rev. A, 91:012334, Jan 2015. ing machine (Revisited), 2007. arXiv:quant-ph/0701108. [43] Bert E Fristedt and Lawrence F Gray. A modern ap- [24] Simon Perdrix and Philippe Jorrand. Classically- proach to probability theory. Springer Science & Business controlled quantum computation. Electronic Notes in Media, 2013. Theoretical Computer Science, 135(3):119–128, 2006. [44] Dorit Aharonov, Alexei Kitaev, and Noam Nisan. Quan- [25] Antonio A. Lagana, M. A. Lohe, and Lorenz von Smekal. tum circuits with mixed states. In Proceedings of the Construction of a universal quantum computer. Phys. Thirtieth Annual ACM Symposium on Theory of Com- Rev. A, 79:052322, May 2009. putation (STOC), pages 20–30. ACM, 1997. [26] Dieter van Melkebeek and Thomas Watson. Time-space [45] L. Lamata, J. Le´on,D. P´erez-Garc´ıa, D. Salgado, and efficient simulations of quantum computations. Theory E. Solano. Sequential implementation of global quantum of Computing, 8(1):1–51, 2012. operations. Phys. Rev. Lett., 101:180506, Oct 2008. [27] Abel Molina and John Watrous. Revisiting the simula- [46] John Watrous. The theory of quantum information. Cam- tion of quantum turing machines by quantum circuits. bridge University Press, 2018. Proc. Royal Soc. A, 475(2226):20180767, 2019. [47] Giulio Chiribella, Giacomo Mauro D’Ariano, and Paolo [28] Daniel Gottesman and Isaac L Chuang. Demonstrat- Perinotti. Theoretical framework for quantum networks. ing the viability of universal quantum computation us- Phys. Rev. A, 80:022339, Aug 2009. ing teleportation and single-qubit operations. Nature, [48] Dennis Kretschmann and Reinhard F. Werner. Quantum 402(6760):390–393, 1999. channels with memory. Phys. Rev. A, 72:062323, Dec [29] Simon Perdrix and Philippe Jorrand. Measurement- 2005. based quantum Turing machines and their universality, [49] Kristan Temme and Frank Verstraete. Stochastic matrix 2004. arXiv:quant-ph/0404146. product states. Phys. Rev. Lett., 104:210502, May 2010. [30] Janet Anders, Daniel K. L. Oi, Elham Kashefi, Dan E. [50] Daniel D. Lee and H. Sebastian Seung. Learning the parts Browne, and Erika Andersson. Ancilla-driven universal of objects by non-negative matrix factorization. Nature, quantum computation. Phys. Rev. A, 82:020301, Aug 401(6755):788–791, 1999. 2010. [51] Daniel D. Lee and H. Sebastian Seung. Algorithms for [31] Timothy J. Proctor, Erika Andersson, and Viv Kendon. non-negative matrix factorization. In Advances in neural Universal quantum computation by the unitary control information processing systems, pages 556–562, 2001. of ancilla qubits and using a fixed ancilla-register inter- [52] Ngoc-Diep Ho and Paul Van Dooren. Non-negative ma- action. Phys. Rev. A, 88:042330, Oct 2013. trix factorization with fixed row and column sums. Linear [32] Timothy P Spiller, Kae Nemoto, Samuel L Braunstein, Algebra Appl., 429(5):1020–1025, 2008. William J Munro, Peter van Loock, and Gerard J Mil- [53] Zhirong Yang, He Zhang, Zhijian Yuan, and Erkki Oja. burn. Quantum computation by communication. New J. Kullback-leibler divergence for nonnegative matrix fac- Phys., 8(2):30, 2006. torization. In International Conference on Artificial Neu- [33] W. Forrest Stinespring. Positive Functions on C*- ral Networks, pages 250–257. Springer, 2011.