Hi, I want to add a term into my mpo using the AutoMPO function, and the term is a matrix multiplied by a S=\frac{1}{2} operator. Specifically, in my code I include it as:
for (int j=1;j<N;j++){
mpo += matrix,"Sx",j;
}
and the matrix I want to put in can be site dependent or site independent. I’ve gone through the relevant tutorials and I read that the AutoMPO function only takes in real or complex values as the prefactors, and not a matrix. So when I try to build my project, I encounter an error in the Accumulator class in AutoMPO
no known conversion for argument 2 from ‘std::array<std::array<double, 2>, 2>’ to ‘itensor::Real’ {aka ‘double’}
Can I know what is the best way I can achieve this? Any help would be greatly appreciated! Thanks!
Ben is correct that this input is not supported. But it makes me want to ask @zomal : what was your goal, mathematically speaking, that led you to want to input a matrix as a coefficient? What would a matrix-valued coefficient mean and what sort of output did you want or expect?
Thanks @corbett5 , how can I go about making a matrix of MPOs using ITensor? I cant seem to find any tutorial for that, or maybe I missed it.
Thanks @miles , the model I am using has g tensors terms like
\Sigma_i \; g_u \hat{S_{i}}
Im new to using this model and also actually ITensor and AutoMPO, so I wasnt sure of the best way to deal with this. If you have another idea, Im open to hear them of course!
Thanks for the extra info, but that’s still not enough information for me to know why you would need a coefficient to be a matrix. Is g_u a matrix? If so, what does that mean mathematically and what vector space does it live in / act on?
Hi @miles , thanks for the help, and sorry for the delay. Actually I realized I made a mistake and do not in fact need a matrix prefactor. Your question of what it means mathematically has led me to realizing that. Thanks so much again!