Quantum Phenomena Explorer 7.9.8
Interactive quantum-phenomena Explorer Tutor — source documentation
Loading...
Searching...
No Matches
wavefunctionimagerenderer.h
Go to the documentation of this file.
1/**
2 * @file wavefunctionimagerenderer.h
3 * @brief Declares the wavefunctionimagerenderer visualization component used by QPE.
4 * @ingroup qpe_graphics
5 *
6 * Source: @c graphics/renderer/wavefunctionimagerenderer.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
14#include <QImage>
15
16namespace qpe {
17class ComplexField2D;
18
19/**
20 * @brief Enumerates the supported Wave Function View values.
21 *
22 * The enumeration is part of the typed interface used to keep experiment configuration and analysis routing explicit.
23 */
25{
26 Probability = 0,
27 Phase,
28 Real,
30};
31
32/**
33 * @brief Configuration values for Wave Function Render Options.
34 *
35 * The structure groups parameters that are passed together so the associated numerical/analysis component can be configured reproducibly.
36 */
38{
39 // Display-only gamma. The wavefunction itself is never modified.
40 float gamma = 1.0f;
41};
42
43/**
44 * @brief Implements the Wave Function Image Renderer component.
45 *
46 * The class provides one focused service within the QPE architecture and is documented here independently of the experiment-level Help.
47 */
49{
50public:
51 /**
52 * @brief Renders the component state.
53 * @param field Field data to read or modify.
54 * @param view The view value used by the operation.
55 * @param options The options value used by the operation.
56 */
57 static QImage render(const ComplexField2D &field,
59 const WaveFunctionRenderOptions &options = {});
60
61 /**
62 * @brief Carries out peak amplitude.
63 * @param field Field data to read or modify.
64 */
65 static double peakAmplitude(const ComplexField2D &field) noexcept;
66 /**
67 * @brief Carries out peak abs real.
68 * @param field Field data to read or modify.
69 */
70 static double peakAbsReal(const ComplexField2D &field) noexcept;
71 /**
72 * @brief Carries out peak abs imaginary.
73 * @param field Field data to read or modify.
74 */
75 static double peakAbsImaginary(const ComplexField2D &field) noexcept;
76};
77
78} // namespace qpe
Owning Cartesian grid of complex scalar samples.
Implements the Wave Function Image Renderer component.
static double peakAbsReal(const ComplexField2D &field) noexcept
Carries out peak abs real.
static double peakAbsImaginary(const ComplexField2D &field) noexcept
Carries out peak abs imaginary.
static double peakAmplitude(const ComplexField2D &field) noexcept
Carries out peak amplitude.
static QImage render(const ComplexField2D &field, WaveFunctionView view, const WaveFunctionRenderOptions &options={})
Renders the component state.
WaveFunctionView
Enumerates the supported Wave Function View values.
Configuration values for Wave Function Render Options.