Quantum Phenomena Explorer 7.9.8
Interactive quantum-phenomena Explorer Tutor — source documentation
Loading...
Searching...
No Matches
ramseyinterferometry2d.h
Go to the documentation of this file.
1/**
2 * @file ramseyinterferometry2d.h
3 * @brief Declares the ramseyinterferometry2d physics/numerical component used by QPE experiments.
4 * @ingroup qpe_quantum
5 *
6 * Source: @c core/quantum/ramseyinterferometry2d.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 <vector>
17
18namespace qpe {
19
20struct BoundStateSpectrum1D;
21struct RamseyPulseSequence2DConfig;
22
23/**
24 * @brief Data structure used by the Ramsey Theory2D component.
25 *
26 * The structure keeps related values explicit and testable across the QPE physics, analysis, or persistence layers.
27 */
29{
30 bool valid = false;
31 int stateA = 0;
32 int stateB = 1;
33 double energyA = 0.0;
34 double energyB = 0.0;
37 double detuning = 0.0;
41 double firstPulseEnd = 0.0;
42 bool echoEnabled = false;
43 double echoPulseStart = 0.0;
44 double echoPulseEnd = 0.0;
45 double secondPulseStart = 0.0;
46 double secondPulseEnd = 0.0;
47 double freePhaseRadians = 0.0;
50};
51
52/**
53 * @brief Data structure used by the Ramsey Fringe Sample2D component.
54 *
55 * The structure keeps related values explicit and testable across the QPE physics, analysis, or persistence layers.
56 */
58{
60 double phaseRadians = 0.0;
61 double populationA = 0.0;
62 double populationB = 0.0;
63};
64
65// Step 28: analysis-only ensemble with a Gaussian distribution of static
66// transition-frequency offsets. It never changes the application's psi,
67// potential, solver clock or measurement probabilities. Each ensemble
68// member is a separate two-level reference system whose detuning remains
69// constant for the complete pulse sequence.
70/**
71 * @brief Configuration values for Ramsey Ensemble2D Config.
72 *
73 * The structure groups parameters that are passed together so the associated numerical/analysis component can be configured reproducibly.
74 */
76{
77 bool enabled = false;
78 double detuningStdDev = 0.06; // angular-frequency sigma, same units as omega
79 int memberCount = 41;
80};
81
82/**
83 * @brief Data structure used by the Ramsey Ensemble Result2D component.
84 *
85 * The structure keeps related values explicit and testable across the QPE physics, analysis, or persistence layers.
86 */
88{
89 bool valid = false;
90 int memberCount = 0;
91 double detuningStdDev = 0.0;
92 double meanPopulationA = 0.0;
93 double meanPopulationB = 0.0;
94 double minimumPopulationB = 0.0;
95 double maximumPopulationB = 0.0;
96};
97
98/**
99 * @brief Data structure used by the Ramsey Ensemble Fringe Sample2D component.
100 *
101 * The structure keeps related values explicit and testable across the QPE physics, analysis, or persistence layers.
102 */
104{
106 double meanPopulationA = 0.0;
107 double meanPopulationB = 0.0;
108};
109
110// Steps 26-28 diagnostic for Ramsey interferometry. The real application
111// still evolves psi(x,y) with the full split-step solver. This helper projects
112// that field onto the two lowest stationary states and integrates the same
113// pulse recipe only as a compact two-level reference / fringe predictor.
114/**
115 * @brief Implements the Ramsey Interferometry2D component.
116 *
117 * The class provides one focused service within the QPE architecture and is documented here independently of the experiment-level Help.
118 */
120{
121public:
122 /**
123 * @brief Performs analyze.
124 * @param spectrum The spectrum value used by the operation.
125 * @param sequence The sequence value used by the operation.
126 * @param stateA The state a value used by the operation.
127 * @param stateB The state b value used by the operation.
128 * @param hbar The hbar value used by the operation.
129 */
130 static RamseyTheory2D analyze(const BoundStateSpectrum1D &spectrum,
131 const RamseyPulseSequence2DConfig &sequence,
132 int stateA = 0,
133 int stateB = 1,
134 double hbar = 1.0) noexcept;
135
136 /**
137 * @brief Performs project.
138 * @param field Field data to read or modify.
139 * @param spectrum The spectrum value used by the operation.
140 * @param stateA The state a value used by the operation.
141 * @param stateB The state b value used by the operation.
142 */
144 const BoundStateSpectrum1D &spectrum,
145 int stateA = 0,
146 int stateB = 1);
147
148 /**
149 * @brief Performs scan free evolution.
150 * @param spectrum The spectrum value used by the operation.
151 * @param sequence The sequence value used by the operation.
152 * @param minimumFreeTime Time value expressed in the units documented by the calling component.
153 * @param maximumFreeTime Time value expressed in the units documented by the calling component.
154 * @param sampleCount The sample count value used by the operation.
155 * @param stateA The state a value used by the operation.
156 * @param stateB The state b value used by the operation.
157 * @param hbar The hbar value used by the operation.
158 */
159 static std::vector<RamseyFringeSample2D> scanFreeEvolution(
160 const BoundStateSpectrum1D &spectrum,
161 const RamseyPulseSequence2DConfig &sequence,
162 double minimumFreeTime,
163 double maximumFreeTime,
164 int sampleCount,
165 int stateA = 0,
166 int stateB = 1,
167 double hbar = 1.0);
168
169 /**
170 * @brief Validates ensemble config.
171 * @param config Configuration to apply.
172 */
173 static bool validateEnsembleConfig(const RamseyEnsemble2DConfig &config) noexcept;
174
175 /**
176 * @brief Performs analyze static detuning ensemble.
177 * @param spectrum The spectrum value used by the operation.
178 * @param sequence The sequence value used by the operation.
179 * @param ensemble The ensemble value used by the operation.
180 * @param stateA The state a value used by the operation.
181 * @param stateB The state b value used by the operation.
182 * @param hbar The hbar value used by the operation.
183 */
185 const BoundStateSpectrum1D &spectrum,
186 const RamseyPulseSequence2DConfig &sequence,
187 const RamseyEnsemble2DConfig &ensemble,
188 int stateA = 0,
189 int stateB = 1,
190 double hbar = 1.0);
191
192 /**
193 * @brief Performs scan free evolution ensemble.
194 * @param spectrum The spectrum value used by the operation.
195 * @param sequence The sequence value used by the operation.
196 * @param ensemble The ensemble value used by the operation.
197 * @param minimumFreeTime Time value expressed in the units documented by the calling component.
198 * @param maximumFreeTime Time value expressed in the units documented by the calling component.
199 * @param sampleCount The sample count value used by the operation.
200 * @param stateA The state a value used by the operation.
201 * @param stateB The state b value used by the operation.
202 * @param hbar The hbar value used by the operation.
203 */
204 static std::vector<RamseyEnsembleFringeSample2D> scanFreeEvolutionEnsemble(
205 const BoundStateSpectrum1D &spectrum,
206 const RamseyPulseSequence2DConfig &sequence,
207 const RamseyEnsemble2DConfig &ensemble,
208 double minimumFreeTime,
209 double maximumFreeTime,
210 int sampleCount,
211 int stateA = 0,
212 int stateB = 1,
213 double hbar = 1.0);
214};
215
216} // namespace qpe
Owning Cartesian grid of complex scalar samples.
Implements the Ramsey Interferometry2D component.
static DrivenTwoLevelProjection2D project(const ComplexField2D &field, const BoundStateSpectrum1D &spectrum, int stateA=0, int stateB=1)
Performs project.
static bool validateEnsembleConfig(const RamseyEnsemble2DConfig &config) noexcept
Validates ensemble config.
static RamseyTheory2D analyze(const BoundStateSpectrum1D &spectrum, const RamseyPulseSequence2DConfig &sequence, int stateA=0, int stateB=1, double hbar=1.0) noexcept
Performs analyze.
static RamseyEnsembleResult2D analyzeStaticDetuningEnsemble(const BoundStateSpectrum1D &spectrum, const RamseyPulseSequence2DConfig &sequence, const RamseyEnsemble2DConfig &ensemble, int stateA=0, int stateB=1, double hbar=1.0)
Performs analyze static detuning ensemble.
static std::vector< RamseyFringeSample2D > scanFreeEvolution(const BoundStateSpectrum1D &spectrum, const RamseyPulseSequence2DConfig &sequence, double minimumFreeTime, double maximumFreeTime, int sampleCount, int stateA=0, int stateB=1, double hbar=1.0)
Performs scan free evolution.
static std::vector< RamseyEnsembleFringeSample2D > scanFreeEvolutionEnsemble(const BoundStateSpectrum1D &spectrum, const RamseyPulseSequence2DConfig &sequence, const RamseyEnsemble2DConfig &ensemble, double minimumFreeTime, double maximumFreeTime, int sampleCount, int stateA=0, int stateB=1, double hbar=1.0)
Performs scan free evolution ensemble.
Declares the driventwolevel2d physics/numerical component used by QPE experiments.
Data structure used by the Bound State Spectrum1D component.
Data structure used by the Driven Two Level Projection2D component.
Configuration values for Ramsey Ensemble2D Config.
Data structure used by the Ramsey Ensemble Fringe Sample2D component.
Data structure used by the Ramsey Ensemble Result2D component.
Data structure used by the Ramsey Fringe Sample2D component.
Configuration values for Ramsey Pulse Sequence2D Config.
Data structure used by the Ramsey Theory2D component.