Quantum Phenomena Explorer 7.9.8
Interactive quantum-phenomena Explorer Tutor — source documentation
Loading...
Searching...
No Matches
probabilitystreamlines2d.h
Go to the documentation of this file.
1/**
2 * @file probabilitystreamlines2d.h
3 * @brief Declares the probabilitystreamlines2d physics/numerical component used by QPE experiments.
4 * @ingroup qpe_quantum
5 *
6 * Source: @c core/quantum/probabilitystreamlines2d.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
15
16#include <cstddef>
17#include <vector>
18
19namespace qpe {
20
21/**
22 * @brief Data structure used by the Streamline Point2D component.
23 *
24 * The structure keeps related values explicit and testable across the QPE physics, analysis, or persistence layers.
25 */
27{
28 float x = 0.0f;
29 float y = 0.0f;
30};
31
32/**
33 * @brief Data structure used by the Probability Streamline2D component.
34 *
35 * The structure keeps related values explicit and testable across the QPE physics, analysis, or persistence layers.
36 */
38{
39 std::vector<StreamlinePoint2D> points;
40};
41
42/**
43 * @brief Configuration values for Probability Streamline Params.
44 *
45 * The structure groups parameters that are passed together so the associated numerical/analysis component can be configured reproducibly.
46 */
48{
49 float stepLength = 0.08f;
50 std::size_t maxSteps = 120;
51 float minRelativeMagnitude = 0.015f;
52};
53
54// Builds integral curves of the probability-current field. Streamlines are
55// visualization geometry only: they never feed back into psi or the solver.
56/**
57 * @brief Implements the Probability Streamlines2D component.
58 *
59 * The class provides one focused service within the QPE architecture and is documented here independently of the experiment-level Help.
60 */
62{
63public:
64 /**
65 * @brief Samples bilinear.
66 * @param current The current value used by the operation.
67 * @param x X coordinate/value.
68 * @param y Y coordinate/value.
69 * @param jx The jx value used by the operation.
70 * @param jy The jy value used by the operation.
71 */
72 static bool sampleBilinear(const ProbabilityCurrentField2D &current,
73 float x,
74 float y,
75 float &jx,
76 float &jy);
77
78 /**
79 * @brief Performs trace.
80 * @param current The current value used by the operation.
81 * @param seedX The seed x value used by the operation.
82 * @param seedY The seed y value used by the operation.
83 * @param params Parameter block to apply.
84 */
86 float seedX,
87 float seedY,
88 const ProbabilityStreamlineParams &params);
89};
90
91} // namespace qpe
Implements the Probability Streamlines2D component.
static bool sampleBilinear(const ProbabilityCurrentField2D &current, float x, float y, float &jx, float &jy)
Samples bilinear.
static ProbabilityStreamline2D trace(const ProbabilityCurrentField2D &current, float seedX, float seedY, const ProbabilityStreamlineParams &params)
Performs trace.
Declares the probabilitycurrent2d physics/numerical component used by QPE experiments.
Sampled two-dimensional probability-current field and integrated diagnostics.
Data structure used by the Probability Streamline2D component.
std::vector< StreamlinePoint2D > points
Configuration values for Probability Streamline Params.
Data structure used by the Streamline Point2D component.