Error when using kroneckerproduct option for GroupedSite
Posted: 26 Jul 2019, 11:31
Hi there,
I'm trying to implement my own model and run TEBD on it with non-nearest neighbour interactions. To do this, I've split my lattice into unit cells of 4 sites, which then are all nearest-neighbour (the sites are hardcore bosons, which I've created by simply removing the JW entries in the FermionSite class, I hope this is correct?)
As such, I need to apply a series of operators using the add_coupling method in the model initialisation. Here is the initialisation of the sites (and the lattice);
where U is the number of unit cells in the lattice (each unit cell containing 4 hardcore boson sites).
I want to try and use add_coupling with operators defined by the kroneckerproduct of the 'C' and 'Cd' operators already defined in the site class. However, when I try to run
I get the error
I'm quite new to TeNPy, so I'm sure that I'm making a silly error, or asking it to do something that it isn't designed to do, but I can't seem to figure out what it is. Please excuse my being a total beginner, any help would be much appreciated.
Kind Regards,
Jack.
I'm trying to implement my own model and run TEBD on it with non-nearest neighbour interactions. To do this, I've split my lattice into unit cells of 4 sites, which then are all nearest-neighbour (the sites are hardcore bosons, which I've created by simply removing the JW entries in the FermionSite class, I hope this is correct?)
As such, I need to apply a series of operators using the add_coupling method in the model initialisation. Here is the initialisation of the sites (and the lattice);
Code: Select all
site = [Hardcore_Boson(conserve='N'), Hardcore_Boson(conserve='N'), Hardcore_Boson(conserve='N'), Hardcore_Boson(conserve='N')]
site2 = GroupedSite(site)
lat = Lattice([U], site, bc='open', bc_MPS='finite')
I want to try and use add_coupling with operators defined by the kroneckerproduct of the 'C' and 'Cd' operators already defined in the site class. However, when I try to run
Code: Select all
C0 = site2.get_op('C0')
Cd1 = site2.get_op('Cd1')
C2 = site2.get_op('C2')
Cd3 = site2.get_op('Cd3')
site2.kroneckerproduct([C0, Cd1, C2, Cd3])
Code: Select all
ValueError: incompatible LegCharge
self | other
LegPipe(shape (2, 2, 2, 2)->16, | +1
qconj (+1, +1, +1, +1)->+1; | 0 [[0]
block numbers (2, 2, 2, 2)->5) | 1 [1]]
+1 | +1 | +1 | +1 | 2
0 [[0] | 0 [[0] | 0 [[0] | 0 [[0] |
1 [1]] | 1 [1]] | 1 [1]] | 1 [1]] |
2 | 2 | 2 | 2 |
)
Kind Regards,
Jack.