-
Notifications
You must be signed in to change notification settings - Fork 170
Losing QN information when reading from HDF5 #414
Copy link
Copy link
Open
Description
I find that, when reading a QN Index object from an HDF5 file, the block structure is retained but I don't recover the quantum numbers associated with each block. For example,
auto io = Index(QN({"Sz",0}),1,QN({"Sz",-1}),1,QN({"Sz",+1}),1,Out,"index");
auto fo = h5_open("test.h5",'w');
h5_write(fo,"index",io);
close(fo);
auto fi = h5_open("test.h5",'r');
auto ii = h5_read<Index>(fi,"index");
println(ii == io);
println(ii);
println(io);
produces
1
(dim=3|id=34|"index") <Out>
1: 1 QN()
2: 1 QN()
3: 1 QN()
(dim=3|id=34|"index") <Out>
1: 1 QN({"Sz",0})
2: 1 QN({"Sz",-1})
3: 1 QN({"Sz",1})
I can read the same HDF5 file in Julia, however, where I recover the quantum numbers for each block. So this seems to be a problem with the C++ read function.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels