Hilbert space truncation is the finite approximation to an infinite Hilbert space. Each qubit is embedded in a harmonic oscillator Hilbert space (charge or phase basis) with infinite dimension. Numerically, we truncate to a finite cutoff: $n_{\text{cut}}$ for transmons means we keep basis states $|0\rangle, |1\rangle, \ldots, |n_{\text{cut}}\rangle$.
Truncation error: if the true spectrum extends beyond $n_{\text{cut}}$, we lose information about higher levels and matrix elements.
from scqubits import Transmon # Truncation at different cutoffs transmon_small = Transmon(EJ=15.0, EC=0.3, ncut=10) transmon_large = Transmon(EJ=15.0, EC=0.3, ncut=50) # Frequencies should converge print(transmon_small.f_01()) # Slightly off print(transmon_large.f_01()) # More accurate # Check convergence: increase ncut until results stabilize for ncut in [10, 20, 30, 40, 50]: transmon = Transmon(EJ=15.0, EC=0.3, ncut=ncut) print(f"ncut={ncut}: f_01={transmon.f_01():.6f}")
Too small: inaccurate eigenfrequencies, missing matrix elements
Too large: computationally expensive (diagonalization scales as $n^3$)
Practical rule: increase $n_{\text{cut}}$ until observable quantities converge. For transmons, $n_{\text{cut}} \sim 30–50$ usually suffices. For high-frequency qubits or with strong drives, use larger cutoffs.
scqubits handles this automatically but warns if truncation is suspect.