Xped
Loading...
Searching...
No Matches
TimePropagator.hpp
Go to the documentation of this file.
1#ifndef XPED_TIME_PROPAGATOR_H_
2#define XPED_TIME_PROPAGATOR_H_
3
4#include <memory>
5
9#include "Xped/PEPS/iPEPS.hpp"
10
11namespace Xped {
12
13namespace Opts {
14
15enum class GATE_ORDER
16{
17 HDV,
18 VDH
19};
20
21}
22
23template <typename Scalar_, typename TimeScalar_, typename Symmetry_>
25{
26public:
27 using Scalar = Scalar_;
28 using TimeScalar = TimeScalar_;
29 using Symmetry = Symmetry_;
30
31 TimePropagator() = delete;
32
34 TimeScalar dt_in,
35 const Opts::Update& update_in,
36 const TMatrix<typename Symmetry::qType>& charges_in)
37 : H(H_in)
38 , cell_(H_in.data_h.pat)
39 , dt(dt_in)
40 , update(update_in)
41 , charges(charges_in)
42 {
43 initU();
44 spectrum_h.resize(cell_.pattern);
45 spectrum_v.resize(cell_.pattern);
46 }
47
49
52
53private:
55 UnitCell cell_;
56 TimeScalar dt;
57 Opts::Update update;
59
63
64 void t_step_h(iPEPS<Scalar, Symmetry>& Psi, int x, int y);
65 void t_step_v(iPEPS<Scalar, Symmetry>& Psi, int x, int y);
66
67 void t_step_d1(iPEPS<Scalar, Symmetry>& Psi, int x, int y, Opts::GATE_ORDER gate_order, bool UPDATE_BOTH_DIAGONALS = false);
68 void t_step_d2(iPEPS<Scalar, Symmetry>& Psi, int x, int y, Opts::GATE_ORDER gate_order, bool UPDATE_BOTH_DIAGONALS = false);
69
70 std::tuple<Tensor<Scalar, 2, 1, Symmetry>, Tensor<Scalar, 1, 1, Symmetry>, Tensor<Scalar, 1, 2, Symmetry>>
71 renormalize(const Tensor<Scalar, 2, 2, Symmetry>& bond,
74 std::size_t max_keep) const;
75
76 std::tuple<Tensor<Scalar, 2, 1, Symmetry>,
81 renormalize_d1(const Tensor<Scalar, 2, 5, Symmetry>& bond, std::size_t max_keep) const;
82
83 std::tuple<Tensor<Scalar, 1, 2, Symmetry>,
88 renormalize_d2(const Tensor<Scalar, 2, 5, Symmetry>& bond, std::size_t max_keep) const;
89
90 void initU();
91};
92
93} // namespace Xped
94
95#ifndef XPED_COMPILED_LIB
97#endif
98
99#endif
Definition: Tensor.hpp:40
Definition: TimePropagator.hpp:25
void t_step(iPEPS< Scalar, Symmetry > &Psi)
Definition: TimePropagator.cpp:8
Symmetry_ Symmetry
Definition: TimePropagator.hpp:29
TMatrix< Tensor< Scalar, 1, 1, Symmetry > > spectrum_h
Definition: TimePropagator.hpp:50
Scalar_ Scalar
Definition: TimePropagator.hpp:27
TimePropagator(const TwoSiteObservable< double, Symmetry > &H_in, TimeScalar dt_in, const Opts::Update &update_in, const TMatrix< typename Symmetry::qType > &charges_in)
Definition: TimePropagator.hpp:33
TMatrix< Tensor< Scalar, 1, 1, Symmetry > > spectrum_v
Definition: TimePropagator.hpp:51
TimeScalar_ TimeScalar
Definition: TimePropagator.hpp:28
Definition: iPEPS.hpp:39
GATE_ORDER
Definition: TimePropagator.hpp:16
Definition: bench.cpp:62
Definition: TMatrix.hpp:13
Definition: TwoSiteObservable.hpp:22
Definition: UnitCell.hpp:15
Pattern pattern
Definition: UnitCell.hpp:27