Search found 18 matches

by Qottmann
27 Dec 2022, 13:52
Forum: HowTos and FAQ for TeNPy
Topic: Expected speedups for Sz or parity conservation in qc simulations
Replies: 2
Views: 10170

Expected speedups for Sz or parity conservation in qc simulations

If I wanted to simulate some quantum computing algorithms using tenpy, can I expect any speedups from using Sz or parity conservation? I know too little of what these actually do. I.e. one would be using `SpinHalfSites` to simulate qubits, and an MPS on a chain to simulate the current state. The alg...
by Qottmann
28 Aug 2021, 10:28
Forum: HowTos and FAQ for TeNPy
Topic: Excited states using tenpy
Replies: 13
Views: 7857

Re: Excited states using tenpy

If the energies of the eigenstates are greater than 0, how do we then find the excited states and their corresponding energies? same question here! Is there an easy way to change shift the Energy of the Hamiltonian by some constant or change the sign of the extra term from the orthogonal_to part? e...
by Qottmann
05 Aug 2021, 16:52
Forum: HowTos and FAQ for TeNPy
Topic: Question about convergence statistics in (i)DMRG
Replies: 2
Views: 1748

Question about convergence statistics in (i)DMRG

Hello, I am a little confused by what the DMRGEngine outputs in the info instance returned from DMRGEngine.run() (like in the dmrg.py example code). I.e. I want to understand what is measured in the bond_statistics and sweep_statistics . I have an example for an iDMRG simulation. On the left I look ...
by Qottmann
22 Sep 2020, 16:34
Forum: HowTos and FAQ for TeNPy
Topic: finite open, finite periodic and infinite periodic chains
Replies: 10
Views: 9145

Re: finite open, finite periodic and infinite periodic chains

This was perfect and super helpful! Thank you so much for the help Johannes, it really is much appreciated! I have one follow-up question. So far it seems to work fine, there is just one thing I am unsure about. With this method the resulting MPS is still finite (obc-style finite), right? I.e. the l...
by Qottmann
02 Sep 2020, 15:24
Forum: HowTos and FAQ for TeNPy
Topic: finite open, finite periodic and infinite periodic chains
Replies: 10
Views: 9145

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? (..) In that way, a nearest neighbor coupling on the ring becomes a next-nearest neighbour coupling for the MPO. I've never tried that out myself with TeNPy, but it is implemented already with the help of the orde...
by Qottmann
17 Jun 2020, 12:59
Forum: HowTos and FAQ for TeNPy
Topic: Superposition of MPS with different total charge
Replies: 4
Views: 4506

Re: Superposition of MPS with different total charge

Thanks for the answer, that helped a lot (as always!) Concerning your question why one would want to do that: I'm trying to compare ground states for a certain filling via chemical potential and via symmetry. In the case of fixing the symmetry we obtained a funny pattern in the entanglement spectrum...
by Qottmann
16 Jun 2020, 14:30
Forum: HowTos and FAQ for TeNPy
Topic: Superposition of MPS with different total charge
Replies: 4
Views: 4506

Superposition of MPS with different total charge

Hi, is there a way to use MPS.add(other,alpha,beta) for two MPS that have different total charge? I guess a brute force workaround would be to obtain the full matrices via get_B() (with all unnecessary 0s) and then create a new "empty" state and set_B(). Is there a direct way? I actually h...
by Qottmann
13 May 2020, 08:06
Forum: HowTos and FAQ for TeNPy
Topic: Square of MPO
Replies: 3
Views: 4338

Re: Square of MPO

Thanks for the quick reply and update!

I actually need it for infinite systems, do you (or anybody else) know of another way to check "how good an eigenstate" the result is other than the variance?
by Qottmann
11 May 2020, 10:43
Forum: HowTos and FAQ for TeNPy
Topic: Square of MPO
Replies: 3
Views: 4338

Square of MPO

