We determine explicit variational expressions for the quantum free energy of mean-field spin glasses in a transversal magnetic field, whose glass interaction is given by a hierarchical Gaussian potential as in Derrida's generalized random energy model (GREM), its continuous version (CREM), or the nonhierarchical GREM. The corresponding phase diagrams, which generally include glass transitions as well as transitions to quantum paramagnetic and mixed quantum-classical phases, are discussed. In the glass phase, the free energy is generally determined by both the parameters of the classical model and the transversal field. MSC2020: 82B44, 82D30.