Quantum Phenomena Explorer 7.9.8
Interactive quantum-phenomena Explorer Tutor — source documentation
Loading...
Searching...
No Matches
driventwolevel2d.h
Go to the documentation of this file.
1/**
2 * @file driventwolevel2d.h
3 * @brief Declares the driventwolevel2d physics/numerical component used by QPE experiments.
4 * @ingroup qpe_quantum
5 *
6 * Source: @c core/quantum/driventwolevel2d.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 <complex>
15
16namespace qpe {
17
18class ComplexField2D;
19struct BoundStateSpectrum1D;
20struct PeriodicPotentialDrive2DConfig;
21
22/**
23 * @brief Data structure used by the Driven Two Level Projection2D component.
24 *
25 * The structure keeps related values explicit and testable across the QPE physics, analysis, or persistence layers.
26 */
28{
29 bool valid = false;
30 std::complex<double> amplitudeA;
31 std::complex<double> amplitudeB;
32 double populationA = 0.0;
33 double populationB = 0.0;
34 double capturedPopulation = 0.0;
35 double blochX = 0.0;
36 double blochY = 0.0;
37 double blochZ = 0.0;
38};
39
40/**
41 * @brief Data structure used by the Driven Two Level Theory2D component.
42 *
43 * The structure keeps related values explicit and testable across the QPE physics, analysis, or persistence layers.
44 */
46{
47 bool valid = false;
48 int stateA = 0;
49 int stateB = 1;
50 double energyA = 0.0;
51 double energyB = 0.0;
54 double detuning = 0.0;
59 double firstMaximumTime = 0.0;
60 double rabiPeriod = 0.0;
61};
62
63// Analysis helper for a periodically driven pair of stationary bound states.
64// The full application still evolves psi(x,y) with the 2D split-step solver;
65// this module only projects that field onto a selected stationary basis and
66// provides the rotating-wave two-level reference curve.
67/**
68 * @brief Implements the Driven Two Level2D component.
69 *
70 * The class provides one focused service within the QPE architecture and is documented here independently of the experiment-level Help.
71 */
73{
74public:
75 /**
76 * @brief Performs project.
77 * @param field Field data to read or modify.
78 * @param spectrum The spectrum value used by the operation.
79 * @param stateA The state a value used by the operation.
80 * @param stateB The state b value used by the operation.
81 */
83 const BoundStateSpectrum1D &spectrum,
84 int stateA = 0,
85 int stateB = 1);
86
87 /**
88 * @brief Performs matrix element x.
89 * @param spectrum The spectrum value used by the operation.
90 * @param stateA The state a value used by the operation.
91 * @param stateB The state b value used by the operation.
92 */
93 static double matrixElementX(const BoundStateSpectrum1D &spectrum,
94 int stateA = 0,
95 int stateB = 1) noexcept;
96
97 /**
98 * @brief Performs analyze.
99 * @param spectrum The spectrum value used by the operation.
100 * @param drive The drive value used by the operation.
101 * @param stateA The state a value used by the operation.
102 * @param stateB The state b value used by the operation.
103 * @param hbar The hbar value used by the operation.
104 */
107 int stateA = 0,
108 int stateB = 1,
109 double hbar = 1.0) noexcept;
110
111 // RWA transition probability from A to B when the initial state is A.
112 /**
113 * @brief Performs reference population b.
114 * @param theory The theory value used by the operation.
115 * @param time Simulation time in solver units.
116 */
117 static double referencePopulationB(const DrivenTwoLevelTheory2D &theory,
118 double time) noexcept;
119};
120
121} // namespace qpe
Owning Cartesian grid of complex scalar samples.
Implements the Driven Two Level2D component.
static double referencePopulationB(const DrivenTwoLevelTheory2D &theory, double time) noexcept
Performs reference population b.
static double matrixElementX(const BoundStateSpectrum1D &spectrum, int stateA=0, int stateB=1) noexcept
Performs matrix element x.
static DrivenTwoLevelProjection2D project(const ComplexField2D &field, const BoundStateSpectrum1D &spectrum, int stateA=0, int stateB=1)
Performs project.
static DrivenTwoLevelTheory2D analyze(const BoundStateSpectrum1D &spectrum, const PeriodicPotentialDrive2DConfig &drive, int stateA=0, int stateB=1, double hbar=1.0) noexcept
Performs analyze.
Data structure used by the Bound State Spectrum1D component.
Data structure used by the Driven Two Level Projection2D component.
std::complex< double > amplitudeA
std::complex< double > amplitudeB
Data structure used by the Driven Two Level Theory2D component.
Configuration values for Periodic Potential Drive2D Config.