L, where L is a normalization factor along the length of the NW, and k is the wavevector along the NW axis. Expressing Ψ n (r) in terms of reduced variables requires some care, since the HADOKEN code numerically calculates the wavefunctions ψ n ( x, ỹ) and normalizes them over the NW cross-section in the reduced coordinates x and ỹ. Quantum mechanics requires dx dy |ψ n (x, y)| 2 = 1 in the unscaled coordinates; however, the HADOKEN code uses the normalization convention d x d ỹ |ψ n ( x, ỹ)| 2 = 1 in reduced coordinates (the normalization constant is calculated as one of the outputs in normalize_and_sqrt_m_triangular.m). To satisfy both of these constraints we must define ψ n (x, y) = ψ n ( x, ỹ)/ℓ 0 . Therefore, in terms of the reduced coordinates, the envelope wavefunction in Eq. ( ) becomes