110 standalone TikZ figures, mostly about , , .

MIT licensed (free to reuse) Repo

Have a TikZ image you'd like to share with attribution?
Submit a PR with a standalone `.tex`

file
and metadata `.yml`

file to add it to this list.

## Autoencoder

Variational autoencoder architecture. Made with https://github.com/battlesnake/neural.

## Aviary

Aviary logo: a repo of machine learning models for representation learning in materials discovery from stoichiometry and symmetries via graph convolutions. For https://github.com/CompRhys/aviary.

## Basis + Lattice

Operation illustrating combination of a motif/basis with a point lattice to generate a crystal structure.

## Bloch Sphere

A Bloch sphere of radius |a| = 1 contains all possible states of a two-state quantum system (qubit). Each Bloch vector fully determines a spin-1/2 density matrix. Used in Exercise Sheet 10 of Statistical Physics by Manfred Salmhofer (2016), available at https://janosh.dev/physics/statistical-physics.

## Bose Einstein Distribution

Illustrating the change in the real part of the Bose-Einstein distribution, i.e. the average occupancy of the ground state of a bosonic system, from doubling the temperature. Pulled from arxiv:1712.09863.

## Bose Einstein Distribution 3d

Surface plot of the Bose-Einstein distribution over the complex plane. This plot shows an important feature of the Matsubara formalism developed for QFT at non-zero temperature. It's a method to calculate expectation values of operators in a canonical ensemble evolved by an imaginary time. In momentum space, this leads to the replacement of continuous frequencies by discrete imaginary (Matsubara) frequencies. Away from the imaginary axis, the distribution becomes approximately flat, particularly at sufficiently low temperatures. Pulled from arxiv:1712.09863.

## Branch and Bound

Illustration of a linear-programming (LP)-based branch and bound algorithm. Not knowing how to solve a mixed-integer programming (MIP) problem directly, it first removes all integrality constraints. This results in a solvable LP called the linear-programming relaxation of the original MIP. The algorithm then picks some variable x restricted to be integer, but whose value in the LP relaxation is fractional. Suppose its value in the LP relaxation is x = 0.7. It then excludes this value by imposing the restrictions x ≤ 0 and x ≥ 1, thereby creating two new MIPs. By applying this recursively step and exploring each resulting bifurcation, the globally optimal solution satisfying all constraints can be found.

## Branch Cuts 1

Propagator branch cuts, i.e. a continuum of singularities, along the real frequency axis extending from $\pm |\vec p|$ out to $\pm \infty$. Pulled from arxiv:1712.09863.

## Branch Cuts 2

Branch cuts approaching the real $q_0$-axis with decreasing $k$ where they merge at $k = 0$. $k$ denotes the energy cutoff of a scalar field theory.

## Change of Variables

Simple 2d example illustrating the role of the Jacobian determinant in the change of variables formula. Inspired by Ari Seff in https://youtu.be/i7LjDvsLWCg?t=250.

## Closed String Topologies

When calculating scattering amplitudes via the path integral, we must sum over all possible world-sheet topologies. To characterize the types of world-sheets that have to be considered at each level of its perturbative expansion, string theory makes use of the following theorem:

Every compact, connected, oriented two-dimensional manifold is topologically equivalent to a sphere with $g$ handles ($g$ for genus) and $b$ boundaries. A topological invariant of two-dimensional oriented surfaces is the Euler characteristic $\chi = 2 - 2g - b$.

What this boils down to is that we can obtain the topological characteristics of higher and higher loop-level world-sheet topologies by successively increasing in one-step increments the number of handles $g$ in case of the closed string and the number of boundaries $b$ for the open sector. This gives the topologies in this figure for the vacuum diagram of the closed sector up to one-loop level. For the open sector, see open string topologies.

## Complex Sign Function

3d surface plot of the complex sign function $s(p_0) = \sign(\Re p_0 , \Im p_0)$ over the complex plane. Used in the Matsubara summation of thermal quantum field theory to split contour integrals in the complex plane into two parts, the first being branch-cut free and the second evident branch cut structure.

