RealTimeTransport 1.0.0
Real-time simulation of quantum transport processes
Loading...
Searching...
No Matches
ResonantLevel.h
Go to the documentation of this file.
1//
2// This Source Code Form is subject to the terms of the Mozilla Public
3// License, v. 2.0. If a copy of the MPL was not distributed with this
4// file, You can obtain one at https://mozilla.org/MPL/2.0/.
5//
6
7///
8/// \file ResonantLevel.h
9///
10/// \brief Implements a spinless level without spin.
11///
12
13#ifndef REAL_TIME_TRANSPORT_RESONANT_LEVEL_H
14#define REAL_TIME_TRANSPORT_RESONANT_LEVEL_H
15
16#include "../Model.h"
17
18#include <cereal/archives/binary.hpp>
19#include <cereal/archives/json.hpp>
20#include <cereal/archives/portable_binary.hpp>
21#include <cereal/types/polymorphic.hpp>
22
23#include <SciCore/Definitions.h>
24#include <SciCore/Serialization.h>
25
26namespace RealTimeTransport
27{
28
29///
30/// @ingroup Models
31///
32/// @brief Implements a single level without spin.
33///
34/// This class implements a single spinless level.
35/// The Hamiltonian is given by
36/// \f[
37/// H = \epsilon n,
38/// \f]
39/// where \f$ n=d^\dagger d \f$. It is coupled to the reservoirs via the tunneling Hamiltonian
40/// \f[
41/// H_T = \sum_{r} \int d\omega \sqrt{\frac{\Gamma_{r}}{2\pi}} (d^\dagger a_{r}(\omega) + a^\dagger_{r}(\omega) d).
42/// \f]
43/// All operators are represented in the basis \f$ \ket{0}, \ket{1} \f$.
44///
45class REALTIMETRANSPORT_EXPORT ResonantLevel final : public Model
46{
47 public:
48 /// @brief Default constructor.
49 ResonantLevel() noexcept = default;
50
51 /// @brief Default move constructor.
52 ResonantLevel(ResonantLevel&& other) noexcept = default;
53
54 /// @brief Default copy constructor.
55 ResonantLevel(const ResonantLevel& other) = default;
56
57 /// @brief Default move assignment operator.
58 ResonantLevel& operator=(ResonantLevel&& other) noexcept = default;
59
60 /// @brief Default copy assignment operator.
61 ResonantLevel& operator=(const ResonantLevel& other) = default;
62
63 ///
64 /// @brief Constructs a new ResonantLevel object.
65 ///
66 /// @param epsilon Level energy
67 /// @param T Temperature reservoirs
68 /// @param mu Chemical potentials reservoirs
69 /// @param Gamma Dot-reservoir coupling
70 ///
72 SciCore::Real epsilon,
73 const SciCore::RealVector& T,
74 const SciCore::RealVector& mu,
75 const SciCore::RealVector& Gamma);
76
77 ///
78 /// @brief Returns the energy of the level.
79 ///
80 SciCore::Real epsilon() const noexcept;
81
82 ///
83 /// @brief The Hilbert space dimension is 2 (empty and full state).
84 ///
85 int dimHilbertSpace() const noexcept override;
86
87 ///
88 /// @brief Only one single particle state.
89 ///
90 int numStates() const noexcept override;
91
92 ///
93 /// @brief Reservoirs are not spinful, thus returns 1.
94 ///
95 int numChannels() const noexcept override;
96
97 ///
98 /// @brief Returns the number of reservoirs the system is connected to.
99 ///
100 int numReservoirs() const override;
101
102 ///
103 /// @brief Returns the Hamiltonian.
104 ///
105 OperatorType H() const override;
106
107 ///
108 /// @brief Returns the annihilation operator. \f$l\f$ is always 0.
109 ///
110 OperatorType d(int l) const override;
111
112 ///
113 /// @brief Returns the coupling coefficient in the tunneling Hamiltonian. Both \f$\nu\f$ and \f$l\f$ are always 0.
114 ///
115 SciCore::Complex coupling(int r, int nu, int l) const override;
116
117 const SciCore::RealVector& temperatures() const noexcept override;
118 const SciCore::RealVector& chemicalPotentials() const noexcept override;
119
120 SupervectorType vectorize(const OperatorType& op) const override;
122 const std::vector<int>& blockDimensions() const noexcept override;
123
124 std::unique_ptr<Model> copy() const override;
125
126 bool isEqual(const Model& other) const override;
127
128 template <class Archive>
129 void serialize(Archive& archive)
130 {
131 archive(_epsilon, _temperatures, _chemicalPotentials, _gamma);
132 }
133
134 private:
135 SciCore::Real _epsilon = 0.0;
136 SciCore::RealVector _temperatures;
137 SciCore::RealVector _chemicalPotentials;
138 SciCore::RealVector _gamma;
139
140 static const std::vector<int> _blockDimensions;
141};
142
143} // namespace RealTimeTransport
144
145CEREAL_REGISTER_TYPE(RealTimeTransport::ResonantLevel)
146CEREAL_REGISTER_POLYMORPHIC_RELATION(RealTimeTransport::Model, RealTimeTransport::ResonantLevel)
147
148#endif // REAL_TIME_TRANSPORT_RESONANT_LEVEL_H
#define REALTIMETRANSPORT_EXPORT
Definition RealTimeTransport_export.h:15
Abstract class representing a model.
Definition Model.h:47
int dimHilbertSpace() const noexcept override
The Hilbert space dimension is 2 (empty and full state).
SupervectorType vectorize(const OperatorType &op) const override
Vectorizes an operator into its supervector form.
SciCore::Real epsilon() const noexcept
Returns the energy of the level.
ResonantLevel() noexcept=default
Default constructor.
const std::vector< int > & blockDimensions() const noexcept override
The memory kernel and propagator are block diagonal. This function returns a reference to a vector co...
int numReservoirs() const override
Returns the number of reservoirs the system is connected to.
ResonantLevel(const ResonantLevel &other)=default
Default copy constructor.
ResonantLevel & operator=(ResonantLevel &&other) noexcept=default
Default move assignment operator.
bool isEqual(const Model &other) const override
Returns true if other is the same as *this, otherwise false.
ResonantLevel & operator=(const ResonantLevel &other)=default
Default copy assignment operator.
OperatorType H() const override
Returns the Hamiltonian.
const SciCore::RealVector & chemicalPotentials() const noexcept override
Returns the chemical potentials of the reservoirs the system is connected to.
OperatorType operatorize(const SupervectorType &supervector) const override
Transforms a supervector back into operator form.
SciCore::Complex coupling(int r, int nu, int l) const override
Returns the coupling coefficient in the tunneling Hamiltonian. Both and are always 0.
std::unique_ptr< Model > copy() const override
Returns a deep copy of the model.
int numStates() const noexcept override
Only one single particle state.
const SciCore::RealVector & temperatures() const noexcept override
Returns the temperatures of the reservoirs the system is connected to.
ResonantLevel(SciCore::Real epsilon, const SciCore::RealVector &T, const SciCore::RealVector &mu, const SciCore::RealVector &Gamma)
Constructs a new ResonantLevel object.
ResonantLevel(ResonantLevel &&other) noexcept=default
Default move constructor.
int numChannels() const noexcept override
Reservoirs are not spinful, thus returns 1.
OperatorType d(int l) const override
Returns the annihilation operator. is always 0.