Quantum Phenomena Explorer 7.9.8
Interactive quantum-phenomena Explorer Tutor — source documentation
Loading...
Searching...
No Matches
energyobservables2d.h
Go to the documentation of this file.
1/**
2 * @file energyobservables2d.h
3 * @brief Declares the energyobservables2d physics/numerical component used by QPE experiments.
4 * @ingroup qpe_quantum
5 *
6 * Source: @c core/quantum/energyobservables2d.h. This file is part of Quantum Phenomena Explorer (QPE),
7 * maintained by Officina Turini. See LICENSE_IT.txt / LICENSE.txt for the
8 * QPE freeware source-available terms and THIRD_PARTY_NOTICES.txt for
9 * third-party components.
10 */
11
12#pragma once
13
16
17namespace qpe {
18
19/**
20 * @brief Data record containing Energy Observables2D Result.
21 *
22 * The structure carries computed data without coupling the numerical component to the GUI or renderer.
23 */
25{
26 double norm2 = 0.0;
27 double kinetic = 0.0;
28 double potential = 0.0;
29 double total = 0.0;
30};
31
32// Expectation values of the Hamiltonian in the current state.
33//
34// Kinetic energy is evaluated in position space using a fourth-order centred
35// derivative (periodic indexing, matching the FFT solver domain). This keeps
36// the live diagnostic O(N) and avoids adding another FFT to every UI refresh.
37// The returned energies are normalized by the current wavefunction norm, so
38// they remain interpretable when a CAP has removed part of the probability.
39/**
40 * @brief Implements the Energy Observables2D component.
41 *
42 * The class provides one focused service within the QPE architecture and is documented here independently of the experiment-level Help.
43 */
45{
46public:
47 /**
48 * @brief Performs compute.
49 * @param field Field data to read or modify.
50 * @param potential Potential field used by the operation.
51 * @param hbar The hbar value used by the operation.
52 * @param mass The mass value used by the operation.
53 */
55 const PotentialField2D &potential,
56 double hbar,
57 double mass);
58};
59
60} // namespace qpe
Owning Cartesian grid of complex scalar samples.
Implements the Energy Observables2D component.
static EnergyObservables2DResult compute(const ComplexField2D &field, const PotentialField2D &potential, double hbar, double mass)
Performs compute.
Implements the Potential Field2D component.
Declares the complex scalar field container representing two-dimensional wave functions.
Declares the potentialfield2d physics/numerical component used by QPE experiments.
Data record containing Energy Observables2D Result.