|
Quantum Phenomena Explorer 7.9.8
Interactive quantum-phenomena Explorer Tutor — source documentation
|
In-place separable radix-2 complex FFT for QPE Cartesian fields. More...
#include <fft2d.h>
Public Types | |
| enum class | Direction { Forward , Inverse } |
| Selects forward or inverse Fourier-transform convention. More... | |
Static Public Member Functions | |
| static bool | isPowerOfTwo (std::size_t value) noexcept |
| Tests whether an integer is a non-zero power of two. | |
| static bool | supportsSize (std::size_t width, std::size_t height) noexcept |
| Returns whether both grid dimensions are supported by the radix-2 backend. | |
| static void | transform (ComplexField2D &field, Direction direction) |
| Applies an in-place 2D Fourier transform. | |
| static void | forward (ComplexField2D &field) |
| Convenience wrapper for an in-place forward transform. | |
| static void | inverse (ComplexField2D &field) |
| Convenience wrapper for an in-place normalized inverse transform. | |
Static Private Member Functions | |
| static void | transform1D (ComplexField2D::Value *base, std::size_t count, std::size_t stride, Direction direction) |
| Carries out transform 1 d. | |
In-place separable radix-2 complex FFT for QPE Cartesian fields.
The forward convention is
\[ X_k = \sum_n x_n e^{-i2\pi kn/N}. \]
while the inverse carries the 1/N factor. A 2D transform applies the 1D transform to rows and then columns, giving total inverse normalization 1/(width*height). The current implementation requires power-of-two grid dimensions, matching QPE's real-time 256x256/512x512 design target.
|
strong |
|
static |
Convenience wrapper for an in-place forward transform.
| field | Complex grid transformed in place. |
Definition at line 59 of file fft2d.cpp.
References Forward, and transform().
Referenced by qpe::MomentumSpace2D::compute(), qpe::QuantumZitterbewegung2D::energyFractions(), qpe::QuantumBackflow2D::positiveMomentumFraction(), qpe::QuantumKleinTunneling2D::prepareIncidentState(), qpe::QuantumZitterbewegung2D::prepareState(), qpe::tests::runFFT2DTests(), qpe::DiracSplitStepSolver2D::step(), qpe::SplitStepFourierSolver2D::step(), qpe::DiracSplitStepSolver2D::stepFree(), and qpe::SplitStepFourierSolver2D::stepFree().
|
static |
Convenience wrapper for an in-place normalized inverse transform.
| field | Complex grid transformed in place. |
Definition at line 64 of file fft2d.cpp.
References Inverse, and transform().
Referenced by qpe::QuantumKleinTunneling2D::prepareIncidentState(), qpe::QuantumBackflow2D::prepareState(), qpe::QuantumZitterbewegung2D::prepareState(), qpe::tests::runFFT2DTests(), qpe::DiracSplitStepSolver2D::step(), qpe::SplitStepFourierSolver2D::step(), qpe::DiracSplitStepSolver2D::stepFree(), and qpe::SplitStepFourierSolver2D::stepFree().
|
staticnoexcept |
|
staticnoexcept |
Returns whether both grid dimensions are supported by the radix-2 backend.
| width | Number of samples along X. |
| height | Number of samples along Y. |
Definition at line 30 of file fft2d.cpp.
Referenced by qpe::MomentumSpace2D::compute(), qpe::QuantumBackflow2D::positiveMomentumFraction(), qpe::DiracSplitStepSolver2D::prepare(), qpe::SplitStepFourierSolver2D::prepare(), qpe::QuantumBackflow2D::prepareState(), qpe::QuantumZitterbewegung2D::prepareState(), qpe::tests::runFFT2DTests(), and transform().
|
static |
Applies an in-place 2D Fourier transform.
| field | Complex grid transformed in place. |
| direction | Forward or inverse transform convention. |
Definition at line 35 of file fft2d.cpp.
References qpe::ComplexField2D::data(), qpe::ComplexField2D::empty(), qpe::ComplexField2D::height(), supportsSize(), transform1D(), and qpe::ComplexField2D::width().
|
staticprivate |
Carries out transform 1 d.
| base | The base value used by the operation. |
| count | The count value used by the operation. |
| stride | The stride value used by the operation. |
| direction | The direction value used by the operation. |
Definition at line 69 of file fft2d.cpp.
References Forward, and Inverse.
Referenced by transform().