Array of complex numbers to normalize
Minimum norm threshold below which the vector is considered zero (default: 1e-12)
Optional
tolerant: numberOptional minimum norm threshold. If provided, normalization is skipped if norm <= threshold.
Normalized amplitude array, or unchanged if below tolerant threshold
Normalizes an array of complex numbers to ensure they form valid quantum amplitudes. The normalized amplitudes will satisfy Σ|αᵢ|² = 1. Optionally skips normalization if the norm is below a threshold.