QuanticsTCI package

Hello, does anyone have information about QuanticsTCI and is it possible to apply this package together with ITensor?
I am interested in obtaining ground state wavefunction by using tensor train network.

You can find the TensorCrossInterpolation and QuanticsTCI packages by Marc Ritter at these links:
https://gitlab.com/tensors4fields/TensorCrossInterpolation.jl
https://gitlab.com/tensors4fields/QuanticsTCI.jl
The packages include a function MPS which converts the result of the calculation into an ITensor MPS object.

I would not know how to use TCI to compute a ground state. What is your thinking about that? TCI solves the problem of evaluating a function f(s1,s2,…,sn) at a set of interpolating points and then produces an accurate approximation of this function as an MPS whose site indices are the variables s1,s2,…sn.

To compute a ground state as an MPS or tensor train (which is the same thing as an MPS), the DMRG algorithm is the best choice.

Thank you for your reply and clarification.
Coming back to this discussion Ground state wavefunction
I wanted to use tensor cross interpolation to obtain to obtain the ground state wavefunction for systems with large number of sites (L>100). So I am looking for ways to do this. Is there a package in Julia or Python that does it or is it necessary to write my own code for it?

You cannot use tensor cross interpolation to obtain a ground state wavefunction. Part of what I was clarifying above is that it is not the purpose of that algorithm.

Is there a reason you are not wanting to use DMRG to find a ground state? What is the precise problem that you are trying to solve? E.g. do you have a Hamiltonian or some other starting point?

The reason is that the by using contract(Psi) I could not obtain the whole ground state wavefunction for the systems with L>12. The problem is to calculate the following:

Снимок экрана 2024-04-19 в 13.01.48

I am looking for an algorithm (like tensor cross interpolation) with already implemented code to solve the problem.

I see. So by “obtain” you mean “access the individual amplitudes of the ground state in a given basis”. I thought by obtain you meant obtaining an MPS representation of the ground state.

So yes, I do think TCI could be helpful for computing Sq. Here are the steps I would do:

  1. use DMRG to find the ground state as an MPS
  2. using the following code:
    https://gitlab.com/tensors4fields/TensorCrossInterpolation.jl
  3. create a function which obtains individual amplitudes of your ground state from the MPS individually, using a pattern similar to the one in this code example where the “el” array would be the inputs to the function called by the TCI code
  4. before returning the amplitude a, compute |a|^2 and return that from the function instead
  5. if all goes well, you will now have an MPS which represents |\psi(s)|^2.
  6. now you can use the inner function from ITensor to contract this MPS with itself to obtain the result \sum_s |\psi(s)|^2 |\psi(s)|^2 = \sum_s |\psi(s)|^4 and finally take the log of this number

If that works, it would be a very neat and interesting application of TCI!

Dear Miles,

Thank you for your reply.
I would like to ask you about the step 3. Which function in the TCI code should I use to obtain individual amplitudes of your ground state from the MPS?
I have found the evaluate() function and when I try to use this function with my MPS obtained from ITensors, it gives an error:

import TensorCrossInterpolation as TCI
using ITensors

N = 10
s  = siteinds(2, N)
chi = 4
psi = randomMPS(s; linkdims=chi)

index1 = Index(2, "index1")  
index2 = Index(2, "index2") 
index3 = Index(2, "index3")  
index4 = Index(2, "index4") 
index5 = Index(2, "index5") 
index6 = Index(2, "index6")  
index7 = Index(2, "index7") 
index8 = Index(2, "index8")  
index9 = Index(2, "index9") 
index10 = Index(2, "index10") 
indexspecs = [(index1, 1), (index2, 2), (index3, 1), (index4, 1), (index5, 2), (index6, 1), (index7, 2), (index8, 2), (index9, 2), (index10, 1)]  # el = [1,2,1,1,2,1,2,2,2,1] as in an example in ITensor

state = TCI.evaluate(psi, indexspecs)

MethodError: no method matching evaluate(::MPS, ::Vector{Tuple{Index{Int64}, Int64}})

Is it correct to use MPS obtained by using ITensors in the TCI code?
Also, I have tried to put el = [1,2,1,1,2,1,2,2,2,1] to evaluate(psi, el) but the situation has not changed.

Thank you so much for your time.

Faridun