Skip to content

Commit

Permalink
resize_supercell for EU
Browse files Browse the repository at this point in the history
  • Loading branch information
ddahlbom committed Sep 24, 2024
1 parent 3ab8c30 commit ce91e71
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/EntangledUnits/EntangledReshaping.jl
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,19 @@ function repeat_periodically(esys, counts)
dipole_operators_origin = all_dipole_observables(sys_origin_new; apply_g=false)
(; observables, source_idcs) = observables_to_product_space(dipole_operators_origin, sys_origin_new, contraction_info)

return EntangledSystem(sys_new, sys_origin_new, contraction_info, observables, source_idcs)
end

function resize_supercell(esys::EntangledSystem, dims::NTuple{3,Int})
(; sys, sys_origin, contraction_info) = esys

# Resize both entangled and original system periodically
sys_new = reshape_supercell(sys, diagm(Vec3(dims)))
sys_origin_new = reshape_supercell(sys_origin, diagm(Vec3(dims)))

# Construct dipole operator field for reshaped EntangledSystem
dipole_operators_origin = all_dipole_observables(sys_origin_new; apply_g=false)
(; observables, source_idcs) = observables_to_product_space(dipole_operators_origin, sys_origin_new, contraction_info)

return EntangledSystem(sys_new, sys_origin_new, contraction_info, observables, source_idcs)
end

0 comments on commit ce91e71

Please sign in to comment.