@@ -962,12 +962,15 @@ module TestAlgorithms
962962 Z_dense_2 = tr (exp (- 2 beta * H_dense))^ (1 / L)
963963
964964 # taylor cluster
965- rho_taylor_1 = make_time_mpo (H, - im * beta, TaylorCluster (; N = 2 ))
965+ rho_taylor_1 = make_time_mpo (H, beta, TaylorCluster (; N = 2 ); imaginary_evolution = true )
966966 Z_taylor_1 = tr (rho_taylor_1)^ (1 / L)
967967 @test Z_taylor_1 ≈ Z_dense_1 atol = 1.0e-2
968968 Z_taylor_2 = real (dot (rho_taylor_1, rho_taylor_1))^ (1 / L)
969969 @test Z_taylor_2 ≈ Z_dense_2 atol = 1.0e-2
970970
971+ E_x_taylor = @constinferred expectation_value (rho_taylor_1, 1 => S_x ())
972+ E_xx_taylor = @constinferred expectation_value (rho_taylor_1, (1 , 2 ) => S_xx ())
973+
971974 # MPO multiplication
972975 rho_mps = convert (FiniteMPS, rho_taylor_1)
973976 rho_mps, = approximate (rho_mps, (rho_taylor_1, rho_mps), DMRG2 (; trscheme, verbosity))
@@ -977,9 +980,14 @@ module TestAlgorithms
977980 # TDVP
978981 rho_0 = MPSKit. infinite_temperature_density_matrix (H)
979982 rho_0_mps = convert (FiniteMPS, rho_0)
980- rho_mps, = timestep (rho_0_mps, H, 0.0 , im * beta, TDVP2 (; trscheme))
983+ rho_mps, = timestep (rho_0_mps, H, 0.0 , beta, TDVP2 (; trscheme); imaginary_evolution = true )
981984 Z_tdvp = real (dot (rho_mps, rho_mps))^ (1 / L)
982985 @test Z_tdvp ≈ Z_dense_2 atol = 1.0e-2
986+
987+ @test expectation_value (rho_0_mps, 1 => S_x ()) ≈ 0
988+ @test expectation_value (rho_0_mps, (1 , 2 ) => S_xx ()) ≈ 0
989+ @test expectation_value (rho_mps, 1 => S_x ()) ≈ E_x_taylor atol = 1.0e-2
990+ @test expectation_value (rho_mps, (1 , 2 ) => S_xx ()) ≈ E_xx_taylor atol = 1.0e-2
983991 end
984992
985993 @testset " Sector conventions" begin
0 commit comments