# How do I set an MPS bond dimension that is higher than needed?

**URL:** <https://itensor.discourse.group/t/how-do-i-set-an-mps-bond-dimension-that-is-higher-than-needed/1637>\
**Category:** ITensor Julia Questions\
**Tags:** mps\
**Created:** [April 17, 2024, 2:17pm UTC](https://itensor.discourse.group/t/how-do-i-set-an-mps-bond-dimension-that-is-higher-than-needed/1637 "2024-04-17T14:17:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![BenjaminDecker](https://yyz2.discourse-cdn.com/free1/user_avatar/itensor.discourse.group/benjamindecker/32/892_2.png) [@BenjaminDecker](https://itensor.discourse.group/u/BenjaminDecker)\
**Post date:** [April 17, 2024, 2:17pm UTC](https://itensor.discourse.group/t/how-do-i-set-an-mps-bond-dimension-that-is-higher-than-needed/1637/1 "2024-04-17T14:17:38Z")

</div>

I am working on an implementation of the [1-site TDVP algorithm](https://tensornetwork.org/mps/algorithms/timeevo/tdvp.html). In this variant of the algorithm I need to choose bond dimensions for my initial state MPS beforehand, as the bond dimension can not be changed during runtime. If I start with a product state, this means that I need to start with an MPS with a bond dimension that is higher than needed to exactly store the state.  
I already tried merging and decomposing adjacent site tensors of the initial MPS via an svd and passing a mindim parameter, but this only resulted in bonds of dimension 1. I presume this is the case because no higher bond dimension is needed to represent a product state.

Is there some way to force an MPS to have an unnecessarily high bond dimension?

---

<div class="post-metadata">

**Author:** ![mtfishman](https://yyz2.discourse-cdn.com/free1/user_avatar/itensor.discourse.group/mtfishman/32/11_2.png) [@mtfishman](https://itensor.discourse.group/u/mtfishman)\
**Post date:** [April 17, 2024, 6:15pm UTC](https://itensor.discourse.group/t/how-do-i-set-an-mps-bond-dimension-that-is-higher-than-needed/1637/2 "2024-04-17T18:15:55Z")

</div>

```julia
using ITensors: inner, linkdims, randomMPS, siteinds
using LinearAlgebra: norm
s = siteinds("S=1/2", 4)
a = randomMPS(s; linkdims=3)
b = 0 * randomMPS(s; linkdims=3)
c = +(a, b; alg="directsum")
@show linkdims(a), norm(a)
@show linkdims(b), norm(b)
@show linkdims(c), norm(c)
@show inner(a, b)
@show inner(a, c)

```

```julia
(linkdims(a), norm(a)) = ([3, 3, 2], 1.0)
(linkdims(b), norm(b)) = ([3, 3, 2], 0.0)
(linkdims(c), norm(c)) = ([6, 6, 4], 0.9999999999999998)
inner(a, b) = 0.0
inner(a, c) = 0.9999999999999993

```

---

<div class="post-metadata">

**Author:** ![miles](https://yyz2.discourse-cdn.com/free1/user_avatar/itensor.discourse.group/miles/32/6_2.png) [@miles](https://itensor.discourse.group/u/miles)\
**Post date:** [April 17, 2024, 9:15pm UTC](https://itensor.discourse.group/t/how-do-i-set-an-mps-bond-dimension-that-is-higher-than-needed/1637/3 "2024-04-17T21:15:01Z")

</div>

Hi Benjamin,  
Please use Matt’s solution above, which should give you exactly what you need. From the `inner` part at the end of the example code above, you can see that the expanded MPS is exactly the same state as your input state, just with a large bond dimension now.

In the future, we are planning to offer a “global subspace expansion” feature to make this more “push button” for users like yourself.

Miles
