Skip to content

Commit bc31fa5

Browse files
committed
careful with ChepigaAnsatz
1 parent a178d3a commit bc31fa5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/algorithms/excitation/chepigaansatz.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function excitations(
4242

4343
# add random offset to kickstart Krylov process:
4444
AC = ψ.AC[pos]
45-
AC₀ = add(AC, randn(scalartype(AC), space(AC)), eps(real(scalartype(AC)))^(1 / 4))
45+
AC₀ = add(AC, randn!(similar(AC)), eps(real(scalartype(AC)))^(1 / 4))
4646

4747
H_eff = AC_hamiltonian(pos, ψ, H, ψ, envs)
4848
Es, ACs, info = eigsolve(H_eff, AC₀, num + 1, :SR, alg.alg)
@@ -107,7 +107,7 @@ function excitations(
107107

108108
# add random offset to kickstart Krylov process:
109109
@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))
110+
AC2₀ = add(AC2, randn!(similar(AC2)), eps(real(scalartype(AC2)))^(1 / 4))
111111

112112
H_eff = AC2_hamiltonian(pos, ψ, H, ψ, envs)
113113
Es, AC2s, info = eigsolve(H_eff, AC2₀, num + 1, :SR, alg.alg)

0 commit comments

Comments
 (0)