8000 GitHub - YITAOSUN42/qtcipy_my: Python library to perform quantics tensor cross interpolation.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Python library to perform quantics tensor cross interpolation.

Notifications You must be signed in to change notification settings

YITAOSUN42/qtcipy_my

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

qtcipy

Python library to perform quantics tensor cross interpolation. The library is built on top of QuanticsTCI.jl and xfacpy

Examples

The folder examples contains several use cases of the library

Some of the examples use the library for electronic structure pyqula

Mean field with quantics tensor cross interpolation

Below you can see a minimal example of a mean field calculation using the quantics tensor cross interpolation algorithm combined with the kernel polynomial method for an interacting Hubbard Hamiltonian.

Moire in an interacting one-dimensional model

from qtcipy.tbscftk import hamiltonians
import numpy as np

L = 12 # exponential length, leads to 2**L sites
H = hamiltonians.chain(L) # get the Hamiltonian

def f(r):
    """Modulation of the hopping"""
    omega = np.pi*2.*np.sqrt(2.)/(2**L/10) # frequency of the modulation
    return 1. + 0.2*np.cos(omega*r[0]) # return correction to the hopping
H.modify_hopping(f) # modify the hopping 

SCF = H.get_SCF_Hubbard(U=3.0) # generate a selfconsistent object

SCF.solve(use_qtci=True,use_kpm=True)
Mz = SCF.Mz # selfconsistent magnetization

The moire Hamiltonian and resulting selfconsistent electronic order are Alt text

Moire domain wall in an interacting one-dimensional model

We will now see how an interface between two moire patterns can be computed

from qtcipy.tbscftk import hamiltonians
import numpy as np

L = 14 # exponential length, leads to 2**L sites
H = hamiltonians.chain(L) # get the Hamiltonian

def f(r):
    """Modulation of the hopping"""
    omega1 = np.pi*2.*np.sqrt(2.)/(2**L/10) # left frequency
    omega2 = np.sqrt(3)*omega1 # right frequency
    if r[0]<0.: return 0.2*np.sin(omega1*r[0]) # return correction to the hopping
    else: return 0.1*np.sin(omega2*r[0]) # return correction to the hopping

H.modify_hopping(f) # modify the hopping 

SCF = H.get_SCF_Hubbard(U=3.0) # generate a selfconsistent object

SCF.solve(use_qtci=True,use_kpm=True)
Mz = SCF.Mz # selfconsistent magnetization

The moire Hamiltonian and resulting selfconsistent electronic order are Alt text

Non-uniform strained moire in an interacting one-dimensional model

We will now compute a moire pattern with non-uniform strain

from qtcipy.tbscftk import hamiltonians
import numpy as np

L = 16 # exponential length, leads to 2**L sites
H = hamiltonians.chain(L) # get the Hamiltonian

def f(r):
    """Modulation of the hopping"""
    length = 2**L # total length
    omega0 = np.pi*2.*np.sqrt(2.)/(length/20) # base frequency
    omega = omega0*(1 + r[0]/length) # position-dependent frequency
    return 0.2*np.sin(omega*r[0]) # return correction to the hopping


H.modify_hopping(f) # modify the hopping 

SCF = H.get_SCF_Hubbard(U=3.0) # generate a selfconsistent object

SCF.solve(use_qtci=True,use_kpm=True)
Mz = SCF.Mz # selfconsistent magnetization

The moire Hamiltonian and resulting selfconsistent electronic order are Alt text

Documentation

Documentation about the kernel polynomial tensor cross interpolation algorithm for interacting tight binding models can be found here

You can find a detailed discussion about the kernel polynomial tensor cross interpolation algorithm for large interacting tight binding models in arXiv:2409.18898

Installation

You need to have Julia installed in your computer. Afterwards, execute "python install.py" in the current directory. Julia needs to be in your PATH, as the code will use the output of "which julia"

If you want to install the C++ version, use

python install_cpp.py

For the kernel polynomial quantics tensor cross algorithm for interacting tight binding models, the library pyqula has to be installed

pip install pyqula

About

Python library to perform quantics tensor cross interpolation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 95.5%
  • Julia 4.5%
0