We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a178d3a commit bc31fa5Copy full SHA for bc31fa5
1 file changed
src/algorithms/excitation/chepigaansatz.jl
@@ -42,7 +42,7 @@ function excitations(
42
43
# add random offset to kickstart Krylov process:
44
AC = ψ.AC[pos]
45
- AC₀ = add(AC, randn(scalartype(AC), space(AC)), eps(real(scalartype(AC)))^(1 / 4))
+ AC₀ = add(AC, randn!(similar(AC)), eps(real(scalartype(AC)))^(1 / 4))
46
47
H_eff = AC_hamiltonian(pos, ψ, H, ψ, envs)
48
Es, ACs, info = eigsolve(H_eff, AC₀, num + 1, :SR, alg.alg)
@@ -107,7 +107,7 @@ function excitations(
107
108
109
@plansor AC2[-1 -2; -3 -4] := ψ.AC[pos][-1 -2; 1] * ψ.AR[pos + 1][1 -4; -3]
110
- AC2₀ = add(AC2, randn(scalartype(AC2), space(AC2)), eps(real(scalartype(AC2)))^(1 / 4))
+ AC2₀ = add(AC2, randn!(similar(AC2)), eps(real(scalartype(AC2)))^(1 / 4))
111
112
H_eff = AC2_hamiltonian(pos, ψ, H, ψ, envs)
113
Es, AC2s, info = eigsolve(H_eff, AC2₀, num + 1, :SR, alg.alg)
0 commit comments