Search found 429 matches
- 23 Mar 2020, 23:40
- Forum: HowTos and FAQ for TeNPy
- Topic: Adding disorders and adding a site to 1D SSH chain
- Replies: 2
- Views: 28871
Re: Adding disorders and adding a site to 1D SSH chain
You want to simulate it on a finite system, right? The SSH chain is just a regular chain with alternating coupling strength. Given that, I think it might be easier in this case to really use the "Chain" with a single-site unit cell instead of a Lattice with a two-site unit cell. In particu...
- 23 Mar 2020, 18:41
- Forum: HowTos and FAQ for TeNPy
- Topic: 2D DMRG with boundary conditions and lattice index
- Replies: 2
- Views: 4677
Re: 2D DMRG with boundary conditions and lattice index
(1): Looks good to me. In fact, that's code taken from CouplingMPOModel.init_lattice() for the case of a 2D lattice. (2): Yes. You might want to take a look at mps2lat_values in that case. Use it like this: exp_vals_mps = psi.expectation_value("N") exp_vals_lat = model.lat.mps2lat_values(e...
- 11 Mar 2020, 16:36
- Forum: Algorithms
- Topic: Kinetic energy
- Replies: 3
- Views: 19570
Re: Kinetic energy
I think the question aims at how to get the terms contained in the kinetic energy. Actually, there's some functionality in the tenpy.models.model.CouplingModel , which is not explicitly used in most of the pre-defined models, though, and a bit hidden in the documentation. When one calls add_coupling...
- 11 Mar 2020, 05:12
- Forum: HowTos and FAQ for TeNPy
- Topic: leading eigenvector of transfer matrix
- Replies: 6
- Views: 11752
Re: leading eigenvector of transfer matrix
You cannot/should not take the transfer matrix of a single site, if you have a two-site unit cell in your MPS. Sometimes, the charge values will not even allow you, and even if they do, it there is a different gauge on the two bonds - which can and will be the case if there are degenerate singular v...
- 11 Mar 2020, 04:10
- Forum: HowTos and FAQ for TeNPy
- Topic: leading eigenvector of transfer matrix
- Replies: 6
- Views: 11752
Re: leading eigenvector of transfer matrix
BTW, in this sense, the normalization factors of the left (to square singular value) and right eigenvector (identity) of right canonical form should cancel each other out, right? However, in a real case it seems will change the largest amplitude of the transfer matrix (the largest eigenvalue will b...
- 10 Mar 2020, 23:23
- Forum: HowTos and FAQ for TeNPy
- Topic: leading eigenvector of transfer matrix
- Replies: 6
- Views: 11752
Re: leading eigenvector of transfer matrix
It's just a matter of normalization.
Eigenvalues get normalized to
At the end of your code, add
and compare the results, the prints should give the same
Eigenvalues get normalized to
np.linalg.norm(v) = 1
, but in this case you want np.sum(v) = 1
.At the end of your code, add
Code: Select all
vdiag = v.diagonal()
print(vdiag/np.sum(vdiag))
print(psi.get_SL(0)**2)
- 05 Mar 2020, 00:02
- Forum: HowTos and FAQ for TeNPy
- Topic: Semi-infinite Ising chain with boundary
- Replies: 1
- Views: 5072
Re: Semi-infinite Ising chain with boundary
That's an excellent question! TeNPy supports 'segment' boundary conditions, which you can basically use to do that. What we had in mind for those boundary conditions is the folling: Run DMRG in an infinite system Extract or "cut out" a subsystem with a finite length from it, giving you an ...
- 07 Feb 2020, 08:18
- Forum: Implementations
- Topic: Readthedocs vs Github pages
- Replies: 4
- Views: 24246
Re: Readthedocs vs Github pages
Okay, I paid for the Gold membership of readthedocs to remove the ads (That's the drawback, it costs money. But I don't mind supporting ReadTheDocs with a few dollars a month, their service to the community is great :) ) I've also updated the references from within the TeNPy repository and the links...
- 07 Feb 2020, 06:14
- Forum: HowTos and FAQ for TeNPy
- Topic: Problems with modelling a fermionic ladder
- Replies: 3
- Views: 5244
Re: Problems with modelling a fermionic ladder
Now I face the problem that in order to see the Ising-like phase transition I want to calculate the correlation function <\Psi_0 |T^y_i T^y_{i+r} |\Psi_0> with T^y_i= \frac{1}{2}(-i c^\dagger_{i,u}c_{i,d}+i c^\dagger_{i,d}c_{i,u}) where u and d are again the rungs of the ladder. Since the Ladder ge...
- 05 Feb 2020, 08:00
- Forum: HowTos and FAQ for TeNPy
- Topic: How to calculate particular correlation function only between the nearest neighbors sites in my lattice?
- Replies: 4
- Views: 7196
Re: How to calculate particular correlation function only between the nearest neighbors sites in my lattice?
Looks good! May I ask how for an example what you calculated in the end (roughly)? It probably suffices for terms with the same operators on both sites (e.g. density-density correlations "N_i N_j"), but might not be enough for more complicated pair correlations with different operators (e....
- 05 Feb 2020, 07:50
- Forum: HowTos and FAQ for TeNPy
- Topic: Problems with modelling a fermionic ladder
- Replies: 3
- Views: 5244
Re: Problems with modelling a fermionic ladder
You got it almost right. Just a single, but crucial typo in term 1.2 (which you correctly identified as the problem): In the second line (h.c. term), you have a 0 instead of a 1 in the fourth argument. This makes the Hamiltonian non-hermitian and obviously leads to problems when running DMRG (The La...
- 01 Feb 2020, 00:11
- Forum: HowTos and FAQ for TeNPy
- Topic: Convergence issues in XXZ model with increasing bond dimension
- Replies: 3
- Views: 5680
Re: Convergence issues in XXZ model with increasing bond dimension
No, you got that wrong. A value of update_env=0 does not imply that you're not doing iDMRG; the DMRG engine will still grow the environments on the left and right by one unit cell in each sweep. A nonzero update_env > 0 tells the DMRG engine to do the specified number of environment_sweeps without d...
- 30 Jan 2020, 21:55
- Forum: Implementations
- Topic: Readthedocs vs Github pages
- Replies: 4
- Views: 24246
Re: Readthedocs vs Github pages
[mention]Leon[/mention], [mention]mpsforphysics[/mention] , [mention]JakobUnfried[/mention] do you have any preferences?
- 30 Jan 2020, 21:43
- Forum: HowTos and FAQ for TeNPy
- Topic: How to calculate particular correlation function only between the nearest neighbors sites in my lattice?
- Replies: 4
- Views: 7196
Re: How to calculate particular correlation function only between the nearest neighbors sites in my lattice?
You need to do some postprocessing, there is currently no function for that in TeNPy. However, I agree that it would be very useful to have it. If you write the function, it would be great if you could post it here such that we can include it in TeNPy (or you just submit a pull request on github). Y...
- 30 Jan 2020, 07:34
- Forum: HowTos and FAQ for TeNPy
- Topic: Convergence issues in XXZ model with increasing bond dimension
- Replies: 3
- Views: 5680
Re: Convergence issues in XXZ model with increasing bond dimension
The model is gapless in the range -1 < V < 1, so this is definitely a difficult region. As far as I know, VUMPS might indeed be better suited for that, feel free to implement it ;-) Which version of tenpy are you using? In particular, does your version include the fix of 95 (v0.5.0 or later)? The is...
- 20 Dec 2019, 03:27
- Forum: HowTos and FAQ for TeNPy
- Topic: Problems with creating multi-site coupling on a chain.
- Replies: 1
- Views: 3853
Re: Problems with creating multi-site coupling on a chain.
By definition, a tenpy.models.model.NearestNeighborModel can only contain nearest-neighbor couplings. That is the case because it provides a representation of the hamiltonian in terms of H_bond , where each H_bond is a term involving just two neighboring sites. Hence, you can *not* make a model inhe...
- 20 Dec 2019, 02:41
- Forum: Implementations
- Topic: Readthedocs vs Github pages
- Replies: 4
- Views: 24246
Re: Readthedocs vs Github pages
Readthedocs currently includes advertisement, but we could opt-out of that.
- 20 Dec 2019, 02:31
- Forum: Implementations
- Topic: Readthedocs vs Github pages
- Replies: 4
- Views: 24246
Readthedocs vs Github pages
Hi all, so far, I had hosted the documentation on https://tenpy.github.io with github pages. I have now tried to setup the documentation on https://tenpy.readthedocs.io as well, which is an awesome place hosting documentation for many, many python packages (and other stuff as well). The nice thing t...
- 20 Dec 2019, 02:10
- Forum: Releases
- Topic: Release v0.5.0
- Replies: 0
- Views: 22832
Release v0.5.0
Version 0.5.0 has been released. Before updating , please read the corresponding section in the change log , in particular the part on the backwards incompatible changes! It is now supported to install TeNPy with pip via pip install --upgrade physics-tenpy # for 'stable' versions I'd recommend an in...
- 18 Dec 2019, 22:16
- Forum: HowTos and FAQ for TeNPy
- Topic: Running own model yields ModuleNotFoundError
- Replies: 2
- Views: 4594
Re: Running own model yields ModuleNotFoundError
Welcome! I think the problem depends on how you installed tenpy. Did you pip install physics-tenpy , or did you download the code and use inline]python setup.py install[/inline] from within the TeNPy folder, or did you simply set export PYTHONPATH=/Users/username/TeNPy" ? In the latter case, it...
- 08 Dec 2019, 17:44
- Forum: HowTos and FAQ for TeNPy
- Topic: Preparing state with specified particle filling
- Replies: 4
- Views: 8273
Re: Preparing state with specified particle filling
If you run the code with conserve='N' , you should get a UserWarning tenpy/networks/mps.py:396: UserWarning: flat array has non-zero entries in blocks incompatible with charge B = npc.Array.from_ndarray(B, legs, dtype) The reason is that for conserve='N' , each tensor needs to have a well defined ch...
- 05 Dec 2019, 23:09
- Forum: HowTos and FAQ for TeNPy
- Topic: Constructing a product state of rotated spins
- Replies: 5
- Views: 6513
Re: Constructing a product state of rotated spins
You're absolutely right, the different type of "Site" makes the difference here.
That's certainly a thing to keep in mind, so I actually added your example (slightly extended) to the documentation of from_product_state.
Do you agree that it is more clear now?
That's certainly a thing to keep in mind, so I actually added your example (slightly extended) to the documentation of from_product_state.
Do you agree that it is more clear now?
- 03 Dec 2019, 21:31
- Forum: HowTos and FAQ for TeNPy
- Topic: Constructing a product state of rotated spins
- Replies: 5
- Views: 6513
Re: Constructing a product state of rotated spins
Yes, that is indeed what you want. Just for reference, here is the documentation: from_product_state . If you look at the example, one line below the state is normalized, such that it gets np.array([1/sqrt(2), -1/sqrt(2)]) . This is the negative-x state of a spin-1/2 and equivalent to the np.array([...
- 26 Nov 2019, 19:27
- Forum: HowTos and FAQ for TeNPy
- Topic: N_sweeps_check & unit cell in infinite dmrg
- Replies: 3
- Views: 4474
Re: N_sweeps_check & unit cell in infinite dmrg
So, is it fine to miss S? or is it typo? That should be fine, it's just the difference between checking the absolute and the relative error. For the energy, we need to check the relative error: the energy scale can vary by quite a bit simply by rescaling your Hamiltonian. However, the entropy can n...
- 25 Nov 2019, 17:29
- Forum: HowTos and FAQ for TeNPy
- Topic: XXZChain antiferromagnet showing no entanglement?
- Replies: 1
- Views: 3286
Re: XXZChain antiferromagnet showing no entanglement?
The all-up state is an exact eigenstate of the model and hence won't evolve in time, in particular if you use Sz-conservation (which you do in this case): the all-up state is the only state in the sector with S_{total} = L/2 . Try starting from a different state, e.g. all up but one spin down (which...