difference of @planar and @tensor for fermionic tensors?
Closed this issue · 2 comments
Dear Jutho:
I want to write my quantum chemistry DMRG based on TensorKit. I notice that using @planar and @tensor on fermionic tensors could lead to different results. Is there any documentation for the motivation of using @planar for fermionic tensor networks, or when is it necessary to using @planar for fermionic tensor networks?
Hi Gouchu,
There are some subtleties involved with working with fermionic tensors, which can be dealt with in several different ways, which are reflected by the use of the different macros. Let me first advertise MPSKit.jl, which already has a full implementation of DMRG for fermionic tensors, so might just be what you are looking for. Nevertheless, let me also try to elaborate to give an idea of what's causing the problems, and hint at how these things are overcome.
Basically, contracting fermionic tensors consists of two components. The first part is the ability to reorder the indices of a tensor, which picks up minus signs according to the well-known rule
The second part is where things become a little more subtle. When contracting tensors, it is natural to start from something like
One possibility is to also define this as equal to
Alternatively, you can define the inner product to include a twist
calls into the tensors.
We are working on adding some more clarification on this topic to the documentation and writing up some manuscript for it, but this work is still in progress. In any case, I hope this might give you some idea of why these two macros exist, and what causes the results to be different.
Hi lkdvos:
Thanks a lot for you prompt reply! I roughly understand the second solution but not the first one. Looking forward to you paper and documentation for this !