24namespace qpe {
namespace tests {
32 const double pi = 3.14159265358979323846;
58 error =
"Aharonov-Bohm scalar/gauge field build failed";
61 for (std::size_t y = 0; y < gauge.
height(); y += 7u) {
62 for (std::size_t x = 0; x < gauge.
width(); x += 7u) {
65 error =
"zero-flux U(1) links are not identity";
73 error =
"half-flux Aharonov-Bohm phase is not pi";
78 if (std::fabs(field.
norm2() - 1.0) > 2.0e-5) {
79 error =
"incident gauge phase changed wavefunction norm";
92 if (std::fabs(field.
norm2() - 1.0) > 2.0e-3) {
93 error =
"gauge-covariant Cayley propagation did not preserve norm";
99 error =
"Aharonov-Bohm history configuration failed";
103 if (history.
empty() || history.
samples().back().detectorProfileY.size() != field.
height()) {
104 error =
"Aharonov-Bohm detector history append failed";
Owning Cartesian grid of complex scalar samples.
double norm2() const noexcept
Returns the discrete integral of |psi|^2 including dx*dy.
std::size_t height() const noexcept
Returns the number of samples along Y.
static void initialize(ComplexField2D &field, const GaussianPacket2DParams ¶ms)
Initializes ialize.
Implements the Potential Field2D component.
bool matchesGrid(const ComplexField2D &field) const noexcept
Performs matches grid.
Value maximum() const noexcept
Performs maximum.
static double topologicalPhaseRadians(const QuantumAharonovBohm2DConfig &config) noexcept
Performs topological phase radians.
static void applyIncidentGaugePhase(ComplexField2D &field, const QuantumAharonovBohm2DConfig &config)
Applies incident gauge phase.
static bool buildFields(const ComplexField2D &reference, const QuantumAharonovBohm2DConfig &config, PotentialField2D &potential, U1GaugeField2D &gauge, std::string *reason=nullptr)
Builds fields.
Implements the Quantum Aharonov Bohm History2D component.
bool empty() const noexcept
Returns whether the object contains no data.
const std::vector< QuantumAharonovBohmSample2D > & samples() const noexcept
Samples s.
bool configure(const ComplexField2D &field, const QuantumAharonovBohm2DConfig &config)
Returns configure.
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.
Link linkY(std::size_t x, std::size_t y) const noexcept
Returns the +Y parallel-transport link at a site.
bool matchesGrid(const ComplexField2D &field) const noexcept
Tests whether dimensions and spacing match a scalar field.
std::complex< float > Link
std::size_t height() const noexcept
Returns the number of lattice sites along Y.
Link linkX(std::size_t x, std::size_t y) const noexcept
Returns the +X parallel-transport link at a site.
std::size_t width() const noexcept
Returns the number of lattice sites along X.
Declares the complex scalar field container representing two-dimensional wave functions.
Declares the gaussianpacket2d physics/numerical component used by QPE experiments.
bool runQuantumAharonovBohm2DTests(std::string &error)
Runs quantum aharonov bohm2 d tests.
Declares the potentialfield2d physics/numerical component used by QPE experiments.
Declares the quantumaharonovbohm2d physics/numerical component used by QPE experiments.
Declares regression and invariant tests for quantumaharonovbohm2d tests.
Declares the two-dimensional split-step Fourier propagator for the scalar Schrodinger branch.
Configuration values for Gaussian Packet2D Params.
Configuration values for Quantum Aharonov Bohm2D 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.
Declares the U(1) lattice gauge field used by magnetic-flux, Landau, and Hall-edge experiments.