Skip to content

Commit 1e11658

Browse files
mankai-chowgithub-actions[bot]
authored andcommitted
Format .jl files (Runic)
1 parent 50a6780 commit 1e11658

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ITensors"
22
uuid = "9136182c-28ba-11e9-034c-db9fb085ebd5"
3+
version = "0.9.15"
34
authors = ["Matthew Fishman <[email protected]>", "Miles Stoudenmire <[email protected]>"]
4-
version = "0.9.14"
55

66
[deps]
77
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"

ext/ITensorsHDF5Ext/qn.jl

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,20 @@ function HDF5.write(parent::Union{HDF5.File, HDF5.Group}, gname::AbstractString,
1313
return write(g, "mods", mods)
1414
end
1515

16-
function HDF5.read(parent::Union{HDF5.File,HDF5.Group}, name::AbstractString, ::Type{QN})
17-
g = open_group(parent, name)
18-
if read(attributes(g)["type"]) != "QN"
19-
error("HDF5 group or file does not contain QN data")
20-
end
21-
names = read(g, "names")
22-
vals = read(g, "vals")
23-
mods = read(g, "mods")
24-
nemptyQN = maxQNs - length(names)
25-
if (nemptyQN > 0)
26-
append!(names, fill("", nemptyQN))
27-
append!(vals, fill(0, nemptyQN))
28-
append!(mods, fill(0, nemptyQN))
29-
end
30-
mqn = ntuple(n -> QNVal(names[n], vals[n], mods[n]), maxQNs)
31-
return QN(mqn)
16+
function HDF5.read(parent::Union{HDF5.File, HDF5.Group}, name::AbstractString, ::Type{QN})
17+
g = open_group(parent, name)
18+
if read(attributes(g)["type"]) != "QN"
19+
error("HDF5 group or file does not contain QN data")
20+
end
21+
names = read(g, "names")
22+
vals = read(g, "vals")
23+
mods = read(g, "mods")
24+
nemptyQN = maxQNs - length(names)
25+
if (nemptyQN > 0)
26+
append!(names, fill("", nemptyQN))
27+
append!(vals, fill(0, nemptyQN))
28+
append!(mods, fill(0, nemptyQN))
29+
end
30+
mqn = ntuple(n -> QNVal(names[n], vals[n], mods[n]), maxQNs)
31+
return QN(mqn)
3232
end

src/lib/QuantumNumbers/src/qn.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ using ..SmallStrings: SmallString
44
using StaticArrays: MVector, SVector
55

66
const maxQNs = 10
7-
const QNStorage = SVector{maxQNs,QNVal}
8-
const MQNStorage = MVector{maxQNs,QNVal}
7+
const QNStorage = SVector{maxQNs, QNVal}
8+
const MQNStorage = MVector{maxQNs, QNVal}
99

1010
"""
1111
A QN object stores a collection of up to four

0 commit comments

Comments
 (0)