Quantum Phenomena Explorer 7.9.8
Interactive quantum-phenomena Explorer Tutor — source documentation
Loading...
Searching...
No Matches
quantumblochplotwidget.h
Go to the documentation of this file.
1/**
2 * @file quantumblochplotwidget.h
3 * @brief Declares the quantumblochplotwidget visualization component used by QPE.
4 * @ingroup qpe_graphics
5 *
6 * Source: @c graphics/renderer/quantumblochplotwidget.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
16
17#include <QWidget>
18
19class QPaintEvent;
20
21/**
22 * @brief Qt visualization component for Quantum Bloch Plot Widget.
23 *
24 * The class presents computed state to the user and does not alter the propagated physical state.
25 */
26class QuantumBlochPlotWidget final : public QWidget
27{
28public:
29 /**
30 * @brief Performs quantum bloch plot widget.
31 * @param parent Optional Qt parent object/widget.
32 */
33 explicit QuantumBlochPlotWidget(QWidget *parent = nullptr);
34
35 /**
36 * @brief Sets data.
37 * @param samples The samples value used by the operation.
38 * @param geometry The geometry value used by the operation.
39 * @param initialMomentum The initial momentum value used by the operation.
40 * @param hbar The hbar value used by the operation.
41 */
42 void setData(const std::vector<qpe::ObservablesTimeSeries2DSample> &samples,
43 const qpe::BlochLatticeGeometry2D &geometry,
44 double initialMomentum,
45 double hbar);
46 /**
47 * @brief Performs clear.
48 */
49 void clear();
50
51 /**
52 * @brief Performs minimum size hint.
53 */
54 QSize minimumSizeHint() const override;
55
56protected:
57 /**
58 * @brief Paints event.
59 * @param event Qt event being handled.
60 */
61 void paintEvent(QPaintEvent *event) override;
62
63private:
64 std::vector<qpe::ObservablesTimeSeries2DSample> samples_;
66 double initialMomentum_ = 0.0;
67 double hbar_ = 1.0;
68};
Declares the blochoscillations2d physics/numerical component used by QPE experiments.
Qt visualization component for Quantum Bloch Plot Widget.
std::vector< qpe::ObservablesTimeSeries2DSample > samples_
void paintEvent(QPaintEvent *event) override
Paints event.
void setData(const std::vector< qpe::ObservablesTimeSeries2DSample > &samples, const qpe::BlochLatticeGeometry2D &geometry, double initialMomentum, double hbar)
Sets data.
QuantumBlochPlotWidget(QWidget *parent=nullptr)
Performs quantum bloch plot widget.
QSize minimumSizeHint() const override
Performs minimum size hint.
qpe::BlochLatticeGeometry2D geometry_
Declares the observablestimeseries2d physics/numerical component used by QPE experiments.
Data structure used by the Bloch Lattice Geometry2D component.