diff --git a/README.md b/README.md index 987ab44..47a5e5c 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ **TensorBinding.jl** *Compressing Condensed Matter Problems with Tensor Networks* -[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://TiagoAntao2.github.io/TensorBinding/stable/) -[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://TiagoAntao2.github.io/TensorBinding/dev/) -[![Build Status](https://github.com/TiagoAntao2/TensorBinding/actions/workflows/CI.yml/badge.svg?branch=master)](https://github.com/TiagoAntao2/TensorBinding/actions/workflows/CI.yml?query=branch%3Amaster) -[![Coverage](https://codecov.io/gh/TiagoAntao2/TensorBinding/branch/master/graph/badge.svg)](https://codecov.io/gh/TiagoAntao2/TensorBinding) +[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://TensorBinding.github.io/TensorBinding/stable/) +[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://TensorBinding.github.io/TensorBinding/dev/) +[![Build Status](https://github.com/TensorBinding/TensorBinding/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/TensorBinding/TensorBinding/actions/workflows/CI.yml?query=branch%3Amain) +[![Coverage](https://codecov.io/gh/TensorBinding/TensorBinding/branch/main/graph/badge.svg)](https://codecov.io/gh/TensorBinding/TensorBinding) **TensorBinding.jl** is a Julia package for constructing and studying tight-binding Hamiltonians as **Matrix Product Operators (MPOs)** in the *quantics binary* (QTT) representation. A system of *N = 2L* sites is encoded in *L* qubit sites, keeping bond dimensions small (typically ≤ 10) for physically relevant models. Arbitrary hopping matrices are compressed automatically via **Quantics Tensor Cross Interpolation (QTCI)**. @@ -14,31 +14,16 @@ ```julia using Pkg -Pkg.add(url="https://github.com/TensorBinding/TensorBinding") +Pkg.add("TensorBinding") ``` -Requires [ITensors.jl](https://github.com/ITensor/ITensors.jl), [ITensorMPS.jl](https://github.com/ITensor/ITensorMPS.jl), and [QuanticsTCI.jl](https://github.com/tensor4all/QuanticsTCI.jl). +Dependencies are resolved automatically: [ITensors.jl](https://github.com/ITensor/ITensors.jl), [ITensorMPS.jl](https://github.com/ITensor/ITensorMPS.jl), [QuanticsTCI.jl](https://github.com/tensor4all/QuanticsTCI.jl), [FFTW.jl](https://github.com/JuliaMath/FFTW.jl), and [CUDA.jl](https://github.com/JuliaGPU/CUDA.jl) (installed but only active when calling GPU functions — no GPU required for CPU workflows). --- ### Quick Start -```julia -using TensorBinding - -# 1D chain, 2^7 = 128 sites -H = get_Hamiltonian("chain_1d", 1.0; L=7) - -# Density of states via KPM -omega = range(-2.5, 2.5; length=200) -dos = get_dos(H, 100, collect(omega); maxdim=40) - -# Density matrix at half-filling -rho = mcweeny_purify(H; maxdim=50) - -# Band structure (1D → momentum space) -kvals, Ek = get_bands(H, 200; nk=256) -``` +See the [`examples/`](examples/) folder for notebooks covering the main workflows. --- @@ -49,35 +34,19 @@ kvals, Ek = get_bands(H, 200; nk=256) - 2D: square, triangular, honeycomb, kagomé, Lieb, and dice lattices — including sublattice-explicit models with an explicit unit-cell index - Generic *n*th-nearest-neighbour hopping on any 2D geometry (`add_hopping_2D!`): uniform, direction-dependent, site-dependent, or fully position+direction-dependent amplitude functions - Arbitrary hopping matrix `f(i,j)` compressed via QTCI (`hopping2MPO`) -- T- and Y-junction geometries via a dim-3 junction auxiliary index -**Bilayer and multilayer** -- Commensurate AA and Bernal (AB) stacking, exact interlayer coupling (no QTCI) -- Twisted multilayer with exponentially decaying interlayer coupling, QTCI-compressed - -**Spin, Nambu (BdG), and SOC extensions** +**Geometry & auxiliary DOF extensions** +- Real-space geometry functions for all lattices; geometric centroid helpers - Prepend or postpend spin-½ and Nambu indices (`add_spin!`, `add_superconductivity!`) - Zeeman coupling, Ising SOC, Rashba SOC; singlet *s*-wave, *p*-wave (Kitaev), and arbitrary custom pairing (`type=:custom`) - Auxiliary indices placeable at front (`:pre`) or back (`:post`) of the site chain -**Domain masking and geometry** -- Smooth domain walls via signed-distance-function (SDF) masks: disk, rectangle, half-plane, interval — QTCI-compressed sigmoid-shaped diagonal MPOs (`Flake_tk.jl`) -- Real-space geometry functions for all lattices; geometric centroid helpers - **Kernel Polynomial Method (KPM)** - Chebyshev expansion of spectral functions, LDOS, Green's functions, and density matrices - Kernels: Jackson (default), Lorentz, Fejér, Dirichlet, HODC - Three complementary modes: MPO (full operator), diagonal/online (memory-efficient LDOS), MPS (reference-state propagation) - Band structure *A(k,ω)* via QFT conjugation (`get_bands`); supports spin, BdG, layer, and sublattice projections via `aux_proj` - -**Density matrix purification** -- `mcweeny_purify` — cubic map, quadratic convergence, two MPO products per step -- `sp2_purify` — second-order spectral projection, one MPO product per step, electron-number controlled - -**Real-time evolution** -- Pure states: TDVP (time-independent and time-dependent *H*); compressed propagator MPO via QTCI -- Density matrices (Hermitian): RK4 integration of *dρ/dt = −i[H(t), ρ]* -- Density matrices (non-Hermitian): RK4 integration of *dρ/dt = −i(Hρ − ρH†)* +- Density matrix purification: McWeeny (cubic convergence) and SP2 (electron-number controlled) **Topological invariants** - Real-space Chern marker (2D) and winding-number density (1D) via KPM or purification @@ -92,24 +61,15 @@ kvals, Ek = get_bands(H, 200; nk=256) - `:stochastic` — Monte Carlo trace with random product-state probes, no MPO×MPO products - Complex on-site potentials, spatially modulated loss/gain, and non-reciprocal skin-effect hopping -**Quasiparticle Interference (QPI)** -- Single on-site impurity via exact rank-1 projector; LDOS difference + QFT gives *δA(k,ω)* -- Sigmoid apodization window to suppress edge ringing - -**Exciton / two-particle systems** -- Electron–hole Hamiltonian on an interleaved 2*L*-site quantics chain -- Contact interaction; MPS probes in real and momentum space +**Real-time evolution** +- Pure states: TDVP (time-independent and time-dependent *H*); compressed propagator MPO via QTCI +- Density matrices (Hermitian): RK4 integration of *dρ/dt = −i[H(t), ρ]* +- Density matrices (non-Hermitian): RK4 integration of *dρ/dt = −i(Hρ − ρH†)* -**Many-body methods** -- DMRG ground state (`dmrg_gs`) and spectral DMRG for site-resolved DOS -- Random Phase Approximation (RPA): polarization bubble and Dyson susceptibility inversion -- Krylov/Haydock retarded Green's function *G(ω+iη)* via vectorized linear solves +**Many-body: SCF & exciton** - Self-consistent mean-field (Hubbard): Hartree/CDW, magnetic, and BdG pairing channels +- Electron–hole Hamiltonian on an interleaved 2*L*-site quantics chain; contact interaction; MPS probes in real and momentum space **GPU acceleration** - CUDA-accelerated counterparts for KPM, band structure, topology, SCF, and two-particle LDOS - Setup (Hamiltonian construction, k-path bookkeeping) stays on CPU; Chebyshev recurrence and MPO products offloaded to GPU - ---- - -A full function reference is in `docs/src/TensorBinding_overview.txt` and example notebooks are in `examples/`.