Skip to content

Commit

Permalink
101 ame solver gets wrong result for constant hamiltonian (#102)
Browse files Browse the repository at this point in the history
* 🐛 add a 2π factor for in AME solver for constant Hamiltonian
* 🔖 bump version to v0.7.4
  • Loading branch information
neversakura authored Jan 14, 2023
1 parent 06148c0 commit 2f66aad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "OpenQuantumTools"
uuid = "e429f160-8886-11e9-20cb-0dbe84e78965"
authors = ["Huo Chen <[email protected]>"]
version = "0.7.3"
version = "0.7.4"

[deps]
DiffEqCallbacks = "459566f4-90b8-5000-8ac3-15dfb0a30def"
Expand Down
4 changes: 2 additions & 2 deletions src/QSolver/ame_solver.jl
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ function solve_ame(
H = w |> Diagonal |> sparse |> Hamiltonian
inters = rotate(A.interactions, v)
# build gaps for AME
gap_idx = OpenQuantumBase.build_gap_indices(w, digits, sigdigits, cutoff, lvl)
gap_idx = OpenQuantumBase.build_gap_indices(2*π*w, digits, sigdigits, cutoff, lvl)
# prepare for the initial state
u0 = build_u0(A.u0, :m, vectorize=vectorize)
u0 = v' * u0 * v
Expand Down Expand Up @@ -170,7 +170,7 @@ function build_ensemble_ame(
H = w |> Diagonal |> sparse |> Hamiltonian
inters = rotate(A.interactions, v)
# build gaps for AME
gap_idx = OpenQuantumBase.build_gap_indices(w, digits, sigdigits, cutoff, lvl)
gap_idx = OpenQuantumBase.build_gap_indices(2*π*w, digits, sigdigits, cutoff, lvl)
# prepare for the initial state
u0 = build_u0(A.u0, :v)
u0 = v' * u0
Expand Down

0 comments on commit 2f66aad

Please sign in to comment.