betaFeedback

WorksMathematics

A Polynomial-Scaling PDE Solver with Entanglement-Basis Tensor Networks

Abstract

We develop a finite element method (FEM) for partial differential equation (PDE) solver based on the entanglement-basis representation introduced in our companion work. By lifting non-linear finite-element equations into an augmented coefficient space, the governing PDE together with boundary, initial, and inter-element constraints can be expressed through a unified quadratic residual minimization. Although this augmented space grows exponentially with the number of elements, its tensor-product structure allows it to be represented efficiently using tensor networks. Using the matrix product state (MPS) as a concrete example, we show that density matrix renormalization group (DMRG) sweeps enable element-by-element optimization without explicitly constructing the full augmented space. For bounded bond dimension, the resulting computational cost scales polynomially with the number of finite elements. We extend the framework to time-dependent problems through implicit temporal discretization and demonstrate convergence under both mesh and polynomial refinement using diffusion equations.

Introduction

Partial differential equations (PDEs) underpin quantitative modeling across physics and engineering. Because analytical solutions are available only in restricted cases, practical applications rely on numerical methods such as finite difference (FD) [1, 2, 3], finite element (FE) [4, 5, 6, 7], and spectral element (SE) methods [8]. These approaches work by replacing any continuous PDE by a finite algebraic problem via different discretization schemes. The methods also provide systematic convergence under mesh or basis refinement causing their computational cost to grow with resolution, dimensionality, and the complexity of the governing PDE.

Tensor networks (TNs) provide a complementary framework for representing correlated systems efficiently [9]. When correlations among the degrees of freedom are sufficiently compressible, such as matrix product states (MPS) [10, 11, 12], projected entangled pair states (PEPS) [13], and multiscale entanglement renormalization ansatz (MERA) [14], a TN can approximate a high dimensional state using far fewer parameters than a direct representation. This structure also permits the use of established variational algorithms, including the density matrix renormalization group (DMRG) [15, 16], time-evolving block decimation (TEBD) [17], regularized time evolution, and tree and multi-grid methods [18, 19], for optimizing correlated high-dimensional systems. Therefore, many of recent works have explored TNs as compressed representations for PDEs’ numerical solutions [20, 21, 22, 23].

In our companion work, Tensor-Network Finite Elements for Analytic Operator Equations, we introduced a unified TN-FE formulation for analytic operator equations (OEs) [24] which is a generalized equation that covers differential, integral, non-linear, memory, and delay operators. The construction maps a discretized operator equation to a hierarchy of multi-linear interaction tensors and represents the resulting coefficient state as a TN. This places broad classes of OEs within a common algebraic framework, incorporates correlations between FE directly into the solution representation, and connects FE discretization with classical and quantum-inspired TN algorithms. In contrast to the companion work, which establishes the general OE framework, the present paper focuses on the explicit implementation and numerical consequences of this formulation.

The general OE formalism in our companion work does not, however, resolve several practical choices that arise when actually solving PDEs. In conventional FEM, the approximation space, weak formulation, continuity requirements, boundary terms, and discrete operators are commonly designed in relation to the differential order and structure of the specific PDEs[5]. Conforming methods build inter-element compatibility into the global basis, whereas discontinuous formulations recover it through fluxes, penalties, or stabilization terms[25]. Consequently, although FEM provide a general discretization philosophy, their concrete realization often remains problem dependent.

In this work, we reorganize these requirements within the TN-FE framework. We begin with independent local representations on each element and impose the governing PDE, inter-element continuity, and boundary conditions as components of a variational objective. Continuity and boundary constraints are therefore introduced through explicit residual operators rather than being built entirely into a globally conforming basis. This separates the choice of local approximation functions from the conditions that couple elements and constrain the boundary. The resulting formulation retains the systematic local approximation of FEM while allowing the same TN solver to be used with different elemental representations and boundary relations. Analytic nonlinearities are treated through the augmented coefficient construction introduced in the companion work, enabling their inclusion seamlessly within the same variational framework.

The remainder of this paper is organized as follows. In Sec. II, we introduce the mathematical notations used throughout this works. In Sec. III, we summarize important results of TN-FE framework from our companion work that will be used without elaborate proof. In Sec. IV, we apply TN-FE discretization scheme on a general PDE with some concrete basis choices. We, then, add on inter-element continuities and boundary conditions as additional terms in the residual target optimization in § 0.6. In Sec. VI, we further specialize to one-dimensional for practical demonstration with MPS ansatz and DMRG algorithm. We perform the complexity analysis in Sec. VII. In Sec. VIII, we demonstrate the method performance through a concrete PDE problem. Finally, in Sec. IX, we discuss implications, limitations, and future perspective of the proposed approach.

Notations

For the ease of adopting results from our companion work, we will utilize the same mathematical notations as following. First, any non-scalar tensor will be represented with bold face Romans, e.g., a\mathbf{a}, while scalar and tensor components will be represented with italic Romans, e.g., aαβa_{\alpha\beta} where Greek characters represent tensor indices. If any index indicates labeling instead of tensor components upright Romans will be used instead, e.g., aija_{ij}.

We use bracket notation to represent an array of the expression inside that got iterated over each of specified indices, i.e., if α∈Z+\alpha\in\mathbb{Z}_{+}, then [aαβ]α=[a1β,a2β,⋯ ][a_{\alpha\beta}]_{\alpha} = [a_{1\beta}, a_{2\beta}, \cdots] where the subscript αγ\alpha\gamma can be dropped if it is clear by context. We also overload the bracket notation to the indices as well, e.g., a=[aα1α2⋯]=[aαi]\mathbf{a} = [a^{\alpha_1\alpha_2\cdots}] = [a^{\alpha_i}].

We also utilize Einstein summation for repeated indices. Finally, we use “⊗\otimes” as tensor product, “⊙\odot” as tensor contraction, “⊕\oplus” as tensor space direct sum, “⊞\boxplus” as tensor block direct sum, and any subscript indices on these symbols indicate that the operations only act on that specific indices.

Overview of the Tensor-Network Finite Element Framework

Finite Element Representation of Analytic Operator Equations

Let Ω\Omega denotes the domain of independent variable q\mathbf{q}, with H(Ω)\mathcal{H}(\Omega) denotes the admissible solution space, and R(Ω)\mathcal{R}(\Omega) denote the residual space. A general OE over Ω\Omega is

L[u]=0(1)\mathbf{L}[\mathbf{u}] = \mathbf{0} \tag*{(1)}

where L:H(Ω)→R(Ω)\mathbf{L} : \mathcal{H}(\Omega) \to\mathcal{R}(\Omega) and u=u(q)∈H(Ω)\mathbf{u} = \mathbf{u}(\mathbf{q}) \in\mathcal{H}(\Omega). If we partition Ω\Omega into NN elements Ων\Omega_\nu for ν∈{1,…,N}\nu\in\{1,\ldots,N\} and introduce local basis functions bν,βνb_{\nu,\beta_\nu} supported on Ων\Omega_\nu with assumption that all elements contain the same number of basis functions, the element-wise approximation is

u≈cνβνbνβν(2)\mathbf{u} \approx c^{\nu\beta_\nu} b_{\nu\beta_\nu} \tag*{(2)}

where ν\nu is substituted with a tensor index ν\nu and [cνβ][c^{\nu\beta}] is expansion coefficient tensor. In a Galerkin weak formulation, the residual is projected onto this test space,

∫Ωbν′βν′∗L[cνβνbνβν] dq=0(3)\int_{\Omega} b_{\nu'\beta'_\nu}^* \mathbf{L}\left[c^{\nu\beta_\nu}b_{\nu\beta_\nu}\right] \,\mathrm{d}\mathbf{q} = 0 \tag*{(3)}

for all test functions bν′βν′b_{\nu'\beta'_\nu}. This reduces the OE to a finite algebraic problem for the coefficient tensor.

For an analytic operator, L\mathbf{L} may be expanded as a converging Fréchet-Taylor series [26, 27, 28, 29, 30] of the form

L[u]=∑i=0∞1i!∫Ωik[ηi]⊙⨂j=1i∂qjηjuj dqj(4)\mathbf{L}[\mathbf{u}] = \sum_{i=0}^{\infty} \frac{1}{i!} \int_{\Omega_i} \mathbf{k}^{[\eta_i]} \odot\bigotimes_{j=1}^{i} \partial_{\mathbf{q}_j}^{\eta_j}\mathbf{u}_j \,\mathrm{d}\mathbf{q}_j \tag*{(4)}

where ηj∈N0\eta_j \in\mathbb{N}_0, uj=u(qj)\mathbf{u}_j = \mathbf{u}(\mathbf{q}_j), and k[ηi]\mathbf{k}^{[\eta_i]} is an ii-linear interaction kernel with proper contraction to each ∂qjηjuj\partial_{\mathbf{q}_j}^{\eta_j}\mathbf{u}_j. After inserting this, the weak form becomes a hierarchy of multi-linear algebraic contributions,

∑igi,νβ′,[νjβj]⊙⨂j=1icνjβj=0(5)\sum_i \mathbf{g}_{i,\nu\beta',[\nu_j\beta_j]} \odot\bigotimes_{j=1}^{i} c^{\nu_j\beta_j} = 0 \tag*{(5)}

where [gi,νβ′,[νjβj]]ν′β′,[νjβj][\mathbf{g}_{i,\nu\beta',[\nu_j\beta_j]}]_{\nu'\beta',[\nu_j\beta_j]} is the basis projection tensor of the iith order correlation term of L\mathbf{L}.

Augmented coefficient space

In conventional finite elements, the global approximation space is assembled as a direct sum of the local spaces:

Φ=⨁ν=1NΦν(6)\Phi= \bigoplus_{\nu=1}^{N} \Phi_\nu \tag*{(6)}

where Φν=Span⁡({bνβ∣β∈{1,…,B}})\Phi_\nu= \operatorname{Span}(\{b_{\nu\beta} \mid\beta\in\{1,\ldots,B\}\}) and BB is the number of basis functions in each element. In this representation space, any linear L\mathbf{L} can be represented directly as a matrix equation. However, for non-linear analytic L\mathbf{L}, additional intelligent variable substitution and/or iterative root finding algorithm is required.

The TN-FE construction can represent these correlation linearly at the cost of enlarging the representation space by lifting Φ\Phi to its Fock space defined as

Ψ=⨁i=0∞Φ⊗i.(7)\Psi= \bigoplus_{i=0}^{\infty} \Phi^{\otimes i}. \tag*{(7)}

With this construction, any product ⨂νjcνjβj\bigotimes_{\nu j}\mathbf{c}^{\nu_j\beta_j} can be replaced by an independent coefficient in Ψ\Psi. Furthermore, with the multi-linear nature of L\mathbf{L}, we have gauge freedom to permute terms in the product such that they are in the order of element label. This means that by introducing, for each element, empty basis function bν0b_{\nu0} and letting JJ be the largest correlation order of L\mathbf{L}, we can work in the basis system that, for each element ν\nu, B+1B+1 basis functions (including bν0b_{\nu0}) can be allocated to JJ slots. Hence, Eq. (5) can be replaced with

G[βνj′],[βνj]⊙c[βνj]=0(8)\mathbf{G}_{[\beta'_{\nu_j}],[\beta_{\nu_j}]} \odot\mathbf{c}^{[\beta_{\nu_j}]}=0 \tag*{(8)}

where jj indicates the slot number and G[βνj′],[βνj]\mathbf{G}_{[\beta'_{\nu_j}],[\beta_{\nu_j}]} is the projection tensor of L\mathbf{L} in this augmented space. For cleanliness, we will directly use c\mathbf{c} and G\mathbf{G} for coefficient and operator projection tensor, respectively, without the indices and brackets.

These results already capture the idea behind TN-FE formulation, but introducing TN visualization can make the application of the method more practical and intuitive. For instance, the left hand side of Eq. (8) can be neatly represented in TN format as shown in Figure 1 where the box nodes representing G\mathbf{G} and c\mathbf{c} are connected through the bonds that represent index contraction between them.

Figure 1. TN representing the residual term of the linear problem constructed from a general analytic OE with TN-FE framework (Eq. (8)). Each box node represent a tensor in the expression. Free indices are represented with hanging bonds while index contractions are represented with connecting bonds. Each bond can correspond to a group of indices. In this case, each bond represents JJ indices of the same element. (Adapted from [24])

Tensor Network Compression

From the construction of Fock space (Eq. (7)), direct storage of c\mathbf{c} scales exponentially with number of elements and correlation order as O(BNJ)O(B^N J). Hence, the Fock space can only be used as a formal representation for correlated system to be further compressed by any TN ansatz.

There is no definite rule to design a TN ansatz, but one popular assumption is the locality of correlation where the correlation is expected to only appear between nearby elements. Figure 2 illustrates representative TN ansatzes of c\mathbf{c} (Figure 2a) with locality assumption for different geometric restriction: matrix product state (MPS, Figure 2b) for one-dimensional element chain with only correlation between neighbors, projected entangled pair state (PEPS, Figure 2c) for two-dimensional grid with only correlation between axial neighbors, and higher-order TN (Figure 2d) for more than pair-wise correlation.

Figure 2. TN with locality ansatzes of coefficient tensor under different geometric restriction. Here, σ\sigma’s indicate tensor indices responsible for each local correlation. (a) No locality assumption: same coefficient tensor as in Figure 1. (b) Matrix product state (MPS): elements align in one-dimensional chain with correlation only between neighbors. (c) Projected entangled pair state (PEPS): elements align in two-dimensional grid with correlation between adjacent nodes along the grid lines. (d) Higher-order TN assumption where shaded regions represent index hyper-contraction. (Adapted from [24])

If the maximum bond dimension (range of σ\sigma’s) in a TN is SS, and the maximum bond degree (including hyper-contraction) in the TN is MM, then the storage requirement is

O(NBJSM)(9)O(NB^{J}S^{M}) \tag*{(9)}

instead of O(BNJ)O(B^N J), i.e., not exponentially growing with NN. More generally, the storage remains polynomial in NN when the local correlation order JJ, bond dimension SS, and network degree MM remain bounded.

Variational solution of the discretized equation

For a coefficient tensor c\mathbf{c}, define the projected residual

h[βνj′](c)=G[βνj′],[βνj]⊙c[βνj].(10)\mathbf{h}_{[\beta'_{\nu_j}]}(\mathbf{c})=\mathbf{G}_{[\beta'_{\nu_j}],[\beta_{\nu_j}]}\odot\mathbf{c}^{[\beta_{\nu_j}]}. \tag*{(10)}

The TN-FE solution is obtained by minimizing the weighted residual norm

J(c)=W[βνj′],[βνj](h[βνj′](c)⊙h[βνj](c)),(11)J(\mathbf{c})=W^{[\beta'_{\nu_j}],[\beta_{\nu_j}]}\left(\mathbf{h}_{[\beta'_{\nu_j}]}(\mathbf{c})\odot\mathbf{h}_{[\beta_{\nu_j}]}(\mathbf{c})\right), \tag*{(11)}

where W[βνj′],[βνj]W^{[\beta'_{\nu_j}],[\beta_{\nu_j}]} is a positive-definite metric on the residual space. Since we parametrize the search space to that of particular TN ansatz manifold TTN\mathcal{T}_{\mathrm{TN}}, i.e.,

cTN=arg⁡min⁡c∈TTNJ(c)(12)\mathbf{c}_{\mathrm{TN}} = \arg\min_{\mathbf{c}\in\mathcal{T}_{\mathrm{TN}}} J(\mathbf{c}) \tag*{(12)}

the optimization generally become non-convex. However, if we fix all but one node of c’s TN ansatz, the single-site update reduces to a convex weighted least-squares problem again. This is part of the reason for the success of the alternate optimization algorithm like density matrix renormalization group (DMRG) for MPS ansatz.

Specialization to PDE

The formulation above is for a general analytic OEs, but PDE is actually a sub-class of OE. Hence, it is possible to reduce any analytic PDE problems into OE problems and utilize TN-FE formulation. In particular, a PDE can be written as

g(q,[∂qηu])=0(13)\mathbf{g}\left(\mathbf{q},\left[\partial_{\mathbf{q}}^{\boldsymbol{\eta}}\mathbf{u}\right]\right)=0 \tag*{(13)}

If g\mathbf{g} is analytic, then it can be expanded as a convergent series

g(q,[∂qηu])=∑i1i!ai[η]⊙⨂j=1i∂qηju(14)\mathbf{g}\left(\mathbf{q},\left[\partial_{\mathbf{q}}^{\boldsymbol{\eta}}\mathbf{u}\right]\right)=\sum_i\frac{1}{i!}\mathbf{a}_i^{[\boldsymbol{\eta}]} \mathbin{\odot}\bigotimes_{j=1}^{i}\partial_{\mathbf{q}}^{\boldsymbol{\eta}_j}\mathbf{u} \tag*{(14)}

which is a special case of Eq. (4) when

ki[η]=ai[η]⨂j=1iδ(qj−q)(15)\mathbf{k}_i^{[\boldsymbol{\eta}]}=\mathbf{a}_i^{[\boldsymbol{\eta}]}\bigotimes_{j=1}^{i}\boldsymbol{\delta}(\mathbf{q}_j-\mathbf{q}) \tag*{(15)}

The new emphasis of the present work is the explicit construction and implementation of this PDE solver.

PDE Discretization

Target Equation

In this work, we are considering PDEs that has temporal dependence and, for convenience, we explicitly single out the time variable tt as

g(t,q,[∂qη∂tζu])=0(16)\mathbf{g}\left(t,\mathbf{q},\left[\partial_{\mathbf{q}}^{\boldsymbol{\eta}}\partial_t^{\boldsymbol{\zeta}}\mathbf{u}\right]\right)=0 \tag*{(16)}

There is nothing wrong with treating tt as a dimension of q\mathbf{q}. We decided to treat temporal discretization differently from the spatial part to be able to utilize MPS ansatz and DMRG algorithm on the one-dimensional initial value problem (IVP) demonstration later. If g\mathbf{g} is also analytic, we can rewrite the PDE as

g(t,q,[∂qη∂tζu])=∑i1i!ai[ζk],[ηj]⊙⨂j=1i⨂k=j+1i∂qηj∂tζku.(17)\begin{aligned} \mathbf{g}\left(t,\mathbf{q},\left[\partial_{\mathbf{q}}^{\boldsymbol{\eta}}\partial_t^{\boldsymbol{\zeta}}\mathbf{u}\right]\right) ={}&\sum_i\frac{1}{i!}\mathbf{a}_i^{[\boldsymbol{\zeta}_k],[\boldsymbol{\eta}_j]}\mathbin{\odot} \bigotimes_{j=1}^{i}\bigotimes_{k=j+1}^{i} \partial_{\mathbf{q}}^{\boldsymbol{\eta}_j}\partial_t^{\boldsymbol{\zeta}_k}\mathbf{u}. \tag*{(17)} \end{aligned}

Temporal discretization

For an IVP, given u~\widetilde{\mathbf{u}} and some of its time derivatives at time tt, we want to determine u\mathbf{u} and those time derivatives at time t+Δt+\Delta where Δ\Delta is time step size. The most common way is to apply finite difference method (FDM) to the temporal part [1]. One can choose to use any FDM scheme of their preference with varying degree of convergence criteria and computational costs, but the core idea of the following derivation remains the same.

For simplicity, we decided to use the implicit Euler’s scheme. In other words, Eq. (17) is replaced with

0=∑i1i!ai[ζk],[ηj]⊙⨂j=1i⨂k=j+1i∂qηj{1Δ(∂tζk−1u−∂tζk−1u~),ζk≠0,u,ζk=0.(18)\mathbf{0}=\sum_i\frac{1}{i!}\mathbf{a}_i^{[\boldsymbol{\zeta}_k],[\boldsymbol{\eta}_j]}\mathbin{\odot} \bigotimes_{j=1}^{i}\bigotimes_{k=j+1}^{i} \partial_{\mathbf{q}}^{\boldsymbol{\eta}_j} \begin{cases} \dfrac{1}{\Delta}\left(\partial_t^{\zeta_k-1}\mathbf{u}-\partial_t^{\zeta_k-1}\widetilde{\mathbf{u}}\right), & \zeta_k\ne0,\\ \mathbf{u}, & \zeta_k=0. \end{cases} \tag*{(18)}

With some term arrangement, the equation can be written as a time-dependent PDE on [∂tζtu]\left[\partial_t^{\zeta_t}\mathbf{u}\right], i.e., it is always possible to simplify the equation to only contain up to first temporal derivatives.

With FDM scheme, we will apply the method iteratively to solve for solution at various time steps

t(t)=t+tΔ(19)t^{(t)}=t+t\Delta \tag*{(19)}

where t∈Z0+t\in\mathbb{Z}_{0+}. With this new notation introduction, our target equation is

0=∑i1i!ai[ζk],[ηj]⊙⨂j=1i⨂k=j+1i∂qηj{u(t+1)−u(t)Δ,ζk=1,u(t+1),ζk=0.(20)\mathbf{0}=\sum_i\frac{1}{i!}\mathbf{a}_i^{[\boldsymbol{\zeta}_k],[\boldsymbol{\eta}_j]}\mathbin{\odot} \bigotimes_{j=1}^{i}\bigotimes_{k=j+1}^{i} \partial_{\mathbf{q}}^{\boldsymbol{\eta}_j} \begin{cases} \dfrac{\mathbf{u}^{(t+1)}-\mathbf{u}^{(t)}}{\Delta}, & \zeta_k=1,\\ \mathbf{u}^{(t+1)}, & \zeta_k=0. \end{cases} \tag*{(20)}

We can also see that u(t)\mathbf{u}^{(t)} and Δ\Delta can be absorbed to the term with lower correlation order and interaction kernel, respectively. This basically recover the analytic PDE, i.e., our method on IVP can be applied to any PDE.

Building Block Operators

One can directly apply TN-FE formulation on the IVP of interest, but it means that the calculation of G\mathbf{G} need to be re-calculated from scratch at every time step because the multi-linear interaction kernel can be time dependent and the coefficient tensor of the previous time step got updated on the next iteration. However, because everything else in the PDE is the same, it should be possible to pre-compute those parts of the PDE into a concise weak form ready for connecting to the time-dependent parts.

Derivative

Since spatial derivative is a local operators, if we have well-behaved basis function (can approximate every viable function in the element well), the results of derivative on Φn\Phi_n can also be approximated with a member of Φn\Phi_n. In other words, we can approximate spatial derivative with a projection tensor.

Consider an arbitrary spatial derivative of a basis function bn,βb_{n,\beta} which can be approximated as

∂qbn,β≈mββ′bn,β′.(21)\partial_q b_{n,\beta} \approx m^{\beta'}_{\beta} b_{n,\beta'} . \tag*{(21)}

Applying weak formulation gives an approximated projection tensor of ∂q\partial_q on the element n as

Dn,β′β≈Qn,β′β′′−1Pn,β′′β(der).(22)\mathbf{D}_{n,\beta'\beta} \approx\mathbf{Q}^{-1}_{n,\beta'\beta''}\mathbf{P}^{(\mathrm{der})}_{n,\beta''\beta}. \tag*{(22)}

where

Qn,β′′β′=∫Ωnbn,β′′∗bn,β′ dq(23)Q_{n,\beta''\beta'} = \int_{\Omega_n} b^*_{n,\beta''}b_{n,\beta'}\,\mathrm{d}q \tag*{(23)}
Pn,β′′β(der)=∫Ωnbn,β′′∗∂qbn,β dq.(24)P^{(\mathrm{der})}_{n,\beta''\beta} = \int_{\Omega_n} b^*_{n,\beta''}\partial_q b_{n,\beta}\,\mathrm{d}q . \tag*{(24)}

We can also visualize it in TN form as shown in Figure 3a. Note that the label n is needed since each element has different sets of basis functions. Also, Dn,β′βD_{n,\beta'\beta} is a tensor with components (tensor index χ\chi) correspond to different axis of differentiation.

Figure 3. TN representation of building block operations: (a) spatial derivative, (b) multiplication, (c) constant factor, and (d) projection of element n to boundary with ∘\circ. Here, β′\beta's are basis and χ\chi’s are non-basis indices. (a and b are adapted from [24])

Multiplication

With similar method to derivative, we can achieve the approximation of spatial multiplication with projection tensor

Rn,β′β1β2≈Qn,β′β′′−1Pn,β′′β1β2(mul),(25)R_{n,\beta'\beta_1\beta_2} \approx Q^{-1}_{n,\beta'\beta''}P^{(\mathrm{mul})}_{n,\beta''\beta_1\beta_2}, \tag*{(25)}

where

Pn,β′′β1β2(mul)=∫Ωnbn,β′′∗bn,β1bn,β2 dq,(26)P^{(\mathrm{mul})}_{n,\beta''\beta_1\beta_2} = \int_{\Omega_n} b^*_{n,\beta''}b_{n,\beta_1}b_{n,\beta_2}\,\mathrm{d}q , \tag*{(26)}

with visual depiction in Figure 3b.

Constant Factor

Constant factor can imply scaling of the whole function by a constant factor or tensor contraction to the indices that are not basis indices β\beta’s, i.e., the action on basis is simply identity projection. If said constant tensor is f\mathbf{f}, with similar method to derivative and multiplication, the projection tensor for constant factor is

Fn,β′β=Qn,β′β′′−1Qn,β′′βf=δβ′βf(27)F_{n,\beta'\beta}=Q^{-1}_{n,\beta'\beta''}Q_{n,\beta''\beta}f=\delta_{\beta'\beta}f \tag*{(27)}

where δ\delta is Kronecker delta, i.e., ff only acts on the non-basis indices, with visualization in Figure 3c. This component might look trivially simple but it is the foundation for applying our framework toward PDE on tensor value functions such as is Electrodynamics.

Boundary Projection

Later, we will integrate boundary conditions, and inter-element continuity into our TN variational target. Hence, it is crucial to look at the projection of elemental solution to element edges. Without lost of generality, let elements n and ∘\circ (can be environment) be each other neighbor. The boundary between them is Ωn∘=Ωn∩Ω∘\Omega_{n\circ}=\Omega_n\cap\Omega_\circ where we abuse notation for the partitions to include boundaries. Let {bn∘,β}\{b_{n\circ,\beta}\} be boundary’s basis. Then, the projection tensors of element n to the boundary with element ∘\circ is

Bn∘,β′β≈Qn∘,β′β′′−1Pn∘,β′′β(bp)(28)B_{n\circ,\beta'\beta}\approx Q^{-1}_{n\circ,\beta'\beta''}P^{(\mathrm{bp})}_{n\circ,\beta''\beta} \tag*{(28)}

where

Qn∘,β′′β′=∫Ωn∘bn∘,β′′∗bn∘,β′ dq(29)Q_{n\circ,\beta''\beta'}=\int_{\Omega_{n\circ}}b^*_{n\circ,\beta''}b_{n\circ,\beta'}\,\mathrm{d}q \tag*{(29)}
Pn∘,β′′β(bp)=∫Ωn∘bn∘,β′′∗bn,β dq.(30)P^{(\mathrm{bp})}_{n\circ,\beta''\beta}=\int_{\Omega_{n\circ}}b^*_{n\circ,\beta''}b_{n,\beta}\,\mathrm{d}q . \tag*{(30)}

We can also visualize it in TN form as shown in Figure 3d.

Summation

There are three places that summation appear in our formalism: the expansion in Eq. (4), inter-element continuities (ICs) and boundary conditions (BCs), and the inclusion of said ICs and BCs into the variational target. Among these, the summations can be classified into two categories depending on whether all summands share the same TN structure.

For the cases that all TNs representing the summands have the same structure, we can equivalently represent the summation by creating a new TN with the same structures as summand TNs with each tensor node replaced by the tensor block direct sum of the same nodes from all summand TNs. To see that this is true, consider a summation between two TNs along a common bond position as shown in Figure 4a. Since both TNs on the left can be added, they must have the same dimension in all indices except the one that got contracted. We will focus on a particular bond position in the TN shown as σa\sigma_a and σb\sigma_b, i.e., we contract all remaining bonds in the TN. The summation of the TNs is

Figure 4. Summation of TNs with the same structure. (a) Diagram representing summation of two TNs with the same structure which can be replace with a single TN with the same structure with each node be the tensor block direct sum of each original node at the same position in the structure, i.e., Ci=Ai⊞σBiC_i = A_i \boxplus_{\sigma} B_i. (b) Simple example of a where each node represent a vector. (c) Slightly more complicated example of a where each node represent a matrix and there are two bonding indices completely contract matrices to scalar, i.e., Ci=Ai⊞στBiC_i = A_i \boxplus_{\sigma\tau} B_i.

A1,σaA2,σa+B1,σbB2,σb.(31)A_{1,\sigma_a} A_{2,\sigma_a} + B_{1,\sigma_b} B_{2,\sigma_b}. \tag*{(31)}

Because both TNs have the same structure and non-bonding dimensions, it is possible to replace the summation indices with σc\sigma_c which run through all values of σa\sigma_a followed by values of σb\sigma_b and construct a new tensor node

Ci,σc={Ai,σc,σc≤σaBi,σc−σa,σc>σa(32)C_{i,\sigma_c} = \begin{cases} A_{i,\sigma_c}, & \sigma_c \le\sigma_a \\ B_{i,\sigma_c-\sigma_a}, & \sigma_c > \sigma_a \end{cases} \tag*{(32)}

which is a block direct sum between the summand nodes along bonding index, i.e., Ci=Ai⊞σBiC_i = A_i \boxplus_{\sigma} B_i. With this new tensor we can directly see that

C1,σcC2,σc=A1,σaA2,σa+B1,σbB2,σb.(33)C_{1,\sigma_c} C_{2,\sigma_c} = A_{1,\sigma_a} A_{2,\sigma_a} + B_{1,\sigma_b} B_{2,\sigma_b}. \tag*{(33)}

Figure 4b also demonstrates this for the case when all nodes are vectors. It might seems like using space direct sum works here as well, but block version is needed when the bonding has more than one index such as in the case of Figure 4c where all nodes are matrices that got completely contracted to a scalar. Note that, this analysis also applies when the bond under consideration is connecting two indices of the same tensor.

We can directly apply this results to our formalism. However, in our cases, because all of the summands share the same Fock space coefficient tensor, we can further simplify the summation building block by adding (not block direct sum) some of the tensors of the same node position in the common TN structure. As a concrete example, if the right vectors of both terms on the right of Figure 4b are the same, we can perform the summation of the left vectors of both terms before contracting to the common right vector. This effectively saves up one tensor index contraction which can cascade into considerable amount of time saved for the more complex cases.

On the other hand, when the underlying TN structure of the summands are not the same, it is more complicated to represent those summations in TN format even if all summands’ TN share the same Fock space coefficient tensor. To solve this issue, we will consider the summation between two arbitrary tensors A and B. To merge them into a single TN, we can consider their tensor product A⊗BA \otimes B. Unfortunately, there is no linear tensor operation that can get individual A or B out of A⊗BA \otimes B. Hence, we will consider diagonal augmentation to each of them with block direct sum with 1. By considering their tensor product, we get

(A⊞1a)⊗(B⊞1b)=(A⊗B)⊞(A⊗1b)(A \boxplus1_a) \otimes(B \boxplus1_b) = (A \otimes B) \boxplus(A \otimes1_b)
⊞(1a⊗B)⊞(1a⊗1b)(34)\qquad\boxplus(1_a \otimes B) \boxplus(1_a \otimes1_b) \tag*{(34)}

where the subscripts to 1’s only indicate the vectors that they are associated to.

We can see that the second and third terms of Eq. (34) are linear to A and B, respectively. Therefore, we can design a filter F that extracts and adds them together as

F∘((A⊞1a)⊗(B⊞1b))=(A+B)⊞1.(35)F \circ((A \boxplus1_a) \otimes(B \boxplus1_b)) = (A+B) \boxplus1. \tag*{(35)}

We also illustrated this result in Figure 5 for the case when A and B are vectors.

Figure 5. Summation of two arbitrary TNs (not necessarily the same structure) that contracted to vectors A and B with d dimensions. (a) Diagrams representing A and B. (b) Augmentation of the vectors. (c) Tensor product of the augmented vectors which contains subspaces that are linear to A and B. (d) Filter F that extracts and adds components of A and B. The diagrams show each of the d + 1 layers of F with only non-zero numbers shown explicitly. (e) Extraction by each layer of F that corresponds to a component of (A + B) ⊞\boxplus 1.

Building from this, consider the case when A (and B) can be factored out like in Eq. (31). We can see that

(A1,σa⊞1a1)(A2,σa⊞1a2)=(A1,σaA2,σa)⊞1a,(36)(A_{1,\sigma_a} \boxplus1_{a1})(A_{2,\sigma_a} \boxplus1_{a2}) = (A_{1,\sigma_a} A_{2,\sigma_a}) \boxplus1_a, \tag*{(36)}

i.e., we can apply the augmentation to each node in TN instead of applying after the complete contraction. Here, we also abuse some notation for index σa\sigma_a which need to run over the index value for 1a11_{a1} and 1a21_{a2} as well. Furthermore, similar to the same structure case, if parts of the summands are the same such as sharing the same Fock space coefficient tensor, we can factor out that parts. For example, if σa\sigma_a and σb\sigma_b share the same index range and A2,σ=B2,σ=EσA_{2,\sigma} = B_{2,\sigma} = E_{\sigma},

(A1,σaA2,σa+B1,σbB2,σb)⊞1=((A1,σ+B1,σ)Eσ)⊞1=((A1,σ+B1,σ)⊞1)(Eσ⊞1)=(F∘((A1,σ⊞1a1)⊗(B1,σ⊞1b1)))(Eσ⊞1).(37)\begin{aligned} (A_{1,\sigma_a} A_{2,\sigma_a} + B_{1,\sigma_b} B_{2,\sigma_b}) \boxplus1 \\ &= ((A_{1,\sigma} + B_{1,\sigma})E_{\sigma}) \boxplus1 \\ &= ((A_{1,\sigma} + B_{1,\sigma}) \boxplus1)(E_{\sigma} \boxplus1) \\ &= (F \circ((A_{1,\sigma} \boxplus1_{a1}) \otimes(B_{1,\sigma} \boxplus1_{b1})))(E_{\sigma} \boxplus1). \tag*{(37)} \end{aligned}

This means that we can isolate the summation locally to only the nodes that are different.

Also, the case of summation between TNs with the same structure can be considered a special case of this with a short cut of directly adding each tensor node directly. This technique of applying filter on the tensor product of augmented TNs can be expanded for any other linear operation between TNs. For cleanliness, we will compress out the augmentation from our TN and use simple visualization like in Figure 6a-Figure 6b to represent the summation of two TNs with CC as their common parts while AA and BB are their non-common parts.

Figure 6. TN representation of summation building block. (a) Summation of two TNs that has a common part C and the different parts A and B. (b) Building block representation of a. As shown in Eq. (37), the common part can be factor out reducing the task to be the summation of the different parts. Here, F represents filter contracting to A and B. The block direct sum augmentation is implicitly assumed for cleanliness. (c) Specialization for the cases where A and B contract to the same indices of C where the filter is assumed in the branching and merging of contracting edges. (d) Specialization for the cases where A and B contract to the different indices of C.

Depending on how the summation appear, the filter FF can take multiple form. For our formalism, we specialize the summation for the case that AA and BB are acting on the same or different indices of CC as represented in Figure 6c-Figure 6d, respectively. For further cleanliness, we implicitly suppressed the summation filter for each branching or merging of the contraction edges.

Compound Network

With these components, we can construct more complicated IVP operators, e.g., higher-order derivatives, other tensor product variations, and tensor calculus operators. Of course, directly applying the weak formalism for the whole operator LL would give a better approximation at the cost of additional overhead calculations per time step.

Local Basis

Independent Local Approximation Spaces

In standard Galerkin weak formulation for FEM, the elemental basis functions must be chosen such that their assembly form a globally conforming basis. This can be either choosing the basis that is already a globally conforming basis, or impose strict condition on coefficient tensor. For example, if the solution is expected to be continuous, the basis functions for each element must be 0 along all of the element boundaries or the coefficient tensor for that element must be restricted by neighboring elements’ coefficient tensors to make sure that the approximated solution is continuous.

Since, in TN-FE formulation, the residual is optimized via quadratic target scheme, boundary conditions, continuity and any required derivative compatibility can be included through additional residual terms. Consequently, the basis functions need not be assembled into a globally conforming basis, and coefficient tensors can be treated as independent degrees of freedom. Here, we will explore two bases that would be of interest since they can have their close form for derivative, multiplication and boundary projection tensors. The constant factor does not involve basis to begin with.

Fourier Basis

Consider a one-dimensional domain element Ωn\Omega_n with local coordinate origin qnq_n, i.e., q′=q−qnq' = q - q_n, and fundamental wavelength lnl_n. We define Fourier basis functions with Ωn\Omega_n support as

bn,β(FR)={sin⁡(βknq′)β>0cos⁡(βknq′)β≤0(38)b^{(\mathrm{FR})}_{n,\beta} = \begin{cases} \sin(\beta k_n q') & \beta> 0 \\ \cos(\beta k_n q') & \beta\le0 \end{cases} \tag*{(38)}

where kn=2π/lnk_n = 2\pi/l_n is element nn’s fundamental wave number. The first derivatives of the basis functions are

∂qbn,β(FR)=βkn{cos⁡(βknq′)β>0−sin⁡(βknq′)β≤0(39)\partial_q b^{(\mathrm{FR})}_{n,\beta} = \beta k_n \begin{cases} \cos(\beta k_n q') & \beta> 0 \\ -\sin(\beta k_n q') & \beta\le0 \end{cases} \tag*{(39)}

Then, we directly matching terms in the derivatives to the basis functions as,

∂qbn,β(FR)=βkn{cos⁡(βknq′)−β<0−sin⁡(βknq′)−β≥0=βkn{cos⁡(−βknq′)−β≤0sin⁡(−βknq′)−β>0(40)\begin{aligned} \partial_q b^{(\mathrm{FR})}_{n,\beta} &= \beta k_n \begin{cases} \cos(\beta k_n q') & -\beta< 0 \\ -\sin(\beta k_n q') & -\beta\ge0 \end{cases} \\ &= \beta k_n \begin{cases} \cos(-\beta k_n q') & -\beta\le0 \\ \sin(-\beta k_n q') & -\beta> 0 \end{cases} \tag*{(40)} \end{aligned}
=βknbn,−β(FR).(41)= \beta k_n b^{(\mathrm{FR})}_{n,-\beta}. \tag*{(41)}

Then, we can construct differentiation matrix from this relation. On another hand, one can also directly apply Eq. (22) to achieve the same result.

Similarly, one can utilize trigonometric product properties as

bn,β1(FR)bn,β2(FR)={s1s2β1>0,β2>0s1c2β1>0,β2≤0c1s2β1≤0,β2>0c1c2β1≤0,β2≤0=12{c−−c+β1>0,β2>0s++s−β1>0,β2≤0s+−s−β1≤0,β2>0c−+c+β1≤0,β2≤0(42)\begin{aligned} b^{(\mathrm{FR})}_{n,\beta_1} b^{(\mathrm{FR})}_{n,\beta_2} &= \begin{cases} s_1s_2 & \beta_1 > 0,\beta_2 > 0 \\ s_1c_2 & \beta_1 > 0,\beta_2 \le0 \\ c_1s_2 & \beta_1 \le0,\beta_2 > 0 \\ c_1c_2 & \beta_1 \le0,\beta_2 \le0 \end{cases} \\ &= \frac{1}{2} \begin{cases} c_- - c_+ & \beta_1 > 0,\beta_2 > 0 \\ s_+ + s_- & \beta_1 > 0,\beta_2 \le0 \\ s_+ - s_- & \beta_1 \le0,\beta_2 > 0 \\ c_- + c_+ & \beta_1 \le0,\beta_2 \le0 \end{cases} \tag*{(42)} \end{aligned}

where s□=sin⁡(β□knq′)s_{\square} = \sin(\beta_{\square} k_n q'), c□=cos⁡(β□knq′)c_{\square} = \cos(\beta_{\square} k_n q'), and β±=β1±β2\beta_{\pm} = \beta_1 \pm\beta_2. Then, matching each term according to

s□={bn,β□(FR)β□>0bn,−β□(FR)β□<0c□={bn,β□(FR)β□≤0bn,−β□(FR)β□≥0(43)s_{\square} = \begin{cases} b^{(\mathrm{FR})}_{n,\beta_{\square}} & \beta_{\square} > 0 \\ b^{(\mathrm{FR})}_{n,-\beta_{\square}} & \beta_{\square} < 0 \end{cases} \qquad c_{\square} = \begin{cases} b^{(\mathrm{FR})}_{n,\beta_{\square}} & \beta_{\square} \le0 \\ b^{(\mathrm{FR})}_{n,-\beta_{\square}} & \beta_{\square} \ge0 \end{cases} \tag*{(43)}

Then, we can construct multiplication tensor from this relation. Like in the derivative case, one can also directly apply Eq. (25) to get the same result. However, in practice, the tensor would be truncated by maximum basis order. Since the element size and wavelength are independent, the basis functions are not orthogonal. This means that the term with higher ∣β∣|\beta| than the cut-off can have non-trivial contribution if one directly applying Eq. (25) causing instability. Hence, it is better to use the derived close form.

Lagrange Polynomial Basis

The boundary projection tensor is quite straight forward since the boundary for one-dimensional element is just a scalar, i.e., only one basis function such as delta function δ(q−qn∘)\delta(q-q_{n\circ}), where qn∘q_{n\circ} is the coordinate of the boundary between Ωn\Omega_n and Ω∘\Omega_{\circ}, is needed. This means that Eq. (28) can be simplified to just an evaluation at the boundary

Bn∘,β(FR)=bn,β(FR)∣q=qn∘.(44)B^{(\mathrm{FR})}_{n\circ,\beta} = b^{(\mathrm{FR})}_{n,\beta}\big|_{q=q_{n\circ}}. \tag*{(44)}

One can directly apply a similar derivation to higher-dimensional cases, e.g., Fourier for each dimension. However, the calculation may be less straightforward, although a closed-form expression can still be obtained.

Lagrange polynomials are defined by their zeroes. Let the zeroes of a basis of one-dimensional element Ωn\Omega_n be at distinct points qn,1,⋯ ,qn,Bq_{n,1},\cdots,q_{n,B}. In this case, the basis functions with Ωn\Omega_n support for element nn are defined as

bn,β(LP)(q)=∏β′≠βq−qn,β′qn,β−qn,β′.(45)b^{(\mathrm{LP})}_{n,\beta}(q) = \prod_{\beta' \ne\beta} \frac{q-q_{n,\beta'}}{q_{n,\beta}-q_{n,\beta'}}. \tag*{(45)}

Similar to what we did for Fourier basis, one can try taking derivatives and rearranging terms such that the derivatives can be written as a linear combination of the basis functions. The derivatives of bn,βb_{n,\beta} has the form of

∂qbn,β(LP)=bn,β(LP)∑β′≠β1q−qn,β′.(46)\partial_q b^{(\mathrm{LP})}_{n,\beta} = b^{(\mathrm{LP})}_{n,\beta} \sum_{\beta' \ne\beta} \frac{1}{q-q_{n,\beta'}}. \tag*{(46)}

where we abuse the division by zero with q−qn,β′q-q_{n,\beta'} as long as it cancel the same term in bn,β(LP)b^{(\mathrm{LP})}_{n,\beta}. Since the zeroes are distinct, each basis function is linearly independent. Together with the fact that derivative only reduce polynomial order, the term matching is guaranteed.

In practice, we can choose Gauss-Lobatto-Legendre (GLL) points as the zeros to utilize Gaussian quadrature rule for faster integration with perfect accuracy up to 2B−32B-3 polynomial order. It turns out that, with this choice of zeros, Lagrange polynomial basis is also an interpolation basis which means that the projection of any function (with polynomial order at most 2B−32B-3) to each basis function is equal to the evaluation of that function at the non-zero point of that basis function [31, 32], i.e.,

∂qbn,β(LP)=∑β′∂qbn,β(LP)∣q=qn,β′bn,β′(LP).(47)\partial_q b^{(\mathrm{LP})}_{n,\beta} = \sum_{\beta'} \left.\partial_q b^{(\mathrm{LP})}_{n,\beta}\right|_{q=q_{n,\beta'}} b^{(\mathrm{LP})}_{n,\beta'}. \tag*{(47)}

Similarly, the multiplication tensor can be achieve by evaluating the products between basis functions at different zeroes points

bn,β1(LP)bn,β2(LP)≈∑β′bn,β1(LP)∣q=qn,β′bn,β2(LP)∣q=qn,β′bn,β′(LP).(48)b^{(\mathrm{LP})}_{n,\beta_1}b^{(\mathrm{LP})}_{n,\beta_2} \approx\sum_{\beta'} b^{(\mathrm{LP})}_{n,\beta_1}\big|_{q=q_{n,\beta'}} b^{(\mathrm{LP})}_{n,\beta_2}\big|_{q=q_{n,\beta'}} b^{(\mathrm{LP})}_{n,\beta'}. \tag*{(48)}

As for the boundary projection, the result is exactly the same form as Fourier basis, i.e.,

Bn∘,β(LP)=bn,β(LP)∣q=qn∘.(49)B^{(\mathrm{LP})}_{n_\circ,\beta}=b^{(\mathrm{LP})}_{n,\beta}\bigg|_{q=q_{n_\circ}} . \tag*{(49)}
Other Bases

Fourier and Lagrange polynomial bases are special cases where derivative, multiplication and boundary projection tensors have their closed form. However, this doesn’t mean that other bases will not work. They just need to be properly projected to the original basis, i.e., follow the exact calculation of Eqs. (22), (25) and (28), and treated for any projection instability.

Unified Residual Construction

Since the solving scheme is a variational problem, any additional requirements for the solution can be integrated into the optimization target by framing the requirement as another variational problem to be added to the target function or loss function.

Inter-element Continuity Residual

With the boundary projection tensor, we can penalize the solution with how much discontinuity it has. This is the point when we can utilize the boundary projection tensor we developed. Basically, the discontinuity can be measure with how much the solution differs at the boundary between two adjacent elements. In other words, if element n₁ and n₂ are neighboring elements, the inter-element continuity residual is the difference between the boundary projection of both elements to their common boundary.

We can also extend to the concept toward their other derivatives as well as shown in Figure 7a where each element got differentiated for p times, i.e., the diagram is for the continuity of the pth derivative.

Figure 7. TNs representing element boundary constraint residual. (a) Inter-element continuity residual of the pth derivative between elements n₁ and n₂. (b) Boundary condition of the pth derivative of element n at the boundary with environment (element 0) where c₀ₙ,p is the pth derivative coefficient tensor of the boundary between Ωₙ and Ωₙ required by the problem. (c) and (d) are building block tensor nodes representing a and b, respectively.

Boundary Condition Residuals

The boundary condition can be viewed as the continuity of the solution to the environment element, i.e., complement of the domain. In most case, this is supplied by the problem. Hence, the boundary condition residual is exactly the same as the inter-element continuity case with one branch substituted by the environment boundary value as shown in Figure 7b where the element n’s pth derivative is conditioned by the environment Ω₀.

Combined Variational Objective

The complete variational objective is the sum of the weighted residual norm of the equation (PDE), inter-element continuities (IC), and boundary conditions (BC) where the norms need to be applied individually for all conditions. In other words, if we define the networks in Figure 7a-Figure 7b as in Figure 7c-Figure 7d, respectively, the final variational target is

J(c)=J(PDE)(c)+J(IC)(c)+J(BC)(c)(50)\mathcal{J}(\mathbf{c})=\mathcal{J}^{(\mathrm{PDE})}(\mathbf{c})+\mathcal{J}^{(\mathrm{IC})}(\mathbf{c})+\mathcal{J}^{(\mathrm{BC})}(\mathbf{c}) \tag*{(50)}

where

J(PDE)=W(PDE)(h(PDE)†⊙h(PDE))J(IC)=∑n1,n2,pWn1n2,p(IC)(hn1n2,p(IC)†⊙hn1n2,p(IC))J(BC)=∑n,pWn,p(BC)(hn,p(BC)†⊙hn,p(BC)).(51)\begin{aligned} \mathcal{J}^{(\mathrm{PDE})}&=\mathbf{W}^{(\mathrm{PDE})}\left(\mathbf{h}^{(\mathrm{PDE})\dagger}\mathbin{\odot}\mathbf{h}^{(\mathrm{PDE})}\right)\\ \mathcal{J}^{(\mathrm{IC})}&=\sum_{n_1,n_2,p}\mathbf{W}^{(\mathrm{IC})}_{n_1n_2,p}\left(\mathbf{h}^{(\mathrm{IC})\dagger}_{n_1n_2,p}\mathbin{\odot}\mathbf{h}^{(\mathrm{IC})}_{n_1n_2,p}\right)\\ \mathcal{J}^{(\mathrm{BC})}&=\sum_{n,p}\mathbf{W}^{(\mathrm{BC})}_{n,p}\left(\mathbf{h}^{(\mathrm{BC})\dagger}_{n,p}\mathbin{\odot}\mathbf{h}^{(\mathrm{BC})}_{n,p}\right). \tag*{(51)} \end{aligned}

Here, h’s are residual terms

h(PDE)(c)=G⊙chn1n2,p(IC)(c)=ICn1n2,p⊙chn,p(BC)(c)=BCn,p⊙c(52)\begin{aligned} \mathbf{h}^{(\mathrm{PDE})}(\mathbf{c})&=\mathbf{G}\mathbin{\odot}\mathbf{c}\\ \mathbf{h}^{(\mathrm{IC})}_{n_1n_2,p}(\mathbf{c})&=\mathbf{IC}_{n_1n_2,p}\mathbin{\odot}\mathbf{c}\\ \mathbf{h}^{(\mathrm{BC})}_{n,p}(\mathbf{c})&=\mathbf{BC}_{n,p}\mathbin{\odot}\mathbf{c} \tag*{(52)} \end{aligned}

and WW’s are positive-definite metrics of corresponding residuals. We also drop out some tensor indices for cleanliness as seen from the definition of h(PDE)\mathbf{h}^{(\mathrm{PDE})} and W(PDE)W^{(\mathrm{PDE})} compare to Eqs. (10) and (11). Figure 8 illustrates an example TN that completely captures the variational target of a 3-element system with some continuities and boundary conditions.

Figure 8. TN representing variational target of a system with 3 elements. Each element contraction is represented with different color bond: 1 (red), 2 (green), 3 (blue). The network composes of 5 branches each corresponding to different weighted residual norm. From left to right, the branches represent boundary condition on first derivative of element 1, continuity between element 1 and 2, main PDE, continuity of the first derivative between element 2 and 3, and boundary condition on element 3.

Target Optimization

Given that the solution that satisfies all continuities and boundary conditions exist, minimizing Eq. (50) would give that solution. However, with the size complexity of the Fock space, the direct optimization is not viable. Hence, the application of TN ansatz is proposed to handle the data structure. This has a consequence that the optimizing space is no longer convex for weighted residual norm. Solving this problem is an active research in TN where we will directly use their results here. For the purpose of later demonstration, we will focus on one-dimensional problems where MPS ansatz is well studied and found success in solving quantum mechanical problem with DMRG algorithm.

MPS Representation

As shown in Figure 2b, MPS ansatz contains key features of one-dimensional problem with tensor nodes representing our finite elements align in a line with bonds connecting only adjacent nodes. With this ansatz, the Fock space coefficient can be approximated as

c[βnj]≈c1,σ12[β1j]c2,σ12σ23[β2j]…cN,σN−1,N[βNj].(53)c^{[\beta_{nj}]} \approx c_{1,\sigma_{12}}^{[\beta_{1j}]} c_{2,\sigma_{12}\sigma_{23}}^{[\beta_{2j}]} \ldots c_{N,\sigma_{N-1,N}}^{[\beta_{Nj}]} . \tag*{(53)}

The physical indices βnj\beta_{nj}’s label the local coefficients associated with element nn, including any empty slots required by the selected maximum correlation order JJ. The bond dimension SS controls the number of correlations retained between the adjacent elements in the chain.

Effective Single-site Problem

The key concept of DMRG algorithm is to perform multiple single-site optimizations where all but one of the tensor node cn[βnj]c_n^{[\beta_{nj}]} are fixed. If we group up all WW’s, GG, IC’s, BC’s, and F’s in Eq. (50) as effective operator tensor H\mathbf{H}, then the variational target is

J(c)=c†[βnj′]H[βnj′],[βnj]c[βnj].(54)\mathcal{J}(\mathbf{c}) = c^{\dagger[\beta'_{nj}]} \mathbf{H}_{[\beta'_{nj}],[\beta_{nj}]} c^{[\beta_{nj}]} . \tag*{(54)}

During a single-site update, contracting the fixed part of the network produces an effective quadratic objective

Jeff,n(cn)=cn†⊙Heff,n⊙cn,(55)\mathcal{J}_{\mathrm{eff},n}(\mathbf{c}_n)=\mathbf{c}_n^\dagger\odot\mathbf{H}_{\mathrm{eff},n}\odot\mathbf{c}_n, \tag*{(55)}

where Heff,n\mathbf{H}_{\mathrm{eff},n} is the contraction of H\mathbf{H} with all fixed nodes and the remaining contractions with cn\mathbf{c}_n are implicitly assumed in ⊙\odot for cleanliness. With this local convexity, the update may be solved as either a local least-squares problem or explicit “matrix” equation

Heff,n⊙cn=0.(56)\mathbf{H}_{\mathrm{eff},n}\odot\mathbf{c}_n=0. \tag*{(56)}

Environment contractions

Since the chosen TN ansatz stems from the nature of the expected solution, the PDE, continuities, and boundary conditions should support the same nature, i.e., H\mathbf{H} should have the same or similar structure as the chosen ansatz. This means that Eq. (54) can be represented with TN similar to the one shown in Figure 9.

Figure 9. Tensor Network representation of full variational target (Eq. (54)) under MPS ansatz for both Fock space coefficient tensor c\mathbf{c} and effective operator tensor H\mathbf{H}.

We can obtain Heff,n\mathbf{H}_{\mathrm{eff},n} by contracting all fixed tensors on the left and right of the active site cn\mathbf{c}_n into H\mathbf{H}. These contractions can be initialized recursively and updated dynamically through out the sequence of single-site updates to avoids redundancy of reconstructing the full contraction from scratch for every update.

DMRG algorithm

The Density Matrix Renormalization Group (DMRG) is a variational tensor-network algorithm initially developed for finding low-energy states, especially the ground state, of one-dimensional many-body quantum systems where the target wave function is represented as an MPS. The tensors are optimized sequentially back and forth along the chain. Since our target is also a variational optimization with MPS ansatz, the DMRG algorithm shown in Algorithm 1 should work for our case as well.

Given effective operator tensor H\mathbf{H} and number of optimization round RR, we start by initialize the Fock space

Algorithm 1 DMRG
Initialize c
for n = 1 to N do
    E_{L,n} ← Contract TN from element n − 1 to the left
    E_{R,n} ← Contract TN from element n + 1 to the right
end for
for r = 1 to R do
    for n = 1 to N do
        H_eff,n ← Contract H_n, E_{L,n} and E_{R,n} together
        c_n ← arg min_{c′_n} c′†_n ⊙ H_eff,n ⊙ c′_n
        E_{L,n+1} ← Contract E_{L,n} with c†_n ⊙ H_n ⊙ c_n
    end for
    for n = N to 1 do
        H_eff,n ← Contract H_n, E_{L,n} and E_{R,n} together
        c_n ← arg min_{c′_n} c′†_n ⊙ H_eff,n ⊙ c′_n
        E_{R,n−1} ← Contract E_{R,n} with c†_n ⊙ H_n ⊙ c_n
    end for
end for
return c

coefficient tensor c\mathbf{c}. Then, we prepare the left and right contractions of the TN for each element nn denoted by EL,n\mathbf{E}_{L,n} and ER,n\mathbf{E}_{R,n}, respectively. The preparation can be done recursively with dynamic memory. Then, we perform RR full loop sweep (back and forth) where at each step the single-site optimization is perform and a left or right contraction is updated for the next step. The RR-loop sweeping can be replaced by stopping criteria.

Complexity Analysis

Parameter Count

For our setup with NN elements, each with at most 2 neighbors, BB elemental basis size, SS maximum bond dimension (for both c\mathbf{c} and H\mathbf{H}) and JJ maximum correlation order, the storage requirement are

  1. c\mathbf{c}: O(NBJS2)\mathcal{O}(NB^{J}S^{2})

  1. H\mathbf{H}: O(NB2JS2)\mathcal{O}(NB^{2J}S^{2})

  1. E\mathbf{E}’s: O(2NS3)\mathcal{O}(2NS^{3})

for the DMRG process. For the preparation of H\mathbf{H}, we can use the same storage as H\mathbf{H} by slowly contract each corresponding term of L\mathbf{L}, continuities, and boundary conditions via summation filters. This gives the total of O(NS2(B2J+S))\mathcal{O}(NS^{2}(B^{2J}+S)) storage space complexity.

Runtime Complexity

With the same parameters as in Sec. VIIA, CC conditions at each element edge, and all derivative order matrices are pre-calculated, there would be O(3JNJ)\mathcal{O}(3^{J}NJ) terms in L\mathbf{L} due to the MPS ansatz. Each summation takes 2 matrices with size at most the same as H\mathbf{H} and add them through filter contraction to get an output of size at most the same as H\mathbf{H}. The time complexity of H\mathbf{H} preparation is O(((C+3JNJ)N3B6JS6))\mathcal{O}\left(((C+3^{J}NJ)N^{3}B^{6J}S^{6})\right) where the first term is from continuities and boundary conditions while the second term if from PDE. This bound can be improve if the structure of L\mathbf{L} is known. For example, in the case of PDE problem, L\mathbf{L} only correlated with in the same elements, i.e., the number of possible terms reduces to NJNJ and for each element the terms can be added in local space reducing the run time for the PDE part to O(NJB6JS6)\mathcal{O}(NJB^{6J}S^{6}). The locality of continuities and boundary conditions would reduce the first term as well.

For the DMRG, the preparation of E\mathbf{E}'s is iteratively contract a O(S3)\mathcal{O}(S^{3})-size, two O(BJS2)\mathcal{O}(B^{J}S^{2})-size, and a O(B2JS2)\mathcal{O}(B^{2J}S^{2})-size tensors for at most 2N2N times with the optimal contraction time of O(NB2JS4)\mathcal{O}(NB^{2J}S^{4}). After that, there are at most 2NR2NR single-site optimization each with the run time of O(B2JS6)\mathcal{O}(B^{2J}S^{6}), O(BJωS2ω)\mathcal{O}(B^{J\omega}S^{2\omega}), and O(B2JS4)\mathcal{O}(B^{2J}S^{4}) for each sub-step in Algorithm 1 with ω≈2.37\omega\approx2.37 for the fastest matrix inversion algorithm [33]. Therefore, the total run time of our method is O(((C+3JNJ)N3B6J+NRBωJ)S6)\mathcal{O}\left(((C+3^{J}NJ)N^{3}B^{6J}+NRB^{\omega J})S^{6}\right).

Demonstration

We’ll demonstrate the procedure of converting IVP to TN with the following diffusion equation with space-dependent diffusivity

∂tu=∂x((1+cos⁡(x)/2)∂xu)(57)\partial_t u=\partial_x\left((1+\cos(x)/2)\partial_xu\right) \tag*{(57)}

with u=u(t,x)u=u(t,x), Ω=[0,2π]\Omega=[0,2\pi], u(0,x)=cos⁡(5x)/10u(0,x)=\cos(5x)/10. We can rewrite the IVP in our format (Eq. (20)) as

1Δt(u(t)−u(t−1))=(1+cos⁡(x)2)∂x2u(t)−sin⁡(x)2∂xu(t).(58)\frac{1}{\Delta t}\left(u^{(t)}-u^{(t-1)}\right)=\left(1+\frac{\cos(x)}{2}\right)\partial_x^2u^{(t)}-\frac{\sin(x)}{2}\partial_xu^{(t)}. \tag*{(58)}

The corresponding tensor circuit of this IVP is as shown in Figure 10.

Figure 10. Tensor circuit for Eq. (57) where the circuit only show part of G\mathbf{G} from the residual (Eq. (10)) that act on element nn tensor node of the Fock space coefficient tensor. h1h_1, h2h_2, c~\tilde{c} are −sin⁡(x)/2-\sin(x)/2, (1+cos⁡(x)/2)(1+\cos(x)/2), and solution at the previous time step in Fock space representation. Note that we omit the network edges that connect these terms to the adjacent element for cleanliness.

Then, we solve the IVP using NN uniform finite elements on Ω\Omega, each equipped with BB local Lagrange polynomial basis functions, and an MPS ansatz with bond dimension SS for the coefficient tensor. The time evolution is advanced using the implicit Euler scheme described with time step Δt\Delta t. At each time step, the DMRG sweep algorithm minimizes the weighted residual J(c)\mathcal{J}(\mathbf{c}) over the MPS variational manifold.

Figure 11 summarize the time-evolution results for explicit Runge-Kutta IVP simulation [34] (a) and TN variational method (b). The TN variational method with N=10N=10, B=4B=4, S=1S=1 produce a reliable results with the difference of less than five percent of the original amplitude of the sinusoidal as shown in Figure 12. We also see that the continuity and smoothness of the results are also respected to within numerical precision confirming that the variational target encodes the boundary constraints.

Figure 12. Discrepancy between the results from standard explicit Runge–Kutta method of order 5(4) and TN-FE variational method from Figure 11.

Figure 11. Numerical simulation results for the space-dependent diffusion equation ∂tu=∂x[κ(x)∂xu]\partial_t u = \partial_x[\kappa(x)\partial_x u] with κ(x)=1+12sin⁡x\kappa(x) = 1 + \frac{1}{2}\sin x, periodic domain [0,2π][0,2\pi], Δt=0.001\Delta t = 0.001 solving by (a) standard explicit Runge–Kutta method of order 5(4) [34] and (b) TN-FE variational method.

Convergence and Accuracy

To assess the convergence properties of the TN solver, we study the behavior of the solution error as functions of Lagrange polynomial basis order BB, and the number of finite elements NN at different time step size Δt\Delta t. Since both BB and NN are, in some way, representation of spatial resolution, we should expect the behavior of the trend to be similar to standard finite difference method which exhibit the stability condition where the convergence cannot be improved purely by increasing spatial resolution while the temporal resolution is fixed. This is clearly shown in Figure 13.

Figure 13. Mean absolute error trend of TN variational method for solving space-dependent diffusion IVP with different (a) basis order BB and (b) number of elements NN at different time step size Δt\Delta t. For each fixed Δt\Delta t, the trends exhibit convergence up to a level after which the better temporal resolution is required for a more accurate result.

Together, these results demonstrate that the TN-FE framework introduced in the companion paper can produce accurate IVP solution with computational scaling controlled by the bond dimension rather than the full exponential size of the coefficient space. While the examples here are restricted to 1D MPS/DMRG for clarity, the formalism is directly extensible to higher-dimensional problems via PEPS or tree tensor network ansatzes.

Conclusion

We have developed a practical tensor-network finite-element framework for solving PDEs with polynomial computational scaling under bounded local correlation order and tensor-network bond dimension. Building on the general TN-FE formulation introduced in our companion work, we reorganize the ingredients of conventional finite-element discretization into a common variational construction. Rather than requiring the elemental basis functions to assemble into a globally conforming approximation space, we treat the coefficients of different elements as independent variational degrees of freedom and impose the governing PDE, inter-element continuity, and boundary conditions through separate residual operators within a single weighted objective. Spatial derivatives, multiplication, constant factors, and boundary projections are represented as reusable local tensor operators, from which more complicated differential expressions can be constructed. We explicitly derive these operators for Fourier and Lagrange polynomial bases, while the same projection procedure allows other local approximation spaces to be incorporated without changing the overall optimization framework.

The exponentially large augmented coefficient space generated by nonlinear PDEs is made computationally accessible by restricting the coefficient tensor to a tensor-network manifold. For one-dimensional systems, an MPS representation reduces the storage requirement from exponential in the number of elements to polynomial scaling, while DMRG converts the resulting global non-convex optimization into a sequence of convex single-site subproblems. By exploiting locality and recursively updated environment contractions, the PDE, continuity, and boundary contributions can be optimized without explicitly constructing the full augmented coefficient tensor. Our complexity analysis shows that, for fixed correlation order, bond dimension, and local basis size, both storage and computational cost scale polynomially with the number of finite elements. The variable-coefficient diffusion example demonstrates that the resulting solver reproduces the expected time evolution with controlled error, preserves the imposed inter-element and boundary constraints, and exhibits systematic convergence under both element and basis refinement.

The polynomial scaling established here should not be interpreted as a universal computational advantage over conventional PDE solvers. Its practical efficiency depends on whether the solution and the corresponding variational operators admit compact tensor-network reprepresentations with sufficiently small bond dimensions and correlation order. The present implementation is also restricted to one-dimensional MPS/DMRG calculations, and the polynomial prefactors can become substantial as the local basis size, nonlinear correlation order, or required bond dimension increases. Future work should therefore investigate adaptive control of bond dimension and local approximation order, more efficient contraction and operator-assembly strategies, and extensions to higher-dimensional tensor-network geometries such as PEPS and tree tensor networks. Systematic benchmarks against established finite-element, spectral-element, and discontinuous-Galerkin solvers will also be important for identifying the classes of PDEs for which the correlated representation provides a practical computational advantage. Overall, the framework separates local approximation, physical constraints, and global correlation into distinct but compatible components of a single variational problem. This provides a flexible route from conventional finite-element discretization to tensor-network optimization and establishes an algorithmic foundation for polynomial-scaling, quantum-inspired, and potentially quantum-assisted PDE solvers.

Acknowledgements

The authors thank Drs. Alan Edelman and Nuno Loureiro for insightful discussions. We dedicate this work to Dr. Loureiro’s memory and note with sadness that he passed away during the course of this work. This work was supported by the National Science Foundation (NSF) Convergence Accelerator Award No. 2345084, the U.S. Department of Energy (DOE), Basic Energy Sciences (BES), Award No. DE-SC0020148, MIT Energy Initiative, and support from R. Wachnik.

References

References

  1. [1]Randall J. LeVeque. Finite Difference Methods for Ordinary and Partial Differential Equations: Steady-State and Time-Dependent Problems. Classics in Applied Mathematics. Society for Industrial and Applied Mathematics (SIAM), Philadelphia, PA, 2007.
  2. [2]John C. Strikwerda. Finite Difference Schemes and Partial Differential Equations. Society for Industrial and Applied Mathematics (SIAM), Philadelphia, PA, 2 edition, 2004.
  3. [3]J. W. Thomas. Numerical Partial Differential Equations: Finite Difference Methods, volume 22 of Texts in Applied Mathematics. Springer, New York, 1995.DOI
  4. [4]Philippe G. Ciarlet. The Finite Element Method for Elliptic Problems, volume 40 of Classics in Applied Mathematics. Society for Industrial and Applied Mathematics (SIAM), Philadelphia, PA, 2002. Reprint of the 1978 North-Holland edition.
  5. [5]Susanne C. Brenner and L. Ridgway Scott. The Mathematical Theory of Finite Element Methods, volume 15 of Texts in Applied Mathematics. Springer, New York, 3 edition, 2008.
  6. [6]Thomas J. R. Hughes. The Finite Element Method: Linear Static and Dynamic Finite Element Analysis. Dover Publications, Mineola, NY, 2000. Reprint of the 1987 Prentice-Hall edition.
  7. [7]O. C. Zienkiewicz, R. L. Taylor, and J. Z. Zhu. The Finite Element Method: Its Basis and Fundamentals. Butterworth-Heinemann (Elsevier), Oxford, 7 edition, 2013.
  8. [8]Anthony T. Patera. A spectral element method for fluid dynamics: laminar flow in a channel expansion. Journal of computational Physics, 54(3):468–488, 1984.DOI
  9. [9]Román Orús. A practical introduction to tensor networks: Matrix product states and projected entangled pair states. Annals of Physics, 349:117–158, 2014.DOI
  10. [10]M. Fannes, B. Nachtergaele, and R. F. Werner. Finitely correlated states on quantum spin chains. Communications in Mathematical Physics, 144(3):443–490, 1992.DOI
  11. [11]A. Klumper, A. Schadschneider, and J. Zittartz. Equivalence and solution of anisotropic spin-1 models and generalized t-j fermion models in one dimension. Journal of Physics A: Mathematical and General, 24(16):L955, 1991.DOI
  12. [12]A. Klümper, A. Schadschneider, and J. Zittartz. Matrix product ground states for one-dimensional spin-1 quantum antiferromagnets. Europhysics Letters, 24(4):293, 1993.DOI
  13. [13]F. Verstraete and J. I. Cirac. Renormalization algorithms for strongly correlated many-body systems in two and higher dimensions. arXiv, 2004.DOI
  14. [14]G. Vidal. Entanglement renormalization. Physical Review Letters, 99(22):220405, 2007.
  15. [15]Steven R. White. Density matrix formulation for quantum renormalization groups. Phys. Rev. Lett., 69:2863–2866, Nov 1992.pubmed.ncbi.nlm.nih.gov/10046608
  16. [16]Steven R. White. Density-matrix algorithms for quantum renormalization groups. Physical Review B, 48(14):10345–10356, 1993.pubmed.ncbi.nlm.nih.gov/10007313
  17. [17]Guifré Vidal. Efficient simulation of one-dimensional quantum many-body systems. Physical Review Letters, 93(4):040502, 2004.pubmed.ncbi.nlm.nih.gov/15323740
  18. [18]Michael Lubasch, Pierre Moinier, and Dieter Jaksch. Multigrid renormalization. Journal of Computational Physics, 372:587–602, 2018.DOI
  19. [19]Y-Y Shi, L-M Duan, and Guifre Vidal. Classical simulation of quantum many-body systems with a tree tensor network. Physical Review A—Atomic, Molecular, and Optical Physics, 74(2):022320, 2006.DOI
  20. [20]Markus Bachmayr, Reinhold Schneider, and André Uschmajew. Tensor networks and hierarchical tensors for the solution of high-dimensional partial differential equations. Foundations of Computational Mathematics, 16(6):1423–1472, Dec 2016.DOI
  21. [21]Nikita Gourianov, Michael Lubasch, Sergey Dolgov, Quincy Y. van den Berg, Hessam Babaee, Peyman Givi, Martin Kiffner, and Dieter Jaksch. A quantum-inspired approach to exploit turbulence structures. Nature Com- putational Science, 2(1):30–37, 1. 2022.
  22. [22]Erika Ye and Nuno F. G. Loureiro. Quantum-inspired method for solving the vlasov-poisson equations. Phys. Rev. E, 106:035208, Sep 2022.DOI
  23. [23]Juan José García-Ripoll. Quantum-inspired algorithms for multivariate analysis: from interpolation to partial differential equations. Quantum, 5:431, 4 2021.
  24. [24]Abhijatmethi Chotrattanapituk, Michael J Landry, Chu-Liang Fu, and Mingda Li. Tensor-network finite elements for analytic operator equations. arXiv preprint arXiv:2607.13129, 2026.arxiv.org/abs/2607.13129
  25. [25]Douglas N Arnold, Franco Brezzi, Bernardo Cockburn, and L Donatella Marini. Unified analysis of discontinuous galerkin methods for elliptic problems. SIAM journal on numerical analysis, 39(5):1749–1779, 2002.DOI
  26. [26]Stephen Boyd, Leon O. Chua, and Charles A. Desoer. Analytical foundations of Volterra series. IMA Journal of Mathematical Control and Information, 1(3):243–282, 1984.DOI
  27. [27]Stephen Boyd and Leon O. Chua. Fading memory and the problem of approximating nonlinear operators with Volterra series. IEEE Transactions on Circuits and Systems, 32(11):1150–1161, 1985.DOI
  28. [28]Martin Schetzen. The Volterra and Wiener Theories of Nonlinear Systems. John Wiley & Sons, New York, 1980.
  29. [29]Jorge Mujica. Complex Analysis in Banach Spaces: Holomorphic Functions and Domains of Holomorphy in Finite and Infinite Dimensions, volume 120 of North-Holland Mathematics Studies. North-Holland, Amsterdam, 1986.
  30. [30]Seán Dineen. Complex Analysis on Infinite Dimensional Spaces. Springer Monographs in Mathematics. Springer, London, 1999.DOI
  31. [31]Claudio Canuto, M Youssuff Hussaini, Alfio Quarteroni, and Thomas A Zang. Spectral methods, volume 285. Springer, 2006.
  32. [32]MO Deville, PF Fischer, EH Mund, and DK Gartling. High-order methods for incompressible fluid flow. Appl. Mech. Rev., 56(3):B43–B43, 2003.
  33. [33]V Ya Pan. Fast matrix multiplication and its algebraic neighbourhood. Sbornik: Mathematics, 208(11):1661–1704, 2017.DOI
  34. [34]J.R. Dormand and P.J. Prince. A family of embedded runge-kutta formulae. Journal of Computational and Applied Mathematics, 6(1):19–26, 1980.DOI

Paper details

vlnc:W_q8uetxxd
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Mathematics

Not recorded for this paper

View statement
Looking for related papers…
Contents