Solution (source code)

= Solution

If the Schmidt rank is one, the decomposition is $|\psi\rangle=|\alpha\rangle|\beta\rangle$ after absorbing its sole coefficient, so the state is a product. Conversely, a product state has coefficient <matrix> $X=ab^T$, which has rank one. Therefore a bipartite pure state is entangled exactly when its Schmidt rank is at least two.