18namespace qpe {
namespace tests {
27bool runOne(
double b,
double &drift,
double &edgeProbability, std::string &error)
38 h.
append(s.
time(),f);
const auto &a=h.
samples().back(); drift=a.driftFromStart; edgeProbability=a.edgeProbability;
39 if(std::fabs(a.norm-1.0)>3.0e-3){error=
"Hall edge propagation lost norm";
return false;}
return true;
48 double dp=0.0,dm=0.0,ep=0.0,em=0.0;
49 if(!runOne(+0.45,dp,ep,error)||!runOne(-0.45,dm,em,error))
return false;
50 if(dp<9.0||dm>-9.0||ep<0.80||em<0.80){error=
"Hall edge packet did not show robust chiral edge transport";
return false;}
51 if(std::fabs(dp+dm)>0.35){error=
"Hall edge chirality is not symmetric under B reversal";
return false;}
52 error.clear();
return true;
Owning Cartesian grid of complex scalar samples.
Implements the Potential Field2D component.
static bool prepareState(ComplexField2D &field, const QuantumHallEdge2DConfig &config, double mass, double hbar, std::string *reason=nullptr)
Prepares state.
static bool buildFields(const ComplexField2D &reference, const QuantumHallEdge2DConfig &config, PotentialField2D &potential, U1GaugeField2D &gauge, std::string *reason=nullptr)
Builds fields.
Implements the Quantum Hall Edge History2D component.
bool configure(const ComplexField2D &field, const QuantumHallEdge2DConfig &config)
Returns configure.
const std::vector< QuantumHallEdgeSample2D > & samples() const noexcept
Samples s.
void append(double time, const ComplexField2D &field)
Carries out append.
Symmetric split-step Fourier solver for the scalar 2D Schrodinger equation.
double time() const noexcept
Returns accumulated simulation time in solver units.
void setParameters(const SplitStepFourier2DParams ¶ms)
Replaces physical/time-step parameters and invalidates prepared caches.
void preparePotential(const PotentialField2D &potential)
Precomputes the scalar-potential half-step phase cache.
void prepare(const ComplexField2D &field)
Precomputes spectral kinetic phase factors for a specific grid.
void stepGaugeCovariant(ComplexField2D &field, const PotentialField2D &potential, const U1GaugeField2D &gauge)
Advances one gauge-covariant Schrodinger step using U(1) links.
Discrete U(1) gauge connection for gauge-covariant Schrodinger experiments.
Declares the complex scalar field container representing two-dimensional wave functions.
bool runOne(double b, double &drift, double &edgeProbability, std::string &error)
Runs one.
bool runQuantumHallEdge2DTests(std::string &error)
Runs quantum hall edge2 d tests.
Declares the potentialfield2d physics/numerical component used by QPE experiments.
Declares the quantumhalledge2d physics/numerical component used by QPE experiments.
Declares regression and invariant tests for quantumhalledge2d tests.
Declares the two-dimensional split-step Fourier propagator for the scalar Schrodinger branch.
Configuration values for Quantum Hall Edge2D Config.
Physical/numerical parameters for scalar split-step propagation.
float hbar
Reduced Planck constant in simulation units.
float dt
Propagation step in simulation time units.
float mass
Particle/effective mass in simulation units.