Skip to content

Commit

Permalink
possible test fix: undefined memory access in initialize_bloch!
Browse files Browse the repository at this point in the history
  • Loading branch information
pablosanjose committed Jan 19, 2024
1 parent 3aac793 commit c3a4f2e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/hamiltonian.jl
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,8 @@ function initialize_bloch!(bloch, hars)
fbloch = flat_unsafe(bloch)
fbloch´ = merge_sparse(flat.(matrix.(hars)))
copy!(fbloch, fbloch´)
ubloch = unflat_unsafe(bloch)
ubloch === fbloch || copy!(ubloch, unflat(blockstructure(bloch), fbloch))
needs_no_sync!(bloch)
update_nnz!(bloch)
return bloch
Expand Down

0 comments on commit c3a4f2e

Please sign in to comment.