# Example codes for using QTT to solve a PDE

**URL:** <https://itensor.discourse.group/t/example-codes-for-using-qtt-to-solve-a-pde/2344>\
**Category:** DMRG and Numerical Methods\
**Created:** [April 14, 2025, 7:11pm UTC](https://itensor.discourse.group/t/example-codes-for-using-qtt-to-solve-a-pde/2344 "2025-04-14T19:11:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sungjuGit](https://yyz2.discourse-cdn.com/free1/user_avatar/itensor.discourse.group/sungjugit/32/747_2.png) [@sungjuGit](https://itensor.discourse.group/u/sungjuGit)\
**Post date:** [April 14, 2025, 7:11pm UTC](https://itensor.discourse.group/t/example-codes-for-using-qtt-to-solve-a-pde/2344/1 "2025-04-14T19:11:36Z")

</div>

Hello,

I am a complete novice to ITensors and I am trying to learn to use MPS/MPO to solve PDEs (not necessarily of quantum mechanics origin).

I was wondering if there are simple but hopefully complete example codes one might be willing to share where one uses QTT to solve a PDE. It can perhaps be as simple as a 1D transient heat diffusion equation. Thanks in advance!

---

<div class="post-metadata">

**Author:** ![ryanlevy](https://yyz2.discourse-cdn.com/free1/user_avatar/itensor.discourse.group/ryanlevy/32/150_2.png) [@ryanlevy](https://itensor.discourse.group/u/ryanlevy)\
**Post date:** [April 15, 2025, 10:42am UTC](https://itensor.discourse.group/t/example-codes-for-using-qtt-to-solve-a-pde/2344/2 "2025-04-15T10:42:46Z")

</div>

We have two different repositories, one (a 3rd party) for using QTTs on arbitrary topology ([[2410.03572] Compressing multivariate functions with tree tensor networks](https://arxiv.org/abs/2410.03572)) and another for using the well developed 1D (MPS) QTT

Here is an example of solving the 2D Laplace equation on an arbitrary tree tensor network: [ITensorNumericalAnalysis.jl/examples/2d\_laplace\_solver.jl at main · JoeyT1994/ITensorNumericalAnalysis.jl · GitHub](https://github.com/JoeyT1994/ITensorNumericalAnalysis.jl/blob/main/examples/2d_laplace_solver.jl)

and in 1D, solving an Airy equation: [ITensorQTT.jl/examples/airy\_equation at main · ITensor/ITensorQTT.jl · GitHub](https://github.com/ITensor/ITensorQTT.jl/tree/main/examples/airy_equation)

---

<div class="post-metadata">

**Author:** ![sungjuGit](https://yyz2.discourse-cdn.com/free1/user_avatar/itensor.discourse.group/sungjugit/32/747_2.png) [@sungjuGit](https://itensor.discourse.group/u/sungjuGit)\
**Post date:** [April 15, 2025, 4:19pm UTC](https://itensor.discourse.group/t/example-codes-for-using-qtt-to-solve-a-pde/2344/3 "2025-04-15T16:19:58Z")

</div>

Thanks so much!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/itensor/original/1X/d3072b13e047cd06df7f3981547c0917d940dfa4.png) [@system](https://itensor.discourse.group/u/system)\
**Post date:** [April 25, 2025, 4:20pm UTC](https://itensor.discourse.group/t/example-codes-for-using-qtt-to-solve-a-pde/2344/4 "2025-04-25T16:20:05Z")

</div>

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
