@@ -52,7 +52,7 @@ dyn_control_params::dyn_control_params(){
5252 do_ssy = 0 ;
5353 do_phase_correction = 1 ;
5454 phase_correction_tol = 1e-3 ;
55- state_tracking_algo = 2 ;
55+ state_tracking_algo = - 1 ;
5656 MK_alpha = 0.0 ;
5757 MK_verbosity = 0 ;
5858 convergence = 0 ;
@@ -79,10 +79,14 @@ dyn_control_params::dyn_control_params(){
7979 collapse_option = 0 ;
8080 decoherence_rates = NULL ;
8181 ave_gaps = NULL ;
82- wp_width = 0.1 ;
82+ wp_width = NULL ;
83+ wp_v = NULL ;
8384 coherence_threshold = 0.01 ;
85+ e_mask = 0.0001 ;
8486 use_xf_force = 0 ;
8587 project_out_aux = 0 ;
88+ tp_algo = 1 ;
89+ use_td_width = 0 ;
8690
8791 // /================= Entanglement of trajectories ================================
8892 entanglement_opt = 0 ;
@@ -104,6 +108,7 @@ dyn_control_params::dyn_control_params(){
104108 dt = 41.0 ;
105109 num_electronic_substeps = 1 ;
106110 electronic_integrator = 0 ;
111+ ampl_transformation_method = 1 ;
107112 assume_always_consistent = 0 ;
108113
109114 thermally_corrected_nbra = 0 ;
@@ -158,10 +163,17 @@ dyn_control_params::dyn_control_params(const dyn_control_params& x){
158163 dephasing_informed = x.dephasing_informed ;
159164 instantaneous_decoherence_variant = x.instantaneous_decoherence_variant ;
160165 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 ;
162171 coherence_threshold = x.coherence_threshold ;
172+ e_mask = x.e_mask ;
163173 use_xf_force = x.use_xf_force ;
164174 project_out_aux = x.project_out_aux ;
175+ tp_algo = x.tp_algo ;
176+ use_td_width = x.use_td_width ;
165177
166178 // /================= Entanglement of trajectories ================================
167179 entanglement_opt = x.entanglement_opt ;
@@ -184,6 +196,7 @@ dyn_control_params::dyn_control_params(const dyn_control_params& x){
184196 dt = x.dt ;
185197 num_electronic_substeps = x.num_electronic_substeps ;
186198 electronic_integrator = x.electronic_integrator ;
199+ ampl_transformation_method = x.ampl_transformation_method ;
187200 assume_always_consistent = x. assume_always_consistent;
188201
189202 decoherence_rates = new MATRIX (x.decoherence_rates ->n_rows , x.decoherence_rates ->n_cols );
@@ -206,6 +219,8 @@ dyn_control_params::~dyn_control_params() {
206219
207220 // cout<<"dyn_control_params destructor\n";
208221
222+ delete wp_width;
223+ delete wp_v;
209224 delete decoherence_rates;
210225 delete ave_gaps;
211226 delete schwartz_decoherence_inv_alpha;
@@ -215,7 +230,8 @@ dyn_control_params::~dyn_control_params() {
215230void dyn_control_params::sanity_check (){
216231
217232 // /=================== 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 ||
219235 state_tracking_algo==2 || state_tracking_algo==3 ||
220236 state_tracking_algo==32 || state_tracking_algo==33 ){ ; ; }
221237 else {
@@ -343,10 +359,26 @@ void dyn_control_params::set_parameters(bp::dict params){
343359 for (int b=0 ;b<x.n_cols ;b++){ ave_gaps->set (a, b, x.get (a,b)); }
344360 }
345361 }
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+ }
347376 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]); }
348378 else if (key==" use_xf_force" ){ use_xf_force = bp::extract<int >(params.values ()[i]); }
349379 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]); }
350382
351383 // /================= Entanglement of trajectories ================================
352384 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){
378410 else if (key==" dt" ) { dt = bp::extract<double >(params.values ()[i]); }
379411 else if (key==" num_electronic_substeps" ) { num_electronic_substeps = bp::extract<int >(params.values ()[i]); }
380412 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]); }
381414 else if (key==" assume_always_consistent" ){ assume_always_consistent = bp::extract<int >(params.values ()[i]); }
382415
383416 else if (key==" thermally_corrected_nbra" ){ thermally_corrected_nbra = bp::extract<int >(params.values ()[i]); }
0 commit comments