## Concave Functions

$x \ln(x)$ is convex and $x - 1$ is its tangent, so $x \ln(x) \geq x - 1 \enskip \forall x$.

## Contour Deformation

## Conv2d

A two-dimensional convolution operator slides the kernel matrix across the target image and records elementwise products. Makes heavy use of the matrix environment in TikZ.

## Convex Functions

$x$ and $-x\log(x)$ are concave functions. Since $\ln(p)$ decomposes into sums of these two components, it too must be concave. Any extremum of a concave function is a maximum. This fact is used in statistical physics to find the equilibrium distribution of many-particle systems. See problem 2 on this exercise sheet.

## Cost vs Accuracy in Quantum Mechanics Simulations

Cost vs accuracy trade-off for different quantum mechanics approximations. $N$ denotes the system size, usually the number of electrons. Source: Frank Noe.

## Cylinder to Plane

String theory: Primary fields and radial quantization A time-ordered product of fields on the cylinder maps to a radially ordered product in the complex plane. This graphic visualizes how different times on the cylinder correspond to different times on the plane.

## Diagrams

## Disk to Plane

## Divergence

Plot of $-\ln(1-z)$ which diverges at $z = 1$.

## Dropout

Illustration of applying dropout with a rate of $p = 0.5$ to a multilayer perceptron.

## Ergodic

## Euler Angles

Named after the mathematician Leonhard Euler, the 3 Euler angles describe arbitrary orientations in 3d w.r.t. to some coordinate system. They can also represent the orientation of a frame of reference in physics or of a general basis in 3d linear algebra.

## Fermi-Dirac Distribution

A plot illustrating the Fermi-Dirac distribution function for different temperatures relative to the chemical potential ($\epsilon/\mu$). The plot demonstrates how the occupation number ($n(\epsilon)$) changes as the temperature increases from zero to higher values. The visualization also highlights the effect of thermal fluctuations, which increase with higher temperatures.

## Feynman 1

## Feynman 2

## Feynman 3

## Feynman 4

## Feynman Diagram Propagator Loop

This Feynman diagram contains two propagators forming a loop carrying the external energy $q_0$. $m_{1,2}$ denote the masses of the propagators and $\gamma_{1,2}$ their decay width which, for an expansion in Minkowski space, are non-zero only around a real and positive on-shell frequency $p_0 > 0$.

## Fluctuations

Number fluctuations of the occupation probability〈nk〉of a single mode k in an ideal Bose and Fermi gas in the grand canonical ensemble. Used in Exercise Sheet 11 of Statistical Physics by Manfred Salmhofer (2016), available at https://janosh.dev/physics/statistical-physics.

## Four Vs of Data

The state of the 4 Vs of data as they apply to materials informatics. Inspired by fig. 1 in https://api.semanticscholar.org/CorpusID:137734316.

## GAN

Generative adversarial network (GAN) architecture. A GAN has two parts. The discriminator $D$ acts as a classifier that learns to distinguish fake data produced by the generator $G$ from real data. $G$ incurs a penalty when $D$ detects implausible results. This signal is backpropagated through the generator weights such that $G$ learns to produce more realistic samples over time, eventually fooling the discriminator if training succeeds.

## Geometric Bayes

3blue1brown-inspired geometric visualization of Bayes theorem https://youtu.be/HZGCoVF3YvM.

## Graph Isomorphism

Graphs can look differently but be identical. The only thing that matters are which nodes are connected to which other nodes. If there exists an edge-preserving bijection between two graphs, in other words if there exists a function that maps nodes from one graph onto those of another such that the set of connections for each node remain identical, the two graph are said to be isomorphic.

## Gravitons

## Harmonic Oscillator Energy vs Angular Frequency

Harmonic oscillator energy $\langle E\rangle/k_\text{B} T$ vs angular frequency $\omega = \sqrt{k/m}$

## Harmonic Oscillator Energy vs inverse Temperature

Harmonic oscillator energy vs inverse temperature beta = 1/(kB T)

## Heatmap

Posted as an answer to https://tex.stackexchange.com/q/44868.

