Skip to content

Push change into FuzzifiED/ITensors.jl#1682

Closed
mankai-chow wants to merge 10 commits into
ITensor:mainfrom
FuzzifiED:merge_251113
Closed

Push change into FuzzifiED/ITensors.jl#1682
mankai-chow wants to merge 10 commits into
ITensor:mainfrom
FuzzifiED:merge_251113

Conversation

@mankai-chow

Copy link
Copy Markdown

Description

Please include a summary of the change and which issue is fixed (if applicable). Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes #(issue)

If practical and applicable, please include a minimal demonstration of the previous behavior and new behavior below.

Minimal demonstration of previous behavior

[YOUR MINIMAL DEMONSTRATION OF PREVIOUS BEHAVIOR]

Minimal demonstration of new behavior

[YOUR MINIMAL DEMONSTRATION OF NEW BEHAVIOR]

How Has This Been Tested?

Please add tests that verify your changes to a file in the test directory.

Please give a summary of the tests that you added to verify your changes.

  • Test A
  • Test B

Checklist:

  • My code follows the style guidelines of this project. Please run using JuliaFormatter; format(".") in the base directory of the repository (~/.julia/dev/ITensors) to format your code according to our style guidelines.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that verify the behavior of the changes I made.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • Any dependent changes have been merged and published in downstream modules.

@github-actions

github-actions Bot commented Nov 13, 2025

Copy link
Copy Markdown
Contributor

Your PR requires formatting changes to meet the project's style guidelines.
Please consider running Runic (git runic main) to apply these changes.

Click here to view the suggested changes.
diff --git a/ext/ITensorsHDF5Ext/qn.jl b/ext/ITensorsHDF5Ext/qn.jl
index 4282f1611..d756082c1 100644
--- a/ext/ITensorsHDF5Ext/qn.jl
+++ b/ext/ITensorsHDF5Ext/qn.jl
@@ -13,20 +13,20 @@ function HDF5.write(parent::Union{HDF5.File, HDF5.Group}, gname::AbstractString,
     return write(g, "mods", mods)
 end
 
-function HDF5.read(parent::Union{HDF5.File,HDF5.Group}, name::AbstractString, ::Type{QN})
-  g = open_group(parent, name)
-  if read(attributes(g)["type"]) != "QN"
-    error("HDF5 group or file does not contain QN data")
-  end
-  names = read(g, "names")
-  vals = read(g, "vals")
-  mods = read(g, "mods")
-  nemptyQN = maxQNs - length(names)
-  if (nemptyQN > 0)
-    append!(names, fill("", nemptyQN))
-    append!(vals, fill(0, nemptyQN))
-    append!(mods, fill(0, nemptyQN))
-  end
-  mqn = ntuple(n -> QNVal(names[n], vals[n], mods[n]), maxQNs)
-  return QN(mqn)
+function HDF5.read(parent::Union{HDF5.File, HDF5.Group}, name::AbstractString, ::Type{QN})
+    g = open_group(parent, name)
+    if read(attributes(g)["type"]) != "QN"
+        error("HDF5 group or file does not contain QN data")
+    end
+    names = read(g, "names")
+    vals = read(g, "vals")
+    mods = read(g, "mods")
+    nemptyQN = maxQNs - length(names)
+    if (nemptyQN > 0)
+        append!(names, fill("", nemptyQN))
+        append!(vals, fill(0, nemptyQN))
+        append!(mods, fill(0, nemptyQN))
+    end
+    mqn = ntuple(n -> QNVal(names[n], vals[n], mods[n]), maxQNs)
+    return QN(mqn)
 end
diff --git a/src/lib/QuantumNumbers/src/qn.jl b/src/lib/QuantumNumbers/src/qn.jl
index e91631c78..4eb347ae4 100644
--- a/src/lib/QuantumNumbers/src/qn.jl
+++ b/src/lib/QuantumNumbers/src/qn.jl
@@ -4,8 +4,8 @@ using ..SmallStrings: SmallString
 using StaticArrays: MVector, SVector
 
 const maxQNs = 10
-const QNStorage = SVector{maxQNs,QNVal}
-const MQNStorage = MVector{maxQNs,QNVal}
+const QNStorage = SVector{maxQNs, QNVal}
+const MQNStorage = MVector{maxQNs, QNVal}
 
 """
 A QN object stores a collection of up to four

@mankai-chow

Copy link
Copy Markdown
Author

Sorry this is a mistake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant