@@ -82,9 +82,8 @@ function sweep_printer(
8282end
8383
8484function applyexp (
85- operator:: AbstractITensorNetwork ,
86- exponents,
87- init_state:: AbstractITensorNetwork ;
85+ init_prob:: AbstractProblem ,
86+ exponents;
8887 extract_kwargs= (;),
8988 update_kwargs= (;),
9089 insert_kwargs= (;),
@@ -93,11 +92,6 @@ function applyexp(
9392 order= 4 ,
9493 kws... ,
9594)
96- init_prob = ApplyExpProblem (;
97- state= align_indices (init_state),
98- operator= ProjTTN (align_indices (operator)),
99- current_exponent= first (exponents),
100- )
10195 exponent_steps = diff ([zero (eltype (exponents)); exponents])
10296 sweep_kws = (; outputlevel, extract_kwargs, insert_kwargs, nsites, order, update_kwargs)
10397 kws_array = [(; sweep_kws... , time_step= t) for t in exponent_steps]
@@ -106,6 +100,15 @@ function applyexp(
106100 return state (converged_prob)
107101end
108102
103+ function applyexp (operator, exponents, init_state; kws... )
104+ init_prob = ApplyExpProblem (;
105+ state= align_indices (init_state),
106+ operator= ProjTTN (align_indices (operator)),
107+ current_exponent= first (exponents),
108+ )
109+ return applyexp (init_prob, exponents; kws... )
110+ end
111+
109112process_real_times (z) = iszero (abs (z)) ? 0.0 : round (- imag (z); digits= 10 )
110113
111114function time_evolve (
0 commit comments