## Higgs Potential

The Higgs mechanism plays a vital role in the Standard Model for explaining how gauge bosons obtain mass. The Standard Model would otherwise predict these particles to be massless. Through interactions with the Higgs field that permeates all space and whose elevated potential at zero field leads to spontaneous symmetry breaking (SSB), gauge bosons also experience symmetry breaking, causing them to acquire mass. See https://janosh.github.io/tikz/maxican-hat for a very similar image.

## High Entropy Alloy

Cartoon of the AlCoCrFeNi high entropy alloy (HEA) with body-centered cubic (BCC) lattice. HEAs also come in face-centered cubic (FCC) and (less frequently) hexagonal close packing (HCP). BCC HEAs typically have high yield strength and low ductility, vice versa for FCC HEAs. Wiki article.

## Identical Particle Energy Distribution Function Comparison

A plot comparing the distribution functions of Bose-Einstein, Boltzmann, and Fermi-Dirac statistics as a function of the reduced chemical potential $\beta (\epsilon - \mu)$. This visualization highlights the differences between the three types of distribution functions, which are used to describe the behavior of particles in different statistical systems.

## Isotherms

This image visualizes the behavior of gas isotherms (curves showing pressure-volume relationships at constant temperature), represented by three equations of state, as a function of volume. The equations include the ideal gas law, and two other modified laws accounting for molecular interactions. The x-axis represents the molar volume and the y-axis represents the pressure of the gas.

## Jensens Inequality

This graph illustrates Jensen's Inequality, a fundamental concept in mathematical optimization and probability theory. It compares a convex function (blue curve, representing the natural logarithm function) with a linear function (orange dashed line). The inequality states that for a convex function, the function of an expectation is always less than or equal to the expectation of the function, depicted here by the fact that the dashed line is always above the curve. Equality holds if and only if the random variable is a constant (i.e. there is no randomness).

## k-Space

The $k$-space region of wave vectors up to a given magnitude is a disk of area $\pi k^2$. The $k$-space area occupied by a single particle state is $$ \frac{1}{2} \frac{2 \pi}{L_x} \frac{2 \pi}{L_y} = \frac{2 \pi^2}{A}, $$ where the factor of $\frac{1}{2}$ is due to the spin degeneracy $g_s = 2 s + 1 = 2$. The number of states with wave vector magnitude smaller than $k$ is $$ N(k) = \frac{\pi k^2}{2 \pi^2/A} = \frac{A k^2}{2 \pi}. $$ $k$-space is used extensively in solid state physics e.g. to visualize the energy bands of a material as a function of electron momentum. In position space, the position-energy dispersion would just be a probability blur.

## Kohn Sham Cycle

This diagram illustrates the Kohn-Sham cycle in Density Functional Theory (DFT), a computational quantum mechanical modeling method. The process starts with an initial guess for the electron density, which is used to calculate the effective potential. This potential is then used in the Kohn-Sham Hamiltonian, which is solved to obtain the wavefunctions. These wavefunctions are used to compute a new electron density. If convergence criteria are met, the final electron density is used to calculate the total energy functional. If not, the new electron density is used for the next iteration of the cycle.

## Kohn-Sham DFT User Choices

Visualization of the many choices involved in a Kohn-Sham calculation. It can be non-relativistic based on the classical Schrödinger equation or fully relativistic based on the Dirac equation which includes spin-orbit coupling. The near-core electrons can be modeled explicitly in an all-electron calculation or, much more commonly, incorporated along with the nucleus into an effective pseudo-potential. The Hartree energy can be obtained by integrating the charge density or by solving the Poisson equation. The exchange-correlation potential can be treated with a huge library of density functionals, most commonly LDA and GGA. The wave functions can be computed on a numerical mesh and expanded in one of many possible basis sets, e.g. plane waves, APW, or PAW. Inspired by arxiv:cond-mat/0211443.

## Loop

## Loops

## M-Theory

