Search found 436 matches
- 20 Dec 2019, 02:10
- Forum: Releases
- Topic: Release v0.5.0
- Replies: 0
- Views: 23688
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: 5576
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: 8901
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: 7724
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: 7724
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: 4996
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: 3684
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...
- 14 Nov 2019, 10:13
- Forum: HowTos and FAQ for TeNPy
- Topic: Real-time evolution of the GS of the U=0 Fermi-Hubbard model
- Replies: 5
- Views: 9167
Re: Real-time evolution of the GS of the U=0 Fermi-Hubbard model
Yes, that's for sure a good idea. Indeed, I thought about it and started to implement it already a few days ago, but I'm quite busy these days (moving to UC Berkeley ), so I didn't have time to finish it. Hopefully, I can find a bit time next week - unless you volunteer to time to implement it
- 11 Nov 2019, 16:03
- Forum: Algorithms
- Topic: Canonical form for very small singular values
- Replies: 1
- Views: 13765
Re: Canonical form for very small singular values
One alternative is to iteratively do QR decompositions (and RQ decompositions). You decompose your state as M M M M M = Q R M M M M = Q Q R M M M = ... = Q Q Q Q R and as M M M M M = M M M M R' Q' = M M M R' Q' Q' = ... = R' Q' Q' Q' Q' until your iterations converge. Then your state is in the form ...
- 11 Nov 2019, 15:50
- Forum: HowTos and FAQ for TeNPy
- Topic: Real-time evolution of the GS of the U=0 Fermi-Hubbard model
- Replies: 5
- Views: 9167
Re: Real-time evolution of the GS of the U=0 Fermi-Hubbard model
What order (second or fourth) and timestep do you use for TEBD? Does this go away if you simply use a smaller timestep/higher order? Did you try to look at the overlap with the initial ground state returned by DMRG (as a function of time)? Converging just 3 digits in energy still a bit unprecise, ma...
- 30 Oct 2019, 17:22
- Forum: HowTos and FAQ for TeNPy
- Topic: Entanglement entropy for disconnected subsystems
- Replies: 4
- Views: 5743
Re: Entanglement entropy for disconnected subsystems
Sorry, that was a bug in
MPS.get_rho_segment
. It should be fixed with the latest version.- 29 Oct 2019, 16:45
- Forum: HowTos and FAQ for TeNPy
- Topic: N_sweeps_check & unit cell in infinite dmrg
- Replies: 3
- Views: 4996
Re: N_sweeps_check & unit cell in infinite dmrg
In general, the parameter N_sweeps_check should not change the convergence properties - at least not much.... Let's look at what it influences: For checking the convergence, DMRG checks the average change of the energy / entropy per sweep in the last N_sweeps_check steps. The parameter update_env de...
- 29 Oct 2019, 16:32
- Forum: HowTos and FAQ for TeNPy
- Topic: Entanglement entropy for disconnected subsystems
- Replies: 4
- Views: 5743
Re: Entanglement entropy for disconnected subsystems
The function entanglement_entropy_segment should accept disconnected segments, e.g. segment=[0, 2, 4, 6, 8] . However, it works only for *small* enough number of sites in your density matrix - it's exponentially expensive, because it constructs the full density matrix, tracing out the rest of the si...
- 29 Oct 2019, 16:04
- Forum: HowTos and FAQ for TeNPy
- Topic: Adding a site to a chain perpendicularly
- Replies: 6
- Views: 10298
Re: Adding a site to a chain perpendicularly
Hi, indeed, the irregular lattice is still an open 77 . Sorry, there's so much stuff to do. I had to write and defend my PHD thesis, so I didn't have too much time to work on TeNPy lately. Hopefully, this will change again. ;) To make sure I understand correctly, you want a geometry like this: Boson...
- 15 Oct 2019, 15:15
- Forum: HowTos and FAQ for TeNPy
- Topic: finite open, finite periodic and infinite periodic chains
- Replies: 10
- Views: 13757
Re: finite open, finite periodic and infinite periodic chains
is there a way to have a finite periodic chain (so a ring) for the BoseHubbard model? Kind of. We do not support finite MPS with periodic boundaries for the MPS itself i.e. writing | \Psi\rangle = \sum Tr(A^{\sigma_1} \cdots A^{\sigma_L}) | \sigma_1 \cdots \sigma_L\rangle This is a form which is us...
- 30 Sep 2019, 09:51
- Forum: HowTos and FAQ for TeNPy
- Topic: print msg into file
- Replies: 6
- Views: 10281
Re: print msg into file
I've added the `flush=True` to the print statements during the loops of TEBD and DMRG in ce32fd1fc30073918371717beea110083bab8cd1 On my workstation, the flush causes the output to appear immediately. If you redirect to a file on a network-shared file system, there might be a delay of the change bein...
- 27 Sep 2019, 07:22
- Forum: HowTos and FAQ for TeNPy
- Topic: About four-site coupling terms
- Replies: 2
- Views: 3807
Re: About four-site coupling terms
Welcome! There is a way to add such couplings, namly with add_multi_coupling of the tenpy.models.model.MultiCouplingModel instead of just the add_coupling of the tenpy.models.model.CouplingModel . The tenpy.models.toric_code.ToricCode is an example where this is used. Take a look at this topic for m...
- 26 Sep 2019, 13:02
- Forum: HowTos and FAQ for TeNPy
- Topic: print msg into file
- Replies: 6
- Views: 10281
Re: print msg into file
There's also a option to print().
Code: Select all
flush=True
- 26 Sep 2019, 12:44
- Forum: HowTos and FAQ for TeNPy
- Topic: print msg into file
- Replies: 6
- Views: 10281
Re: print msg into file
Still, there are ways around this. You're describing the problem that the file is "buffered", which Linux/Python does automatically to avoid unnecessary hard disk usage slowing down the execution of the program. However, this can be switched off. For python, try to use the -u option for th...
- 20 Sep 2019, 14:02
- Forum: HowTos and FAQ for TeNPy
- Topic: correlation length in idmrg
- Replies: 1
- Views: 3731
Re: correlation length in idmrg
A such enormous correlation length \xi > 10^10 means that the second eigenvalue of the transfer matrix is 1 up to numerical errors. The reason is that the state you get is a cat state, i.e. a superposition of all |+x \rangle and all |-x \rangle states. See also the discussion in viewtopic.php?f=7&am...
- 13 Sep 2019, 15:30
- Forum: HowTos and FAQ for TeNPy
- Topic: iDMRG is not working properly with next-nearest neighbor complex hopping in the Haldane model
- Replies: 6
- Views: 9699
Re: iDMRG is not working properly with next-nearest neighbor complex hopping in the Haldane model
Welcome Dhiman, and sorry for not answering earlier. You might want to take a look at the tenpy.models.haldane.FermionicHaldaneModel and the tenpy.models.haldane.BosonicHaldaneModel . Both are based on the Hamiltonian from the paper 1407.6985 discussing the fermionic model. As far as I see from a qu...
- 13 Sep 2019, 14:10
- Forum: HowTos and FAQ for TeNPy
- Topic: how to write a three-site interaction?
- Replies: 4
- Views: 33811
Re: how to write a three-site interaction?
Thanks for the clear answer, Umberto
Just as little side node:
The usual convention is to append an underscore in such a case, i.e., use
Just as little side node:
lambda
is a special keyword in python.The usual convention is to append an underscore in such a case, i.e., use
lambda_
instead as a variable name - 13 Sep 2019, 14:05
- Forum: HowTos and FAQ for TeNPy
- Topic: print msg into file
- Replies: 6
- Views: 10281
Re: print msg into file
There are different standard ways to do this (On all computing clusters I know, there is at least an option to do it automatically). Let me point out a few which should suffice your needs: If you start your program from a Linux console, it's very easy: you can use the > at the and of any command to ...
- 13 Sep 2019, 13:15
- Forum: Implementations
- Topic: TEBD for time-dependent Hamiltonians
- Replies: 2
- Views: 18298
Re: TEBD for time-dependent Hamiltonians
Looks like a good thing. Actually, if you update your local repository, you'll find that the code for the FermiHubbardModel has been moved to tenpy.models.hubbard.FermiHubbardModel . There it says for u1, u2, dx in self.lat.nearest_neighbors: self.add_coupling(-t, u1, 'Cdu', u2, 'Cu', dx) self.add_c...
- 07 Aug 2019, 09:33
- Forum: HowTos and FAQ for TeNPy
- Topic: How to assign different hopping parameter 't' to different sites
- Replies: 1
- Views: 3452
Re: How to assign different hopping parameter 't' to different sites
You don't need to modify the unit_cell , if the kind of sites (Fermions with or without spin, Bosons, spins,...) doesn't change. Instead, you can give a hopping parameter t which is not just a single number, but an array, specifying at which site you want hopping with which strength. Take a look at ...