A universal quantum circuit for variational quantum algorithms