Skip to main content

A Python package for Floquet engineering of tight-binding models

Project description

FloquetTB

A Python package for Floquet engineering of tight-binding models with topological property calculations.

Features

  • Floquet Hamiltonian Calculation: Compute effective Floquet Hamiltonians using high-frequency expansion
  • Topology Calculations: Calculate Wilson loops, Chern numbers, and Berry curvature
  • Band Structure Plotting: Visualize Floquet band structures with spin projection
  • Circular Polarization Support: Full support for circularly polarized light driving

Installation

pip install floquettb

Or install from source:

git clone https://github.com/yourusername/floquettb.git
cd floquettb
pip install -e .

Dependencies

  • numpy >= 1.19.0
  • scipy >= 1.5.0
  • matplotlib >= 3.3.0
  • pythtb == 1.8.0 (required, install separately)

Quick Start

from pythtb import tb_model
from floquettb import FloquetTB  # or: from floquettb.floquettb import FloquetTB
import numpy as np

# 1. Create a tight-binding model
lat = [[1.0, 0.0], [0.5, np.sqrt(3.0)/2.0]]
orb = [[1.0/3.0, 1.0/3.0], [2.0/3.0, 2.0/3.0]]
my_model = tb_model(2, 2, lat, orb, nspin=1)

# Set hoppings
t = 1.0
my_model.set_hop(-t, 0, 1, [0, 0])
my_model.set_hop(-t, 0, 1, [0, -1])
my_model.set_hop(-t, 0, 1, [-1, 0])

# 2. Convert to Floquet model
floquet_model = FloquetTB(my_model)

# 3. Apply circularly polarized light
omega = 10.0  # Driving frequency
A_drive = 1.0  # Driving amplitude
floquet_model.compute_floquet_hamiltonian(
    A=A_drive, 
    omega=omega, 
    polarization='circular_left', 
    order=2
)

# 4. Calculate topological properties
results = floquet_model.calculate_all_topology(
    mesh_size=101,
    occ=[0, 1],  # Occupied bands
    return_plots=True
)

print(f"Chern number: {results['chern_number']:.6f}")

# 5. Plot band structure
kpath = [[0.0, 0.0], [2.0/3.0, 1.0/3.0], [0.5, 0.5], [0.0, 0.0]]
fig, ax = floquet_model.plotbands(
    kpath=kpath, 
    label="Floquet Band Structure",
    A=A_drive, 
    omega=omega,
    proj_spin=False
)

API Reference

FloquetTB Class

Methods

  • compute_floquet_hamiltonian(A, omega, polarization='circular_left', order=1): Compute effective Floquet Hamiltonian
  • plotbands(kpath, label="Floquet Band Structure", n_points=300, A=None, omega=None, proj_spin=False): Plot band structure
  • calculate_wilson_loop(mesh_size=51, occ=None, dir=1, start_k=[0.0, 0.0], contin=True, return_plot=False): Calculate Wilson loop
  • calculate_chern_number(mesh_size=51, occ=None, start_k=[0.0, 0.0], dirs=None): Calculate Chern number
  • calculate_berry_curvature(mesh_size=51, occ=None, start_k=[0.0, 0.0], dirs=None, return_plot=False, log=False): Calculate Berry curvature
  • calculate_all_topology(mesh_size=51, occ=None, start_k=[0.0, 0.0], return_plots=False, log=False): Calculate all topological properties

Examples

See the examples/ directory for more detailed examples.

Citation

If you use FloquetTB in your research, please cite:

@software{floquettb2024,
  title={FloquetTB: A Python package for Floquet engineering of tight-binding models},
  author={Your Name},
  year={2024},
  url={https://github.com/yourusername/floquettb}
}

License

MIT License

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Acknowledgments

This package is built on top of pythtb, a Python tight-binding package.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

floquettb-0.1.0.tar.gz (13.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

floquettb-0.1.0-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

Details for the file floquettb-0.1.0.tar.gz.

File metadata

  • Download URL: floquettb-0.1.0.tar.gz
  • Upload date:
  • Size: 13.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for floquettb-0.1.0.tar.gz
Algorithm Hash digest
SHA256 81fc405c29ae00649f659b57a48ff2184609cace113cbe97a2dacf68e98d4182
MD5 20460f39cd09f8ce25b0dbf36709ca6c
BLAKE2b-256 e109f241b736ec261f49a11f532cf7367ace99f41d7d0de48df0f13da586b1ea

See more details on using hashes here.

File details

Details for the file floquettb-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: floquettb-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for floquettb-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 33979fa0160ece6ee14e478f367b7370227deabbce05b158fd9ea51fccc80532
MD5 7f0ae5e82e63054f722b7e64c66dba43
BLAKE2b-256 c9a2a735610abbbfcdc34af8d35c834745ad70116c32f68ef7020768c716dce4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page