One of the pivotal insights of the 2nd superstring revolution point was Edward Witten's formulation of M-Theory in 1995. Before that, there had been 5 different types of string theories, each 10-dimensional: Type I, Type IIa and IIb, and two different heterotic theories. Witten showed that all of these theories are simply different limiting cases of a single overarching string theory (without showing what that underlying theory actually is). See Sean Carroll's excellent post on M-Theory for details.

## MADE

TikZ-reproduction of fig. 1 from the paper MADE: Masked Autoencoder for Distribution Estimation (arxiv:1502.03509).

## MAF

Illustration of the slow (sequential) forward pass of a Masked Autoregressive Flow (MAF) layer as introduced in arxiv:1705.07057. Inspired by https://blog.evjang.com/2018/01/nf2.html.

## Materials Informatics

Structure-based materials informatics workflow. Inspired by fig. 1 in https://doi.org/10.1016/j.cpc.2019.106949.

## Materials Informatics Challenges

## Matsubara Contour 1

Complex contour plot illustrating a Matsubara summation. Used in thermal quantum field theory to compute Feynman diagrams at non-zero temperature. $C$ surrounds the imaginary $p_0$-axis counterclockwise but excludes poles of $(-p_0^2 + x^2)^{-1}$.

## Matsubara Contour 2

Deformation of contour $C$ in Matsubara contour 1 into a circle followed by taking the radius to infinity. This will enclose the poles of $(-p_0^2 + x^2)^{-1}$ scattered throughout the complex plane. Their contribution is removed again by enclosing them in clockwise contours.

## Matsubara Contour 3

## Matsubara Contour 4

## Matsubara Contour 5

## Maxwell Boltzmann Distribution

The Maxwell-Boltzmann distribution plotted at different temperatures reveals that the most probable velocity $v_p$ of ideal gas particles scales with the square root of temperature.

## Mexican Hat

The Mexican hat potential exhibits spontaneous symmetry breaking (SSB), a process by which a physical system starting in a symmetric state spontaneously enters and remains in an asymmetric state. This usually applies to systems whose equations of motion obey a set of symmetries while the lowest-energy state(s) do(es) not. When the system assumes one of its ground states, its symmetry is broken even though the Lagrangian as a whole retains it. See https://janosh.github.io/tikz/higgs-potential for a very similar image.

In this image, the system starts out in the naive $O(N)$-invariant vacuum (blue dot) but quantum fluctuations quickly push it into the real vacuum (red dot) where $O(N)$ is broken down to $O(N-1)$.

## MOSFET

The metal-oxide-semiconductor field-effect transistor, or MOSFET for short, is the most frequently manufactured device in history, with close to 10^23 MOSFETs produced since 1960. As the basic building block of almost all modern electronics, it revolutionized the world economy and triggered our ascent into the information age.

## Mphil Gantt

Useless Gantt chart for my Scientific Computing MPhil project at Cambridge University titled "Data-Driven Risk-Conscious Thermoelectric Materials Discovery". See https://github.com/janosh/thermo.

## NF Coupling Layer

Simple 2d example illustrating the role of the Jacobian determinant in the change of variables formula. Inspired by Ari Seff in https://youtu.be/i7LjDvsLWCg?t=250.

## Normalizing Flow

A chain of bijections $f = f_1 \circ \dots \circ f_k$ constituting a normalizing flow which step by step transforms a simple distribution $p_0(\vec z_0)$ into a complex one $p_k(\vec z_k)$. The bijections are trained to fit $p_k(\vec z_k)$ to some target distribution $p_x(\vec x)$. Inspired by Lilian Weng.

## One Point

This Feynman diagram corresponds to the integrand in this expression for $$ \displaystyle \partial_t \Gamma_{k,a}^{(1)}(q) = -\frac{1}{2} \sum_{\substack{i,j\k,l}}^N \int_{\substack{p_1,p_2\p_3^\prime,p_4^\prime}} \frac{\partial_t R_{k,ij}(p_1,p_2)}{\Gamma_{k,jk}^{(2)}(p_2,p_3) + R_{k,jk}(p_2,p_3)} , \frac{\Gamma_{k,akl}^{(3)}(q,p_3,p_4)}{\Gamma_{k,li}^{(2)}(p_4,p_1) + R_{k,li}(p_4,p_1)}. $$

