I am trying to do quadratic constrained binary optimization using a custom MPS which supports multiple quantum numbers at each site corresponding to the constraints. The implementation I’m trying to replicate can be found in arxiv: 2211.09121. In this paper the authors used a DMRG inspired algorithm called constrained-GEO to do the optimization. Before getting my hands dirty and actually trying the full implementation that was suggested in the paper, I am trying to see if ITensor’s DMRG can be used here. First I would like to know if there is any way to supply an MPS with arbitrary quantum number definition such as the following to the dmrg function:
i = Index([QN("Number",1) => 2, QN("Number",2) => 3], "Qudit,Site,n=1")
j = Index([QN("Number",1) => 2, QN("Number",2) => 3], "Qudit,Site,n=2")
k = Index([QN("Number",3) => 1, QN("Number",2) => 1], "flux")
A = randomITensor(i, j, dag(k))
sites = [i,j]
psi0 = MPS(A,sites)
This produces the following MPS:
MPS
[1] ((dim=5|id=255|"Qudit,Site,n=1") <Out>
1: QN("Number",1) => 2
2: QN("Number",2) => 3, (dim=4|id=824|"Link,n=1") <In>
1: QN("Number",2) => 2
2: QN("Number",1) => 2)
[2] ((dim=5|id=387|"Qudit,Site,n=2") <Out>
1: QN("Number",1) => 2
2: QN("Number",2) => 3, (dim=2|id=660|"flux") <In>
1: QN("Number",3) => 1
2: QN("Number",2) => 1, (dim=4|id=824|"Link,n=1") <Out>
1: QN("Number",2) => 2
2: QN("Number",1) => 2)
Putting this MPS directly into DMRG obviously doesn’t work because of the extra non-zero flux index. I’m assuming the most natural contraction for the flux index of the bra is with the flux index of the ket while taking the expectation value of the Hamiltonian.
Secondly, I would also like to know the difference between the following two index syntaxes:
i = Index([QN("N1",1) => 1, QN("N2",0) => 1], "Qudit,Site,n=1")
and
i = Index([QN(("N1",1),("N2",0)) => 1], "Qudit,Site,n=1")
I am trying to encode constraints into site quantum numbers as was done within the paper I referred before but I’m kind of not sure how exactly to do that. Ideally what I want is to create an MPS which has site charges given by some matrix A\in\mathbb{Z}^{m\times N} satisfying,
where x\in \{0,1\}^m is the site occupancy number and \vec{b}\in\mathbb{Z}^m is the flux.