Search found 428 matches
- 05 Nov 2018, 19:52
- Forum: Implementations
- Topic: Lattice design issue
- Replies: 4
- Views: 16800
Re: Lattice design issue
I've updated the main repository with quite some changes in the models, so let me comment on this once more. Making the jungle of classes even worse, I've added two more classes: a common base Model and the CouplingMPOModel . Moreover, I've update most of the models in TeNPy to use this new Coupling...
- 25 Oct 2018, 19:45
- Forum: HowTos and FAQ for TeNPy
- Topic: Extracting matrix elements of exp(-dt*H_bond)
- Replies: 5
- Views: 8129
Re: Extracting matrix elements of exp(-dt*H_bond)
Yes, I understood that, so probably I wasn't clear enough. Let me try again by writing code: U_bond = eng._U[0][i] # this is the np_conserved Array representing exp(-dt* H_bond) on bond (i-1, i) U_bond[0, 0, 0, 0] # the entry corresponding to spin up on each site U_bond_np = U_bond.to_ndarray() # co...
- 25 Oct 2018, 08:28
- Forum: HowTos and FAQ for TeNPy
- Topic: Extracting matrix elements of exp(-dt*H_bond)
- Replies: 5
- Views: 8129
Re: Extracting matrix elements of exp(-dt*H_bond)
You can just directly read out the coefficients of an np_conserved Array A in the same way as for a numpy Array, for example A[0, 1] will give you a float, if A is a matrix with 2 indices. Even slices are supported, e.g. for A[:, 2] the result will be a np_conserved Array of dimension 1. If you pref...
- 19 Oct 2018, 15:09
- Forum: Implementations
- Topic: Multi-Site Expectation Value
- Replies: 6
- Views: 21219
Re: Multi-Site Expectation Value
It takes multiple onsite operators acting on n neighboring sites. To do that with MPS.expecation_value(), you need to generate a full n-site operator before by Hand, which becomes impossible for n > 15. This function contracts in a different order than the MPS.expectation_value(), so it stays "...
- 18 Oct 2018, 09:05
- Forum: HowTos and FAQ for TeNPy
- Topic: Implementing 'new' models
- Replies: 7
- Views: 9843
Re: Implementing 'new' models
It seemed not to be that hard after all, following your suggestions. That's what I hoped :) ... and the results completely disagree with those I got from the simple iTEBD code for the preceding ref. ... And that shouldn't happen :? Do you need to truncate strongly? Is there symmetry breaking? Or a ...
- 17 Oct 2018, 08:04
- Forum: HowTos and FAQ for TeNPy
- Topic: Implementing 'new' models
- Replies: 7
- Views: 9843
Re: Implementing 'new' models
Oh oh :o But there's a simple solution: update your TeNPy source to the newest version with a git pull (and if necessary, compile the np_conserved parts again). Since we are still in the 0.XX version numbers, I allowed myself to do a few backwards incompatible change(s). Moving the "bc" ke...
- 16 Oct 2018, 16:21
- Forum: HowTos and FAQ for TeNPy
- Topic: Implementing 'new' models
- Replies: 7
- Views: 9843
Re: Implementing 'new' models
All of tenpy (DMRG etc) uses the np_conserved module for tensors, as this is necessary for implementing symmetries. The basic idea is that the `Array` defined there has a very similar interface as numpy arrays, instead of numpy.tensordot(...) you can just use np_conserved.tensordot(...) etc. Our `Ar...
- 16 Oct 2018, 13:31
- Forum: HowTos and FAQ for TeNPy
- Topic: Implementing 'new' models
- Replies: 7
- Views: 9843
Re: Implementing 'new' models
This is exactly the place where you're supposed to ask these questions ;-) I know that the documentation of each function and class is a bit overwhelming in the beginning, and it's hard to get an overview. Some more introductory notes are in the userguide section of the tenpy documentation, for you ...
- 16 Oct 2018, 13:01
- Forum: HowTos and FAQ for TeNPy
- Topic: MPS that is both conserved and in a superposition
- Replies: 4
- Views: 34346
Re: MPS that is both conserved and in a superposition
So this is the state |0...01....1> which has a fixed, well defined particle number L//2, and can be initialized with MPS.from_product_state(). This is a highly non-uniform state, with particles only on the right half. Instead, I would highly recommend to use a more uniform initial state |1010101...>...
- 11 Oct 2018, 10:14
- Forum: Implementations
- Topic: MultiCouplingModel and Toric Code as example
- Replies: 7
- Views: 23056
Re: MultiCouplingModel and Toric Code as example
I checked explicitly, that the Hamiltonian is correct for Lx=1, Ly=3 by multipliying out the MPO matrices. I get the terms X_0 X_6 X_7 X_{11} + X_2 X_7 X_8 X_9 + X_4 X_9 X_{10} X_{11} + Z_0 Z_1 Z_2 Z_7 + Z_2 Z_3 Z_4 Z_9 + Z_0 Z_4 Z_5 Z_{11} starting in the MPS unit cell of sites 0-5, which is exactl...
- 09 Oct 2018, 22:47
- Forum: HowTos and FAQ for TeNPy
- Topic: About calculating the momentum for entanglement spectrum
- Replies: 4
- Views: 21065
Re: About calculating the momentum for entanglement spectrum
What is the value of the "ov" returned by compute_K()? Is your DMRG converged well? Do you maybe expect/have symmetry breaking? An entanglement entropy of 3.3 at some bonds is already quite large, did you choose the bond dimension large enough that you are fairly converged and have accepta...
- 09 Oct 2018, 22:34
- Forum: HowTos and FAQ for TeNPy
- Topic: MPS that is both conserved and in a superposition
- Replies: 4
- Views: 34346
Re: MPS that is both conserved and in a superposition
As a side note for future readers : The question makes more sense if you ask for doing a real-time evolution instead of DMRG. Formally, one can decompose the state as |psi> = \sum_n c_n |psi_n\rangle where |\psi_n\rangle is a state with well defined partice number n. Evolving each of theses states s...
- 09 Oct 2018, 22:15
- Forum: HowTos and FAQ for TeNPy
- Topic: MPS that is both conserved and in a superposition
- Replies: 4
- Views: 34346
Re: MPS that is both conserved and in a superposition
I'm not sure I understand what you want to do. Charge conservation can be used when your Hamiltonian commutes with the (total) particle number operator, which is the case for the usual Bose Hubbard model. In other words, the Hamiltonian is block-diagonal with a block consisting of the subspace with ...
- 02 Oct 2018, 14:50
- Forum: HowTos and FAQ for TeNPy
- Topic: About calculating the momentum for entanglement spectrum
- Replies: 4
- Views: 21065
Re: About calculating the momentum for entanglement spectrum
Thanks for pointing that out, Leon! Looks like this forum was a good idea :) I've added your reference [2] to the documentation of compute_K(), in particular the appendix in the arXiv version of the paper has some very nice figures and explanations. (It will take one night until you see it in the on...
- 01 Oct 2018, 16:40
- Forum: Implementations
- Topic: Lattice design issue
- Replies: 4
- Views: 16800
Re: Lattice design issue
In response to the pull request #10 and to continue with this thread: I completely agree that it's stupid to define each model multiple times. Using the trick above I got it down to two classes - one for a Chain derived from the NearestNeigborModel and once for generic 2D lattices (which include qua...
- 02 Sep 2018, 21:09
- Forum: Implementations
- Topic: Lattice design issue
- Replies: 4
- Views: 16800
Re: Lattice design issue
I followed your suggestions and moved the boundary conditions completely into the lattice, thanks for bringing that up! As a side remark: I still distinguish the "lattice" boundary conditions bc strictly from the bc_MPS . This is necessary since somebody might want to consider a finite MPS...
- 31 Aug 2018, 10:08
- Forum: Implementations
- Topic: Parallel iDMRG with mpi4py
- Replies: 6
- Views: 19829
Re: Parallel iDMRG with mpi4py
I dunno which version is better or of any direct comparisons :-). It could be interesting to do that, but I guess they converge equivalent. The Ueda approach reminds me on a block decimation approach like TEBD. This helps me to understand what is going on during the simulation better, e.g. it takes...
- 31 Aug 2018, 09:50
- Forum: Implementations
- Topic: Parallel iDMRG with mpi4py
- Replies: 6
- Views: 19829
Re: Parallel iDMRG with mpi4py
Am I right that one has to reload preloaded modules like numpy/scipy after setting the number of threads or is there any other way to do that? I don't think you need to reload scipy or numpy. It's still the same library, using the same underlying MKL, it's just a sinlge parameter, which can be chan...
- 30 Aug 2018, 12:43
- Forum: Implementations
- Topic: Parallel iDMRG with mpi4py
- Replies: 6
- Views: 19829
Re: Parallel iDMRG with mpi4py
Hi Mirco, I see, so they are basically the same in the limit of half as many nodes as sites. I wonder whether the full parallelization of Ueda's approach requires more or less iterations/sweeps to reach convergence. As far as I see, compared to the sweeping it needs more (two-site) updates to carry ...
- 29 Aug 2018, 10:09
- Forum: Implementations
- Topic: Parallel iDMRG with mpi4py
- Replies: 6
- Views: 19829
Re: Parallel iDMRG with mpi4py
Hey Mirco, parallelization of DMRG is a great idea which will probably benefit many people! Using mpi4py seems a good idea to me. As you said, it's included in the intel python distribution, and also in the anaconda distribution - these two are the recommended ones in the installation instructions, ...
- 29 Aug 2018, 09:15
- Forum: HowTos and FAQ for TeNPy
- Topic: Different coupling terms on different sites
- Replies: 5
- Views: 10454
Re: Different coupling terms on different sites
As we are contracting the entire MPS to calculate for energy, is my understanding correct in saying that it does not matter which site we choose in this case? Yes, that's correct! Based on what I understand, iDMRG can still be calculated for such a system but the only way to obtain the energy is di...
- 28 Aug 2018, 15:50
- Forum: HowTos and FAQ for TeNPy
- Topic: Different coupling terms on different sites
- Replies: 5
- Views: 10454
Re: Different coupling terms on different sites
Taking the energy as returned by the DMRG code is a perfectly reasonable thing ;-) And it's what I would recommend you for now. In general, you could still try to get the energy from local expectation values and/or correlation functions, but you would need to carefully figure all the terms out and s...
- 27 Aug 2018, 15:04
- Forum: Implementations
- Topic: Lattice design issue
- Replies: 4
- Views: 16800
Re: Lattice design issue
On one hand I agree that this would be very cool to have an single "TFIModel" with some specified nearest neighbor couplings. On the other hand, I see some problems with that: When you only want to derive the Model from the MPOModel, this approach is fine, but what if you want to derive fr...
- 27 Aug 2018, 13:11
- Forum: Implementations
- Topic: MultiCouplingModel and Toric Code as example
- Replies: 7
- Views: 23056
Re: MultiCouplingModel and Toric Code as example
ok, which initial state and parameters are you using? Mixer enabled? I checked with the following code import numpy as np from tenpy.models.toric_code import ToricCode from tenpy.networks.mps import MPS from tenpy.algorithms import dmrg for Lx in [1, 2, 3, 4]: print("="*80) print("Lx ...
- 27 Aug 2018, 11:22
- Forum: Implementations
- Topic: MultiCouplingModel and Toric Code as example
- Replies: 7
- Views: 23056
Re: MultiCouplingModel and Toric Code as example
You're right, L_x is just the number of "rings" of the cylinder included into the MPS unit cell. I agree that the energy per site shouldn't depend on L_x, so it's a bad sign if it does, there's probably something wrong then ![Sad :(](./images/smilies/icon_e_sad.gif)
![Sad :(](./images/smilies/icon_e_sad.gif)