## Open String Topologies

When calculating scattering amplitudes via the path integral, we must sum over all possible world-sheet topologies. To characterize the types of world-sheets that have to be considered at each level of its perturbative expansion, string theory makes use of the following theorem:

Every compact, connected, oriented two-dimensional manifold is topologically equivalent to a sphere with $g$ handles ($g$ for genus) and $b$ boundaries. A topological invariant of two-dimensional oriented surfaces is the Euler characteristic $\chi = 2 - 2g - b$.

What this boils down to is that we can obtain the topological characteristics of higher and higher loop-level world-sheet topologies by successively increasing in one-step increments the number of handles $g$ in case of the closed string and the number of boundaries $b$ for the open sector. This gives the topologies in this figure for the vacuum diagram of the closed sector up to one-loop level. For the closed sector, see closed string topologies.

## Operator Orderings

## Organic Molecule

Beta-methylamino-DL-alanine - C4H10N2O2. Coordinates found on https://tex.stackexchange.com/q/453740.

## Otto Cycle

The Otto cycle is an idealized thermodynamic cycle of a typical spark ignition piston engine. It is the thermodynamic cycle most commonly found in automobile engines.

## Periodic Table

The periodic table of elements, a graphic formulation of the periodic dependence of elemental properties on their atomic numbers. The table is divided into four roughly rectangular areas called blocks. Rows are called periods, columns are groups. Elements from the same group show similar chemical characteristics. Trends run through the periodic table, with nonmetallic character (keeping their own electrons) increasing from left to right across a period, and from down to up across a group, and metallic character (surrendering electrons to other atoms) increasing in the opposite direction.

## Physics Mindmap

A mindmap showing the main branches of physics, including Classical Mechanics, Quantum Mechanics, Relativity, Statistical Mechanics, High-Energy Physics, and Cosmology. Each branch is further divided into subcategories.

## Plane to Torus

## Plate Capacitor

Parallel plate capacitor with dipolar polarization.

## Poles

## Potential Triangle

## Propagator Fluctuations

## Propagators

## Random Forest

Diagram of the random forest (RF) algorithm (Breiman 2001). RFs are ensembles model consisting of binary decision trees that predicts the mode of individual tree predictions in classification or the mean in regression. Every node in a decision tree is a condition on a single feature, chosen to split the dataset into two so that similar samples end up in the same set. RFs are inspectable, invariant to scaling and other feature transformations, robust to inclusion of irrelevant features and can estimate feature importance via mean decrease in impurity (MDI).

## Regular vs Bayes NN

## Relation Space

## RNVP

Illustration of the real-valued non-volume preserving (RNVP) affine coupling layer as introduced in arxiv:1605.08803. Inspired by https://blog.evjang.com/2018/01/nf2.html.

## Roost Update

Representation Learning from Stoichiometry (Roost). Graph representation and update mechanism for the composition La2CuO4. Essentially depicting a graph convolution. arxiv:1910.00617

## Sabatier Principle

Illustration of the Sabatier principle in heterogeneous catalysis. Inspired by From the Sabatier principle to a predictive theory of transition-metal heterogeneous catalysis.

## Saddle Point

This graph depicts a saddle point in three-dimensional space, which is a point in the domain of a function that is a local minimum in one direction and a local maximum in another. The depicted function $F(T, V)$ is quadratic in $T$ and $V$, and the graph shows the convex and concave nature of the function along different axes.

## Sbs Aktionen

Operations schematic for the German student initiative "Studenten bilden Schüler eV". See https://studenten-bilden-schueler.de.

## Scattering Process Detailed Balance

A simple diagram representing a scattering process in particle physics, where two incoming particles with momenta $p$ and $k$ interact and produce two outgoing particles with momenta $p'$ and $k'$. The principle of detailed balance states that at equilibrium, each scattering process is in equilibrium with its reverse process.

## Seebeck Effect

