A Simple and General Equation for Matrix Product Unitary Generation