21c62a3Quantum optics in numbl: companion to arXiv:2309.14354Jeremy Magland 1% Higher number state |20> (Sec. II.A)
2% To represent |n>, the field dimension d must be larger than n.
4clear; % Clear memory
5clc; % Clear the command window/screen
6d = 21; % dimension of the field (must exceed 20)
7I = eye(d); % Identity matrix of dimension d
8Ket20 = I(:,21) % number state |20>: 21st column of the identity matrix