Quasisymmetric functions and Heisenberg doubles