Skip to content

Change the loop structure #35

Description

@ohno

For performance, we should replace

for j in 1:nₘₐₓ
for i in 1:j
H[i,j] = element(hamiltonian, basisset.basis[i], basisset.basis[j])
end
end

with

H = ...
for o in hamiltonian
 for j in 1:nₘₐₓ 
   for i in 1:j 
     H[i,j] += element(o, basisset.basis[i], basisset.basis[j]) 
   end 
 end 
end

Please include an acknowledgments section to express your gratitude for the feedback received from participants of JuliaHEP Workshop 2025 at Princeton.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions