Skip to content

Instantly share code, notes, and snippets.

@regstuff
regstuff / quantum_information_theory.md
Last active August 30, 2026 09:16
Quantum Information Theory

Qubits

A qubit (quantum bit) is a two-level quantum system that can exist in a superposition of two orthogonal basis states. These are conventionally defined in the $z$-basis as $\vert{}0\rangle$ (spin-up along the $z$-axis) and $\vert{}1\rangle$ (spin-down along the $z$-axis). One could also choose the $x$-basis, consisting of $\vert{}+\rangle$ (spin-up along $x$) and $\vert{}-\rangle$ (spin-down along $x$), but the $z$-basis (computational basis) is standard.

Qubits can be physically implemented via various hardware, such as spin-1/2 particles or the horizontal and vertical polarization states of photons. While photons are spin-1 particles, their lack of a longitudinal polarization mode mathematically restricts their physical polarization space to two dimensions, making them isomorphic to a spin-1/2 system for computational purposes. For abstract ket operations, the hardware implementation is ignored.

The primary states encountered are $\vert{}0\rangle$, $\vert{}1\rangle$, $\vert{}+\rangle$, and $\ve

@regstuff
regstuff / statistical_mechanics.md
Last active August 21, 2026 13:51
Statistical Mechanics

Probability & States

A system usually has several different states it can inhabit. These states are called microstates. Microstates that are indistinguishable from each other are clubbed under a single macrostate, and the number of microstates that make up a macrostate is called the multiplicity of that macrostate.

For eg. if we have 100 coins, there is only one way in which every coin will be heads up. i.e. the macrostate of all coins being heads up has a multiplicity of 1. However, the macrostate of one coin being heads up and the rest tails up has a multiplicity of 100 because any one of the 100 coins could be heads up, and each of these represents a different microstate.

If we assume that every microstate is equally probable, a system is most likely to eventually end up in the macrostate with the highest multiplicity i.e. the most probable macrostate. The probability of this occurring is given by:

$$\frac{\Omega_{\text{max}}}{\Omega_{\text{total}}}$$

@regstuff
regstuff / quantum_physics_1.md
Last active August 30, 2026 05:09
Quantum Physics 1

States and Measurement

A state (pure states for the moment) represents the current status of some property of an object, e.g. spin. For mathematical manipulation, states are represented by ket and bra vectors (single-column and single-row matrices over a complex vector space).

To determine what state an object is in (e.g., the value of the spin), you measure an observable. Observables are represented by an operator. If the observable can only take a finite number of possible values (for instance, spin-1/2 is either $+1$ or $-1$), it is represented in this finite-dimensional state space by a square matrix.

The dimensions of the column, row, and square matrices depend on the dimension of that particular state space. For example, a spin-1/2 system is a two-dimensional state space, because the measurement can yield either $+1$ or $-1$ (ignoring the scaling factor of $\hbar/2$). In this case, the state kets and bras are $2 \times 1$ and $1 \times 2$ matrices respectively, while the operators are $2 \times 2$

@regstuff
regstuff / classical_field_theory.md
Last active August 4, 2026 05:45
Classical Field Theory

The Electromagnetic Field and Potentials

In classical electrodynamics, the fundamental entities are the electric field $\mathbf{E}$ and the magnetic field $\mathbf{B}$. These fields are mathematically derived from a scalar potential $\phi$ (the electrostatic equivalent of classical voltage potential) and a vector potential $\mathbf{A}$. The fields are defined as:

$$\mathbf{B} = \nabla \times \mathbf{A}$$

$$\mathbf{E} = -\nabla\phi - \frac{\partial \mathbf{A}}{\partial t}$$

E & B as the 4-curl of the 4-vector potential

@regstuff
regstuff / symmetries_dirac_notation.md
Last active July 27, 2026 10:06
Symmetries and Dirac Notation

Symmetries

From Susskind's Theoretical Minimum Book

Classical Mechanics: Symmetries & Conservation Laws


1. General Conservation (Noether's Theorem)

@regstuff
regstuff / tensors_vector_calculus.md
Last active July 21, 2026 13:14
Tensors and Vector Calculus

Tensors

The whole story in five lines

  1. Tensors are invariant; their components transform — upper indices by B, lower by F (F, B inverse).
  2. Vectors (contravariant, upper) and covectors (covariant, lower) are the building blocks; a covector is a stack of lines and α(v) counts piercings.
  3. Combine p vectors and q covectors with to build any (p,q)-tensor; transform each factor and the rules fall out for free.
  4. The metric g_ij = e_i·e_j measures length/angle and rescues Pythagoras outside orthonormal bases.
  5. g lowers (♭) and g⁻¹ raises (♯) indices, linking vectors and covectors — but v^i ≠ v_i unless the basis is orthonormal.

What is a tensor: Imagine a car heading on a straight highway, towards a left turn that it wants to take. Imagine that the distance of the car is measured along the highway as x, starting from the left turn and increasing towards the car's present position at time 0. Imagine the y-axis as starting from the left turn's join with the highway

@regstuff
regstuff / cosmology_notes_8-12.md
Created July 19, 2026 09:41
cosmology_notes_8-12.md

Barbara Ryden — Introduction to Cosmology (2nd ed., 2016) — Revision Notes

How to read these notes

  • Coverage: Chapters 3–12 plus the Epilogue
  • Every bullet ends with a citation like [R 4 81] = Ryden, Ch 4, PDF page 81.
  • Formulas relevant to a bullet are included inline, tagged with the book's own equation number, e.g. (Eq. 4.20) — the same numbering used in the formulas sheet, which remains the master list.

Quick reference: ★ Essentials Cheat Sheet, Ch 2-6 Formulas, Ch 7-12 Formulas, Ch 3-7 Notes

@regstuff
regstuff / cosmology_notes_3-7.md
Last active July 21, 2026 07:39
Cosmology notes from Ryden's book Ch 3-7

Barbara Ryden — Introduction to Cosmology (2nd ed., 2016) — Revision Notes

How to read these notes

  • Coverage: Chapters 3–12 plus the Epilogue
  • Every bullet ends with a citation like [R 4 81] = Ryden, Ch 4, PDF page 81.
  • Formulas relevant to a bullet are included inline, tagged with the book's own equation number, e.g. (Eq. 4.20) — the same numbering used in the formulas sheet, which remains the master list.

Quick reference: ★ Essentials Cheat Sheet, Ch 2-6 Formulas, Ch 7-12 Formulas, Ch 8-12 Notes

@regstuff
regstuff / Cosmology_all_formulas_7-12.md
Last active July 19, 2026 09:43
Ch 7-12 All cosmology formulas from Ryden's book

Barbara Ryden — Introduction to Cosmology (2nd ed., 2016) — All Formulas Ch 7-12

How to read this list

  • Equation numbers (N.m) are the book's own numbering (stable across printings).
  • Page numbers refer to this PDF's page index, not the printed Cambridge page numbers (the file is a calibre EPUB→PDF conversion, so the two differ).

Contents

@regstuff
regstuff / Cosmology_all_formulas_2-6.md
Last active July 19, 2026 09:43
Ch 2-6 All cosmology formulas from Ryden's book

Barbara Ryden — Introduction to Cosmology (2nd ed., 2016) — All Formulas

How to read this list

  • Equation numbers (N.m) are the book's own numbering (stable across printings).
  • Page numbers refer to this PDF's page index, not the printed Cambridge page numbers (the file is a calibre EPUB→PDF conversion, so the two differ).

Contents