Search found 6 matches
- 30 Jan 2025, 16:00
- Forum: HowTos and FAQ for TeNPy
- Topic: Ordering of exact diagonalization basis
- Replies: 4
- Views: 14789
Re: Ordering of exact diagonalization basis
Hi bart, just FYI that this will be resolved in the next version of tenpy, developed at https://github.com/tenpy/cyten. There, we consider this permutation in ``Tensor.to_numpy()`` such that it behaves as expected, i.e. such that ``.combine_legs(...).to_numpy()`` is equivalent to ``.to_numpy().resha...
- 16 Oct 2024, 13:00
- Forum: HowTos and FAQ for TeNPy
- Topic: How to convert between npc.Array and one dimension np.array efficiently?
- Replies: 3
- Views: 10219
Re: How to convert between npc.Array and one dimension np.array efficiently?
At first glance, I do not see why this code should raise such an error.
Please make sure you are using an up to date version of tenpy.
If the problem persists, please open an issue on github with a minimal code example that reproduces the bug, and include the full error message.
Please make sure you are using an up to date version of tenpy.
If the problem persists, please open an issue on github with a minimal code example that reproduces the bug, and include the full error message.
- 09 Oct 2024, 10:22
- Forum: HowTos and FAQ for TeNPy
- Topic: How to convert between npc.Array and one dimension np.array efficiently?
- Replies: 3
- Views: 10219
Re: How to convert between npc.Array and one dimension np.array efficiently?
For Array_to_ndarray, the low hanging fruits are to operate on numpy arrays instead of python lists. I probably would initialize a final_array of correct length (sum of the ``block.size`` for all blocks) and dtype, then in the loop set elements of the final_array to the block (keep somecounter varia...
- 18 Apr 2024, 05:49
- Forum: HowTos and FAQ for TeNPy
- Topic: Applying different time evolution to different subsystems with TEBD
- Replies: 2
- Views: 32217
Re: Applying different time evolution to different subsystems with TEBD
Hi, This can not be done out of the box. TEBD will also be difficult, since your gates are not nearest neighbour (even if H_i are NN on their subsystem, they are NNN on the full system). You could force TEBD by grouping sites to a nearest neighbour model. I would go for MPO time evolution though. Yo...
- 10 Apr 2024, 12:45
- Forum: HowTos and FAQ for TeNPy
- Topic: Matrix representation of dN operator
- Replies: 1
- Views: 8399
Re: Matrix representation of dN operator
Yes, you can have a look at the operator in the site In [3]: import tenpy as tp In [4]: site = tp.FermionSite(filling=0.5) In [5]: site.dN Out[5]: <npc.Array shape=(2, 2) labels=['p', 'p*']> In [6]: site.dN.to_ndarray() Out[6]: array([[-0.5, 0. ], [ 0. , 0.5]]) In[7]: # The basis is { |empty> , |ful...
- 31 Mar 2024, 20:58
- Forum: HowTos and FAQ for TeNPy
- Topic: Issue in running chiral_pi_flux.py
- Replies: 4
- Views: 30666
Re: Issue in running chiral_pi_flux.py
Hi,
Yes it turns out those examples are not yet updated for v1.0.
They should run with v0.99.
Working on a fix in https://github.com/tenpy/tenpy/pull/400.
Thanks for posting!
Yes it turns out those examples are not yet updated for v1.0.
They should run with v0.99.
Working on a fix in https://github.com/tenpy/tenpy/pull/400.
Thanks for posting!