Quantum Phenomena Explorer 7.9.8
Interactive quantum-phenomena Explorer Tutor — source documentation
Loading...
Searching...
No Matches
positioncollapse2d.h
Go to the documentation of this file.
1/**
2 * @file positioncollapse2d.h
3 * @brief Declares the positioncollapse2d physics/numerical component used by QPE experiments.
4 * @ingroup qpe_quantum
5 *
6 * Source: @c core/quantum/positioncollapse2d.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 <cstdint>
17
18namespace qpe {
19
20class ComplexField2D;
21
22/**
23 * @brief Data record containing Position Collapse2D Result.
24 *
25 * The structure carries computed data without coupling the numerical component to the GUI or renderer.
26 */
28{
29 bool valid = false;
31 double resolution = 0.0;
32 double normBefore = 0.0;
33 double normAfter = 0.0;
34};
35
36// Single-system finite-resolution position measurement.
37//
38// This is deliberately separate from PositionMeasurement2D, which samples an
39// ensemble without modifying psi. Here the measurement outcome is drawn from a
40// Gaussian-resolution position POVM and the corresponding positive Gaussian
41// measurement operator is applied to psi, followed by normalization.
42//
43// Numerically this avoids the unphysical infinite momentum bandwidth of a
44// grid-cell delta collapse while preserving the essential measurement story:
45// localization in position broadens momentum space and the collapsed state can
46// subsequently evolve again under the same Hamiltonian.
47/**
48 * @brief Implements the Position Collapse2D component.
49 *
50 * The class provides one focused service within the QPE architecture and is documented here independently of the experiment-level Help.
51 */
53{
54public:
55 /**
56 * @brief Performs collapse.
57 * @param field Field data to read or modify.
58 * @param resolution The resolution value used by the operation.
59 */
61 double resolution);
62
63 // Deterministic overload for tests and reproducible demonstrations.
64 /**
65 * @brief Performs collapse seeded.
66 * @param field Field data to read or modify.
67 * @param resolution The resolution value used by the operation.
68 * @param seed The seed value used by the operation.
69 */
71 double resolution,
72 std::uint32_t seed);
73};
74
75} // namespace qpe
Owning Cartesian grid of complex scalar samples.
Implements the Position Collapse2D component.
static PositionCollapse2DResult collapse(ComplexField2D &field, double resolution)
Performs collapse.
static PositionCollapse2DResult collapseSeeded(ComplexField2D &field, double resolution, std::uint32_t seed)
Performs collapse seeded.
Declares the positionmeasurement2d physics/numerical component used by QPE experiments.
Data record containing Position Collapse2D Result.
PositionMeasurement2DPoint outcome
Data record containing Position Measurement2D Point.