The Seebeck effect creates a voltage in conductors or semiconductor when subjected to a temperature gradient, i.e. when one side of the material is warmer than another. This effect enables thermoelectric devices which can measure temperature and generate electricity from waste heat.

## Self Attention

## Shell

## Sign Plane

Sign function in the complex plane.

## Single-head attention

Flow diagram of single-head attention illustrating the equation $\displaystyle \mathrm{Attention}(Q, K, V) = \mathrm{softmax}_\text{row} \left( \frac{Q K^\top}{\sqrt{d}} \right) V$ with border colors to indicate tensor dimensions.

## Skip Connection

Illustration of skip connection in a residual block. Inspired by the ResNet paper. arxiv:1512.03385

## Spontaneous Magnetization

Spontaneous magnetization $m$ in an Ising ferromagnet appears below the critical temperature $T_c$. The derivative of $m$ diverges in the limit $T \to T_c^-$.

## Tanh

Plot of the hyperbolic tangent. tanh(x) goes to +/- 1 for x to +- infinity while it is approximately linear for abs(x) < 1. Appears in many places in physics, e.g. in the magnetization of an ideal paramagnet of independent spins.

## Temperature-Dependent Phase Transition

A plot illustrating the temperature-dependent phase transitions of a material as a function of the critical temperature ($T_c$). The blue curve represents the low-temperature phase, the red curve represents the high-temperature phase, and the orange curve shows the critical mass ($m_c$) as a function of temperature. This visualization helps to understand the behavior of materials as they undergo phase transitions due to changes in temperature.

## Theory Space

## Thermodynamic Ensemble transforms

Equivalence of thermodynamic ensembles through Laplace and Legendre transforms.

## Thomson Scattering

Illustration of coherent X-ray scattering (i.e. Thomson scattering) from an atom. An electron is caused to oscillate and then re-emits a photon with the same energy in an arbitrary direction.

## Tori

## Torus

## Torus Fundamental Domain

## Two Point

Two-point propagator flow

## Two Point No Cutoff

Two-point propagator flow without cutoff derivative

## Unregularized Propagator Diagrams

## VAE

Variational autoencoder architecture. The earliest type of generative machine learning model. Inspired by https://towardsdatascience.com/intuitively-understanding-variational-autoencoders-1bfe67eb5daf.

## Wall

Exercise illustration: Compute the pressure of an ideal gas in three dimensions upon a wall at $x = 0$ that attracts molecules at large distance and repels them at smaller distance. Let the force be given by the potential $U(x) = -A , e^{-\alpha x} + B , e^{-2 \alpha x}$, with $A,B > 0$.

## Wetterich Equation

The Wetterich eqn. is a non-linear functional integro-differential equation of one-loop structure that determines the scale-dependence of the flowing action $\Gamma_k$ in terms of fluctuations of the fully-dressed regularized propagator $[\Gamma_k^{(2)} + R_k]^{-1}$. It admits a simple diagrammatic representation as a one-loop equation as shown in this diagram.

## Wyckoff Positions

2D toy crystal with three occupied Wyckoff positions. The shaded areas illustrate the region of the unit cell the relevant atoms are constrained to lie in by specifying an anonymized Wyckoff position for that atom. Reproduction of fig. 2 from "Wyckoff Set Regression for Materials Discovery" by Rhys Goodall, inspired by PyXtal docs.

## zT vs n

Thermoelectric figure of merit $zT$ vs carrier concentration $n$ for Bi2Te3 based on empirical data in $\alpha - \ln \sigma$ plot as a thermoelectric material performance indicator. Tuning $n$ for optimal $zT$ involves a compromise between thermal conductivity $\kappa$, Seebeck coefficient $S$ and electrical conductivity $\sigma$. Increasing the electrical conductivity $\sigma$ not only produces an increase in the electronic thermal conductivity $\kappa_\text{el}$ but also usually decreases the Seebeck coefficient $S$. This makes optimal $zT$ difficult to achieve. Plot scales are $\kappa [W / m K] \in [0,10]$, $S [mV] \in [0,500]$, $\sigma [1/(\Omega cm)] \in [0,5000]$.