physicskit: Computational Physics in Python#

physicskit is a unified scientific toolkit for computational physics, spanning 14 domains – from stellar dynamics to quantum entanglement – under one NumPy-based API. It’s built for physics students working through a textbook problem, curious learners exploring a topic on their own, and educators building a demonstration: every subpackage is called, tested, and visualized the same way, so moving from classical mechanics to condensed matter to general relativity means picking up new physics, not a new set of conventions. Units stay native to the field instead: \(G=1\) for orbits, \(\hbar=1\) for quantum states, \(k_B=1\) for statistical mechanics, matching how the papers you’re checking against actually write it, rather than forcing everything through SI. Units and conventions lists each subpackage’s convention and shows how physicskit.units converts results to SI once you choose the physical scale.

A ray-traced black hole shadow, the Hofstadter butterfly, and Kelvin-Helmholtz roll-up, all drawn with physicskit

Every subpackage is grounded in the physics it implements, not just coded against it: public functions carry runnable, CI-checked examples, and each subpackage’s history page traces the breakthroughs behind it – from Huygens’ 1690 wave construction to the 2017 GW170817 neutron-star chirp – each one linked to the code that reproduces it. The goal is a toolkit you can trust to move between domains without re-deriving the plumbing every time:

Important

Each domain is a teaching-depth subset of its field, not a complete implementation. physicskit is not a replacement for specialist libraries in production work: for that, use the dedicated tools (SciPy, QuTiP, Astropy, REBOUND, Kwant, PlasmaPy, and the like) directly.

physicskit is part of a family of packages – physicskit, mathematicskit and chemistrykit – that share the same architecture, API conventions, and history-driven documentation. For tight-binding models beyond physicskit.condensed – arbitrary finite lattices, ribbons and defects, non-Hermitian bands, Landauer transport, and the kernel polynomial method for very large samples – see the dedicated package tbkit.

Conventionally imported as pk:

import physicskit as pk
import numpy as np

H = lambda k1, k2: pk.condensed.haldane_model(k1, k2, phi=np.pi / 2)
chern_numbers = pk.condensed.compute_chern_number(H, grid_size=30)
print(chern_numbers)  # [1, -1]

Related toolkits

Sibling Python toolkits for learning and teaching, built the same way: