From a402c8130daaabaf366626c02642feb489807c24 Mon Sep 17 00:00:00 2001
From: Angela Riva <62027430+angelariva@users.noreply.github.com>
Date: Thu, 5 Sep 2024 11:28:13 +0200
Subject: [PATCH] Update fundamentals.jl

Modified function MPOtoVector to fix the bug spotted by Masaaki Tokieda.
---
 src/fundamentals.jl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/fundamentals.jl b/src/fundamentals.jl
index 1dc6dd2..73d0abe 100644
--- a/src/fundamentals.jl
+++ b/src/fundamentals.jl
@@ -566,7 +566,7 @@ Convert an ITensors chain MPO into a form compatible with MPSDynamics
 """
 function MPOtoVector(mpo::MPO)
     N = length(mpo)
-    H = [Array(mpo[i], mpo[i].inds...) for i=1:N]
+    H = [Array(mpo[i], inds(mpo[i])...) for i=1:N]
     dims=size(H[1])
     H[1] = reshape(H[1], 1, dims...)
     dims=size(H[N])