Let $\mathfrak{h} = \mathbb{C}^d$. Suppose we have two sets of (not necessarily orthonormal) vectors $\{u_1, \cdots, u_n\}$ and $\{v_1, \cdots, v_n\}$. What are the basic underlying properties of these set of vectors such that we can construct a unitary operator $U \in \mathcal{U}(\mathfrak{h})$, where $U.u_j = v_j$ for each $j$. If such a unitary exists, what is the construction.
Similarly what can we say about the analogous question for any separable Hilbert space $\mathfrak{h}$ (need not be of finite dimension).
Advanced thanks for any comment/suggestion/idea.
Note that if such a unitary operator $U$ exists, we have
$$ \langle v_i, v_j \rangle = \langle v_i, U u_j \rangle = \langle U^{-1}v_i, u_j \rangle = \langle u_i, u_j \rangle. $$ To investigate whether this is a sufficient condition, we continue as follows. Suppose $\langle v_i,v_j \rangle = \langle u_i, u_j \rangle$, we can define $U$ on $V = \text{span}\{ u_i \}$ by $U u_i = v_i$ and on $V^\perp$ by $Ux = x$ for every $x \in V^\perp$. Now we have for any $y \in V$ and $z \in V^\perp$ that $$\langle Uy, z \rangle = \langle y, U^{-1}z \rangle = \langle y, z \rangle =0.$$ So $U(V) \subset V$. Note that we can write every vector $x \in H$ as follows $x= y+z$ where $y \in V$ and $z \in V^\perp$. Then we have by construction $$ \langle Ux, Ux \rangle = \langle Uy +z, Uy + z \rangle = \langle Uy, U y \rangle + \langle z, z \rangle = \langle y, y \rangle + \langle z, z \rangle, $$ so the operator is unitary.