Hello, does anybody know an _easy_ way to compute the square of a MPO/model? I want to compute something like (\Delta H)^2 = <H>^2 - <H^2> to check how good an Eigenstate my result is. Defining a new model that is the square of the Hamiltonian by hand seems rather cumbersome (and doesnt lead to a ni...
by Qottmann
14 Oct 2019, 10:19
Forum: HowTos and FAQ for TeNPy
Topic: finite open, finite periodic and infinite periodic chains
Replies: 10
Views: 9145

finite open, finite periodic and infinite periodic chains

Hello, is there a way to have a finite periodic chain (so a ring) for the BoseHubbard model? As far as I understand setting bc_MPS to "finite" gives a finite chain with open boundary conditions and "infinite" is basically performing iDMRG - or am I already getting this part wrong...
by Qottmann
13 Jun 2019, 17:52
Forum: HowTos and FAQ for TeNPy
Topic: norm_tol parameter for DMRG
Replies: 2
Views: 8025

Re: norm_tol parameter for DMRG

Any answer to this?
by Qottmann
08 May 2019, 14:39
Forum: HowTos and FAQ for TeNPy
Topic: Brute force parallel execution / multiprocessing
Replies: 1
Views: 3620

Brute force parallel execution / multiprocessing

Hello again, Disclaimer: I am far from a computer scientist and probably mix and use wrong terminology :D Also, I am not talking about going deep into the implementation like here https://tenpy.johannes-hauschild.de/viewtopic.php?t=4 I have to calculate many independent ground states for different p...
by Qottmann
03 May 2019, 13:47
Forum: HowTos and FAQ for TeNPy
Topic: How to get the data of NPC arrays
Replies: 1
Views: 2591

How to get the data of NPC arrays

Hello again, I sometimes want to look at the actual data of the tensors in an MPS or MPO network, but I am a bit puzzled by the ._data attribute. For example, I want the W tensor of a Bose Hubbard model w/o conservation. I create the model model_params = dict( filling = 1., n_max = 4, t = 1, U = 1, ...
by Qottmann
29 Apr 2019, 15:03
Forum: HowTos and FAQ for TeNPy
Topic: Cython compilation error
Replies: 5
Views: 6127

Re: Cython compilation error

I did not specifically install this compiler, no. I asked our admin to check if gcc is up to date (which it was) but he also updated a bunch of other things and now it is working. I dont know what exactly was the problem (so for future references this thread might be not very helpful) but at least i...
by Qottmann
29 Apr 2019, 12:24
Forum: HowTos and FAQ for TeNPy
Topic: Cython compilation error
Replies: 5
Views: 6127

Re: Cython compilation error

Hello Johannes, thanks again for the answer! On my personal computer on Ubuntu 18 it works fine, the problem here is on a Ubuntu 16 server. When I try to compile your minimal example I get a similar error: (tenpy) kkottmann@pcl1016:~$ cythonize -bi a.pyx Compiling /home/kkottmann/a.pyx because it ch...
by Qottmann
26 Apr 2019, 08:24
Forum: HowTos and FAQ for TeNPy
Topic: Cython compilation error
Replies: 5
Views: 6127

Cython compilation error

Hello, does somebody have an idea what might be the problem here? I tried to compile the cython files but get this error message. I updated cython but the problem remains: :~/TeNPy$ bash ./compile.sh Compiling tenpy/linalg/_npc_helper.pyx because it changed. [1/1] Cythonizing tenpy/linalg/_npc_helpe...
by Qottmann
28 Mar 2019, 17:08
Forum: HowTos and FAQ for TeNPy
Topic: TF Ising Magnetization issues
Replies: 2
Views: 3800

Re: TF Ising Magnetization issues

Thanks for your quick response! For finite `L`, there is a finite size gap such that the true ground state is a superposition of the positive and negative X. Okay, so far so good. But I think I miss the point why I would then compute e.g. M^2 = <\left(\sum_i s_x^i\right)^2> . Or to phrase it differe...
by Qottmann
27 Mar 2019, 16:29
Forum: HowTos and FAQ for TeNPy
Topic: TF Ising Magnetization issues
Replies: 2
Views: 3800

TF Ising Magnetization issues

Hello, I am trying to reproduce the phase diagram of the transverse field Ising Model on a 1d chain. I essentially use the example code in d_examples_dmrg. from tenpy.networks.mps import MPS from tenpy.models.tf_ising import TFIChain from tenpy.algorithms import dmrg def DMRG_finite(L, g,verbose=Fal...