Consider I have a Hamiltonian(H(t)) which is time-dependent. I want to find the time evolution of a wave function which has the initial condition that is the ground state(\psi(0)) of the Hamiltonian(H(0)). How do I find \psi(t)?

For this, I need to solve the first-order differential equation, which is the Schrodinger equation. Most of the examples in using ITensor I found for time-independent Hamiltonian. I found a way in ITensor discourse to do this using trotter gate, but it is not helping me as in my case my Hamiltonian is for bosonic sites with particle number conserved has onsite interaction term like a_i^{\dagger}a_i^{\dagger}a_ia_i or n_i(n_i-1). So now I use `op`

whenever I try to write

((1.0 / 2.0) * U_ONSITE) * op(sites, “Adag”, i) * op(sites, “Adag”, i) * op(sites, “A”, i) * op(sites, “A”, i);

or

((1.0 / 2.0) * U_ONSITE) * op(sites, “N”, i) * op(sites, “N”, i);

problem arises like

From line 912, file itensor.cc

Mismatched QN Index arrows

Mismatched QN Index arrows

Aborted (core dumped)

I also tried my code with TDVP, but it also did not work for me as in each iteration I need to update my H(t), and there appears to be an index mismatch in global sub-space expansion.

I just want to know if there exists any way both in CPP or Julia (I would prefer CPP, but I can write my code in Julia if I can solve my problem there) that I can solve this kind of problem. Like in ED it can be very easily done using odeint in Python, where I just pass Hamiltonian as a function of time and initial condition, and it will do all the jobs. TDVP looks similar, but I failed to do it for time-dependent Hamiltonian. I will be very much thankful as well as helpful if you can suggest and guide me on a way to find the time evolution that I want. For information ultimately I need to find an expectation value of an observable \langle\psi|J|\psi\rangle(t), which I can do I hope if I am able to find the time evolution of \psi(t) according to Schrodinger equation of time-dependent Hamiltonian.