@@ -52,7 +52,7 @@ dyn_control_params::dyn_control_params(){
52
52
do_ssy = 0 ;
53
53
do_phase_correction = 1 ;
54
54
phase_correction_tol = 1e-3 ;
55
- state_tracking_algo = 2 ;
55
+ state_tracking_algo = - 1 ;
56
56
MK_alpha = 0.0 ;
57
57
MK_verbosity = 0 ;
58
58
convergence = 0 ;
@@ -79,10 +79,14 @@ dyn_control_params::dyn_control_params(){
79
79
collapse_option = 0 ;
80
80
decoherence_rates = NULL ;
81
81
ave_gaps = NULL ;
82
- wp_width = 0.1 ;
82
+ wp_width = NULL ;
83
+ wp_v = NULL ;
83
84
coherence_threshold = 0.01 ;
85
+ e_mask = 0.0001 ;
84
86
use_xf_force = 0 ;
85
87
project_out_aux = 0 ;
88
+ tp_algo = 1 ;
89
+ use_td_width = 0 ;
86
90
87
91
// /================= Entanglement of trajectories ================================
88
92
entanglement_opt = 0 ;
@@ -104,6 +108,7 @@ dyn_control_params::dyn_control_params(){
104
108
dt = 41.0 ;
105
109
num_electronic_substeps = 1 ;
106
110
electronic_integrator = 0 ;
111
+ ampl_transformation_method = 1 ;
107
112
assume_always_consistent = 0 ;
108
113
109
114
thermally_corrected_nbra = 0 ;
@@ -158,10 +163,17 @@ dyn_control_params::dyn_control_params(const dyn_control_params& x){
158
163
dephasing_informed = x.dephasing_informed ;
159
164
instantaneous_decoherence_variant = x.instantaneous_decoherence_variant ;
160
165
collapse_option = x.collapse_option ;
161
- wp_width = x.wp_width ;
166
+
167
+ wp_width = new MATRIX ( x.wp_width ->n_rows , x.wp_width ->n_cols );
168
+ *wp_width = *x.wp_width ;
169
+ wp_v = new MATRIX ( x.wp_v ->n_rows , x.wp_v ->n_cols );
170
+ *wp_v = *x.wp_v ;
162
171
coherence_threshold = x.coherence_threshold ;
172
+ e_mask = x.e_mask ;
163
173
use_xf_force = x.use_xf_force ;
164
174
project_out_aux = x.project_out_aux ;
175
+ tp_algo = x.tp_algo ;
176
+ use_td_width = x.use_td_width ;
165
177
166
178
// /================= Entanglement of trajectories ================================
167
179
entanglement_opt = x.entanglement_opt ;
@@ -184,6 +196,7 @@ dyn_control_params::dyn_control_params(const dyn_control_params& x){
184
196
dt = x.dt ;
185
197
num_electronic_substeps = x.num_electronic_substeps ;
186
198
electronic_integrator = x.electronic_integrator ;
199
+ ampl_transformation_method = x.ampl_transformation_method ;
187
200
assume_always_consistent = x. assume_always_consistent;
188
201
189
202
decoherence_rates = new MATRIX (x.decoherence_rates ->n_rows , x.decoherence_rates ->n_cols );
@@ -206,6 +219,8 @@ dyn_control_params::~dyn_control_params() {
206
219
207
220
// cout<<"dyn_control_params destructor\n";
208
221
222
+ delete wp_width;
223
+ delete wp_v;
209
224
delete decoherence_rates;
210
225
delete ave_gaps;
211
226
delete schwartz_decoherence_inv_alpha;
@@ -215,7 +230,8 @@ dyn_control_params::~dyn_control_params() {
215
230
void dyn_control_params::sanity_check (){
216
231
217
232
// /=================== Options for state tracking ======================
218
- if (state_tracking_algo==0 || state_tracking_algo==1 ||
233
+ if (state_tracking_algo==-1 ||
234
+ state_tracking_algo==0 || state_tracking_algo==1 ||
219
235
state_tracking_algo==2 || state_tracking_algo==3 ||
220
236
state_tracking_algo==32 || state_tracking_algo==33 ){ ; ; }
221
237
else {
@@ -343,10 +359,26 @@ void dyn_control_params::set_parameters(bp::dict params){
343
359
for (int b=0 ;b<x.n_cols ;b++){ ave_gaps->set (a, b, x.get (a,b)); }
344
360
}
345
361
}
346
- else if (key==" wp_width" ){ wp_width = bp::extract<double >(params.values ()[i]); }
362
+ else if (key==" wp_width" ){
363
+ MATRIX x ( bp::extract<MATRIX>(params.values ()[i]) );
364
+ wp_width = new MATRIX (x.n_rows , x.n_cols );
365
+ for (int a=0 ;a<x.n_rows ;a++){
366
+ for (int b=0 ;b<x.n_cols ;b++){ wp_width->set (a, b, x.get (a,b)); }
367
+ }
368
+ }
369
+ else if (key==" wp_v" ){
370
+ MATRIX x ( bp::extract<MATRIX>(params.values ()[i]) );
371
+ wp_v = new MATRIX (x.n_rows , x.n_cols );
372
+ for (int a=0 ;a<x.n_rows ;a++){
373
+ for (int b=0 ;b<x.n_cols ;b++){ wp_v->set (a, b, x.get (a,b)); }
374
+ }
375
+ }
347
376
else if (key==" coherence_threshold" ){ coherence_threshold = bp::extract<double >(params.values ()[i]); }
377
+ else if (key==" e_mask" ){ e_mask = bp::extract<double >(params.values ()[i]); }
348
378
else if (key==" use_xf_force" ){ use_xf_force = bp::extract<int >(params.values ()[i]); }
349
379
else if (key==" project_out_aux" ){ project_out_aux = bp::extract<int >(params.values ()[i]); }
380
+ else if (key==" tp_algo" ){ tp_algo = bp::extract<int >(params.values ()[i]); }
381
+ else if (key==" use_td_width" ){ use_td_width = bp::extract<int >(params.values ()[i]); }
350
382
351
383
// /================= Entanglement of trajectories ================================
352
384
else if (key==" entanglement_opt" ){ entanglement_opt = bp::extract<int >(params.values ()[i]); }
@@ -378,6 +410,7 @@ void dyn_control_params::set_parameters(bp::dict params){
378
410
else if (key==" dt" ) { dt = bp::extract<double >(params.values ()[i]); }
379
411
else if (key==" num_electronic_substeps" ) { num_electronic_substeps = bp::extract<int >(params.values ()[i]); }
380
412
else if (key==" electronic_integrator" ){ electronic_integrator = bp::extract<int >(params.values ()[i]); }
413
+ else if (key==" ampl_transformation_method" ){ ampl_transformation_method = bp::extract<int >(params.values ()[i]); }
381
414
else if (key==" assume_always_consistent" ){ assume_always_consistent = bp::extract<int >(params.values ()[i]); }
382
415
383
416
else if (key==" thermally_corrected_nbra" ){ thermally_corrected_nbra = bp::extract<int >(params.values ()[i]); }
0 commit comments