Hello,
I have been googling a bit, but I did not find a definite answer to my question.
The “apply” function to my understanding takes care of the JW-string, as well as of swap gates/non-local operators.
But is this also true when using a custom local Hilbert space?
In my case I want to use:
using ITensors
import ITensors: op
function ITensors.space(::SiteType"Lindblad"; conserve_qns=false, spin)
if conserve_qns
return [QN((“N”, 0), (“Sz”, 0spin)) => 1, QN((“N”, 1), (“Sz”, 1spin)) => 1,
QN((“N”, 1), (“Sz”, 1spin)) => 1, QN((“N”, 2), (“Sz”, 2spin)) => 1]
end
return 4
end
op(::OpName"N", ::SiteType"Lindblad") = [
0 0 0 0
0 1 0 0
0 0 0 0
0 0 0 1
]
op(::OpName"N_til", ::SiteType"Lindblad") = [
0 0 0 0
0 0 0 0
0 0 1 0
0 0 0 1
]
op(::OpName"N_tot", ::SiteType"Lindblad") = [
0 0 0 0
0 1 0 0
0 0 1 0
0 0 0 2
]
op(::OpName"C", ::SiteType"Lindblad") = [
0 1 0 0
0 0 0 0
0 0 0 1
0 0 0 0
]
op(::OpName"Cdag", ::SiteType"Lindblad") = [
0 0 0 0
1 0 0 0
0 0 0 0
0 0 1 0
]
op(::OpName"C_til", ::SiteType"Lindblad") = [
0 0 1 0
0 0 0 -1
0 0 0 0
0 0 0 0
]
op(::OpName"Cdag_til", ::SiteType"Lindblad") = [
0 0 0 0
0 0 0 0
1 0 0 0
0 -1 0 0
]
op(::OpName"F", ::SiteType"Lindblad") = [
1 0 0 0
0 -1 0 0
0 0 -1 0
0 0 0 1
]
Where each site allows for a “normal” and a “tilde” particle (|00>, |01>, |10>, |11>). So when applying c^dag_i c_i+1 or c^tild^dag_i c^tild_i+1 does “apply” know how to take care of the JW string? And if i use a non-local operator does it know how to swap correctly?
Also related to this → As you may notice I added a sign when applying the tilde creation/annihilation operator whenever the “normal” particle is also present, because i have to pass through this operator, but also here I am not sure if it is taken into account automatically maybe?