Commit ba7e20e2 authored by Philipp Arras's avatar Philipp Arras
Browse files

KL energies: actually use napprox

parent 1d2adc2e
......@@ -407,7 +407,7 @@ def MetricGaussianKL(mean, hamiltonian, n_samples, mirror_samples, constants=[],
_, ham_sampling = _reduce_by_keys(mean, hamiltonian, point_estimates)
sampler = _MetricGaussianSampler(mean, ham_sampling, n_samples,
mirror_samples)
mirror_samples, napprox)
local_samples = sampler.draw_samples(comm)
mean, hamiltonian = _reduce_by_keys(mean, hamiltonian, constants)
......@@ -517,7 +517,8 @@ def GeoMetricKL(mean, hamiltonian, n_samples, minimizer_samp, mirror_samples,
_, ham_sampling = _reduce_by_keys(mean, hamiltonian, point_estimates)
sampler = _GeoMetricSampler(mean, ham_sampling, minimizer_samp,
start_from_lin, n_samples, mirror_samples)
start_from_lin, n_samples, mirror_samples,
napprox)
local_samples = sampler.draw_samples(comm)
mean, hamiltonian = _reduce_by_keys(mean, hamiltonian, constants)
return _SampledKLEnergy(mean, hamiltonian, sampler.n_eff_samples, False,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment