Skip to content

Commit

Permalink
Fix ArgumentError in variational_energy_estimator
Browse files Browse the repository at this point in the history
  • Loading branch information
jamie-tay committed Jan 15, 2025
1 parent 9712ee9 commit 9d8671b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/StatsTools/variational_energy_estimator.jl
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ end
function variational_energy_estimator(sim; max_replicas=:all, spectral_state=1, kwargs...)
df = DataFrame(sim)
num_replicas = parse(Int, metadata(df, "num_replicas"))
if iszero(num_replicas)
if num_replicas == 1
throw(ArgumentError(
"No replicas found. Use keyword \
`replica_strategy=AllOverlaps(n)` with n≥2 in `ProjectorMonteCarloProblem` to set up replicas!"
Expand Down

0 comments on commit 9d8671b

Please sign in to comment.