|
Quantum 3xplorer (Q3)
An AI-native quantum simulation engine
|
#include <spread_minimizer.hpp>
Public Member Functions | |
| SpreadMinimizer (const KPointStencil &stencil, SpreadMinimizationSettings settings) | |
| Settings that describe no minimisation are refused here rather than mid-run. | |
| SpreadMinimizationResult | run (const BlochOverlaps &overlaps, const SpreadFunctional &functional) const |
Definition at line 64 of file spread_minimizer.hpp.
|
inline |
Settings that describe no minimisation are refused here rather than mid-run.
Definition at line 67 of file spread_minimizer.hpp.
References q3::SpreadMinimizationSettings::maximum_iterations, q3::SpreadMinimizationSettings::maximum_step_reductions, q3::SpreadMinimizationSettings::relative_gradient_tolerance, q3::SpreadMinimizationSettings::restart_interval, q3::SpreadMinimizationSettings::step_growth_factor, and q3::SpreadMinimizationSettings::step_reduction_factor.
|
inline |
overlaps are N x N at every (k, b), between the states the gauge has already selected – the composite V(k)U(k) applied on both sides. functional is the spread to descend, over the same stencil.
The natural scale of the problem: the gradient carries a factor of four and a sum over the b-weights, so this makes the first trial rotation an angle of order one radian's worth of the actual descent direction rather than an arbitrary number of them.
The gauge is the one the gradient above was taken at, and that gradient did not pass the floor or the run would have ended there – so this ending is never stationary.
Omega stopped moving. Whether that is a minimum is settled by the gradient and not by the fact that it stopped: a line search whose steps have gone tiny produces a spread that changes by nothing, which satisfies any relative-change test while the gauge is nowhere near stationary. Copper stops here at a real minimum; a rattled four-atom supercell stops here with a gradient four orders of magnitude too large, and the two must not get the same word.
The gradient is taken again, at the gauge being returned: the one above belongs to the gauge before this iteration's step.
Definition at line 106 of file spread_minimizer.hpp.
References q3::SpreadMinimizationSettings::convergence_tolerance, q3::SpreadMinimizationSettings::convergence_window, q3::SpreadFunctional::gradient(), q3::ConvergenceWindow::has_converged(), q3::SpreadMinimizationSettings::maximum_iterations, q3::ConvergenceWindow::record(), q3::SpreadMinimizationSettings::relative_gradient_tolerance, q3::SpreadMinimizationSettings::restart_interval, q3::SpreadMinimizationSettings::step_growth_factor, and q3::KPointStencil::total_weight().
Referenced by q3::MaximallyLocalizedGaugeChoice::choose().