Skip to content

Commit c74a1f7

Browse files
authored
Restore README.md
1 parent 03537cf commit c74a1f7

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

README.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -89,19 +89,17 @@ Major non-breaking changes include:
8989

9090
### Transferring `TensorMap` data from older versions to v0.13:
9191

92-
To export `TensorMap` data from TensorKit.jl v0.12.7 or earlier, please use a format that is explicit about all "blocks" of the tensor, i.e. all coupled sectors and their corresponding matrix blocks. Therefore, on the
93-
older version of TensorKit.jl, use the following code to save the data:
94-
95-
```julia
96-
using JLD2
97-
filename = "choose_some_filename.jld2"
98-
t_dict = Dict(
99-
:codomain => repr(codomain(t)),
100-
:domain => repr(domain(t)),
101-
:data => Dict(repr(c) => Array(b) for (c, b) in blocks(t))
102-
)
103-
save_object(filename, t_dict)
104-
```
92+
To export `TensorMap` data from TensorKit.jl v0.12.7 or earlier, you should first export the
93+
data there in a format that is explicit about how tensor data is associated with the
94+
structural part of the tensor, i.e. the splitting and fusion tree pairs. Therefore, on the
95+
older version of TensorKit.jl, use the following code to save the data
96+
97+
```julia
98+
using JLD2
99+
filename = "choose_some_filename.jld2"
100+
t_dict = Dict(:space => space(t), :data => Dict((f₁, f₂) => t[f₁, f₂] for (f₁, f₂) in fusiontrees(t)))
101+
jldsave(filename; t_dict)
102+
```
105103

106104
If you have already upgraded to TensorKit.jl v0.13, you can still install the old version in
107105
a separate environment, for example a temporary environment. To do this, run

0 commit comments

Comments
 (0)