Search found 428 matches
- 02 Dec 2020, 21:00
- Forum: HowTos and FAQ for TeNPy
- Topic: Symmetries Of lattice
- Replies: 10
- Views: 7378
Re: Symmetries Of lattice
Sorry for the late reply; your post was displayed on another page that I didn't see. To see how you can use Sz conservation, take a look at the implementation of the tenpy.models.xxz_chain.XXZChain2 The lines self.add_coupling(Jxx * 0.5, u1, 'Sp', u2, 'Sm', dx, plus_hc=True) self.add_coupling(Jz, u1...
- 01 Dec 2020, 09:36
- Forum: HowTos and FAQ for TeNPy
- Topic: Entanglement spectrum by charge (specifically for iDMRG)
- Replies: 4
- Views: 4185
Re: Entanglement spectrum by charge (specifically for iDMRG)
Wow, I'm even mentioned in the acknowledgement
Thanks for coming back on this! It's great to see what people can do with TeNPy.
I've right away updated the list of papers citing TeNPy, your paper is now included
Thanks for coming back on this! It's great to see what people can do with TeNPy.
I've right away updated the list of papers citing TeNPy, your paper is now included
- 26 Nov 2020, 11:38
- Forum: HowTos and FAQ for TeNPy
- Topic: Initial CAT state
- Replies: 5
- Views: 6180
Re: Initial CAT state
Given that you talked about charges, I'll assume that you try to conserve the total Sz spin. In this case, the all-up state and the Neel state are in completely different sectors, and you can not add them up in a single MPS! Instead, you can and should run DMRG independently in each of these sectors...
- 26 Nov 2020, 10:44
- Forum: HowTos and FAQ for TeNPy
- Topic: Initial CAT state
- Replies: 5
- Views: 6180
Re: Initial CAT state
There is a reason that MPS.add doesn't support adding states of infinite MPS: usually, you really want to avoid writing infinte MPS cat states. I would advice against using it as an initial state for iDMRG... If you do that, you just try to find two ground states at the same time. DMRG should at som...
- 26 Nov 2020, 07:37
- Forum: HowTos and FAQ for TeNPy
- Topic: Initial CAT state
- Replies: 5
- Views: 6180
Re: Initial CAT state
Hi Pasa, from_product_state and from_singlets call that function in the end. The source code of from_Bflat might serve as an example. The first argument really is just a list of the B tensor that make up the MPS, in the form of numpy arrays. The topic title indicates that you want to write a cat sta...
- 18 Nov 2020, 21:37
- Forum: HowTos and FAQ for TeNPy
- Topic: Qn on muti-sites DMRG
- Replies: 3
- Views: 2996
Re: Qn on muti-sites DMRG
DMRG scales with (at least) the third power of the local dimension. Using a GroupedSite forces the local dimension to 2^3 = 8, so you can expect a very significant speedup of roughly \frac{8^3}{3\cdot 2^3} when switching to separate sites. To implement it, simply use a lattice with a non-trivial uni...
- 18 Nov 2020, 07:54
- Forum: HowTos and FAQ for TeNPy
- Topic: Lattice with different spins
- Replies: 3
- Views: 2775
Re: Lattice with different spins
Sure! just add the extra site into the unit cell. Since there are already two sites in the unit cell, it will get the unit-cell index 2, so you can specify the new added site to be [1, 1, 2] instead of [1, 1, 1] . You can do the whole process in a single step: irregular_lat = lattice.IrregularLattic...
- 08 Nov 2020, 14:20
- Forum: HowTos and FAQ for TeNPy
- Topic: Qn on muti-sites DMRG
- Replies: 3
- Views: 2996
Re: Qn on muti-sites DMRG
Let me get this straight: you initialize the state without c electrons and DMRG to keep the number of c electrons at 0, because you have no hopping terms to c (by explicitly setting t2 and t3 to 0). However, you have only two globally conserved charges: the total number of electrons, and the total s...
- 04 Nov 2020, 12:49
- Forum: HowTos and FAQ for TeNPy
- Topic: state overlap(probability)
- Replies: 11
- Views: 9034
Re: state overlap(probability)
You need to transpose at the right position, namely before you start grouping/reshaping the legs. psi.get_rho_segment([i,j]) returns a 4-leg tensor with labels ('p0', 'p1', 'p0*', 'p1*') for (ket left, ket right, bra left, bra right). Grouping the legs will give you two legs '(p0.p1)', '(p0*.p1*)' ,...
- 04 Nov 2020, 08:34
- Forum: HowTos and FAQ for TeNPy
- Topic: Lattice with different spins
- Replies: 3
- Views: 2775
Re: Lattice with different spins
The tenpy.models.lattice.IrregularLattice is doing exactly what you want. The idea is that you first generate the regular lattice (in your case a Honeycomb lattice) and then add/replace the extra site(s) for the Spin-1. If you want to conserve e.g. the total Sz, or the Sz of the spin-1/2 sites, you ...
- 02 Nov 2020, 09:48
- Forum: HowTos and FAQ for TeNPy
- Topic: state overlap(probability)
- Replies: 11
- Views: 9034
Re: state overlap(probability)
You have indices i,j, so I guess you're looking at two-site density matrices now. It works the same way, though: rho_ij = psi.get_rho_segment([i,j]) rho_ij_dense = rho_ij.transpose(['p0', 'p1', 'p0*', 'p1*']).to_ndarray() # has shape (2, 2, 2, 2) assert psi.sites[i].state_labels['up'] == 0 # ensure ...
- 26 Oct 2020, 16:59
- Forum: HowTos and FAQ for TeNPy
- Topic: state overlap(probability)
- Replies: 11
- Views: 9034
Re: state overlap(probability)
1.) rho_i.to_ndarray() , if you really want to convert to a numpy array. 2) There is not a unique such value, because the density matrix is mixed . Work it out for a 2-spin system: the probability for the second spin to be down is P(\sigma_2 = \downarrow) = \Psi_{\uparrow\downarrow}\Psi_{\uparrow\do...
- 26 Oct 2020, 09:21
- Forum: HowTos and FAQ for TeNPy
- Topic: state overlap(probability)
- Replies: 11
- Views: 9034
Re: state overlap(probability)
Sure! Basically, what you want is P(\sigma_i=\downarrow_i) = \langle \Psi | \downarrow_i\rangle \langle \downarrow_i |\Psi \rangle = Tr_{\mathcal{H}}(|\Psi\rangle \langle \Psi | \downarrow_i\rangle \langle \downarrow_i |) = Tr_{\mathcal{H}_i}(\rho_i |\downarrow_i\rangle \langle \downarrow_i |) = \la...
- 21 Oct 2020, 18:00
- Forum: HowTos and FAQ for TeNPy
- Topic: Symmetries Of lattice
- Replies: 10
- Views: 7378
Re: Symmetries Of lattice
The all-up state which you start with is an *exact* eigenstate of the Heisenberg model (both the ferro-magnetic and anti-ferromagnetic one), and indeed it's the ground state (or one of them, to be precise) for the FM J=-1 case. The reason why you still go away is a bug: you're missing the Y-Y term i...
- 21 Oct 2020, 16:01
- Forum: HowTos and FAQ for TeNPy
- Topic: Symmetries Of lattice
- Replies: 10
- Views: 7378
Re: Symmetries Of lattice
Just to make sure, you really look at the Ferromagnetic Heisenberg model, and not the transverse field Ising model, right? Why do you preserve the parity, but not Sz? To clarify: the "parity" is not the same as "spin flip symmetric". The conserved "parity" is (sum_i Z_i...
- 21 Oct 2020, 12:55
- Forum: Implementations
- Topic: Implementing non on-site symmetries
- Replies: 3
- Views: 13832
Re: Implementing non on-site symmetries
Yeah, kind of what I was expecting from what I know you've been working on...
- 21 Oct 2020, 11:11
- Forum: Implementations
- Topic: Implementing non on-site symmetries
- Replies: 3
- Views: 13832
Re: Implementing non on-site symmetries
Ugh, that's a really tough one! First of all: Is it really necessary to do the mapping from fermions to bosons, or couldn't you maybe directly implement the fermionic model instead? (I'd guess not, but just to make sure...) My first reaction definitely is "That's impossible". TeNPy's np_co...
- 20 Oct 2020, 19:13
- Forum: HowTos and FAQ for TeNPy
- Topic: Symmetries Of lattice
- Replies: 10
- Views: 7378
Re: Symmetries Of lattice
The Ground state of the ferromagnetic Heisenberg model is degenerate, and I guess that you might get different states depending on whether you turn on parity conservation. The different ground states have different entanglement. What start did you start with? It fixes the charge sector you remain in...
- 13 Oct 2020, 14:49
- Forum: HowTos and FAQ for TeNPy
- Topic: Symmetries Of lattice
- Replies: 10
- Views: 7378
Re: Symmetries Of lattice
As far as I know, exploiting translation symmetry or other symmetries of the lattice is not possible. There is only the trick which was pointed out in the source code of entanglement_entropy_segment before. I've implemented in 61be6397b0fedb066199bf24e948a6f6f702f6c6 today to give entanglement_entro...
- 12 Oct 2020, 10:30
- Forum: Releases
- Topic: Release v0.7.2
- Replies: 0
- Views: 57193
Release v0.7.2
Another rather minor release. We've added a list of all papers using TeNPy to the documentation. Feel free to include your own works! And a slight simplicifation, which might affect your code: using the MultiCouplingModel is no longer necessary, just use the tenpy.models.model.CouplingModel directly...
- 23 Sep 2020, 08:21
- Forum: HowTos and FAQ for TeNPy
- Topic: finite open, finite periodic and infinite periodic chains
- Replies: 10
- Views: 11173
Re: finite open, finite periodic and infinite periodic chains
Yes, the MPS is still finite and OBC-style bc_MPS='finite' , with vectors at the boundary. It's just that the couplings in the MPO are topolically equivalent to a ring, as you drew it in your picture. Using the "default" order wouldn't change this, you would still need to define the MPS to...
- 22 Sep 2020, 07:39
- Forum: HowTos and FAQ for TeNPy
- Topic: Bond dimension is not increasing
- Replies: 1
- Views: 2186
Re: Bond dimension is not increasing
You set n_max=1, i.e. you consider hard-core bosons with at most 1 particle per site, and the model has particle number conservation. The product state from which you initialize is completely filled with one particle per site, such that the hopping term can't contribute - it would create one hole an...
- 21 Sep 2020, 14:43
- Forum: HowTos and FAQ for TeNPy
- Topic: New to tenpy
- Replies: 2
- Views: 2913
Re: New to tenpy
Take a look at the overview and readthe other "introductions". You want to use the tenpy.models.hubbard.FermiHubbardModel with the tenpy.models.lattice.Ladder (for the other ladders, implement your own "Lattice" class as described in the various introductions). The t,U,L are mode...
- 21 Sep 2020, 12:55
- Forum: Releases
- Topic: Release v0.7.0 and v0.7.1
- Replies: 0
- Views: 14845
Release v0.7.0 and v0.7.1
Version 0.7.0 and 0.7.1 have been released about 2 weeks ago and are available from pip and conda. Before updating , please read at least the section incompatible changes of the changelog. The highlight of the changes is the new support for time evolution with the W_{II} method for approximating the...
- 21 Sep 2020, 10:14
- Forum: HowTos and FAQ for TeNPy
- Topic: Loschmidt Echo
- Replies: 2
- Views: 2660
Re: Loschmidt Echo
Welcome! The MPS which you pass to the TEBDEngine gets modified in place (because we want to avoid unnecessary copies of MPS in case they are large). In other words, psi_0 and eng.epsi are the same MPS (namely the time evolved one). The solution is to make a copy of the MPS at some point, e.g. psi_0...