Strongly correlated quantum impurity problems appear in a wide variety of contexts ranging from nanoscience and surface physics to material science and the theory of strongly correlated lattice models, where they appear as auxiliary systems within dynamical mean-field theory. Accurate and unbiased solutions must usually be obtained numerically, and continuous-time quantum Monte Carlo algorithms, a family of algorithms based on the stochastic sampling of partition function expansions, perform well for such systems. With the present paper we provide an efficient and generic implementation of the hybridization expansion quantum impurity solver, based on the segment representation. We provide a complete implementation featuring most of the recently developed extensions and optimizations. Our implementation allows one to treat retarded interactions and provides generalized measurement routines based on improved estimators for the self-energy and for vertex functions. The solver is embedded in the ALPS-DMFT application package. Program summaryProgram title: ct-hybCatalogue identifier: AEOL_v1_0Program summary URL:http://cpc.cs.qub.ac.uk/summaries/AEOL_v1_0.htmlProgram obtainable from: CPC Program Library, Queen’s University, Belfast, N. IrelandLicensing provisions: Use of the hybridization expansion impurity solvers requires citation of this paper. Use of any ALPS program requires citation of the ALPS [1] paper.No. of lines in distributed program, including test data, etc.: 650044No. of bytes in distributed program, including test data, etc.: 20553265Distribution format: tar.gzProgramming language: C++/Python.Computer: Desktop PC, high-performance computers.Operating system: Unix, Linux, OSX, Windows.Has the code been vectorized or parallelized?: Yes, MPI parallelized.RAM: 1 GBClassification: 7.3.External routines: ALPS [1, 2, 3], BLAS [4, 5], LAPACK [6], HDF5 [7]Nature of problem:Quantum impurity models were originally introduced to describe a magnetic transition metal ion in a non-magnetic host metal. They are widely used today. In nanoscience they serve as representations of quantum dots and molecular conductors. In condensed matter physics, they are playing an increasingly important role in the description of strongly correlated electron materials, where the complicated many-body problem is mapped onto an auxiliary quantum impurity model in the context of dynamical mean-field theory, and its cluster and diagrammatic extensions. They still constitutes a non-trivial many-body problem, which takes into account the (possibly retarded) interaction between electrons occupying the impurity site. Electrons are allowed to dynamically hop on and off the impurity site, which is described by a time-dependent hybridization function.Solution method:The quantum impurity model is solved using a continuous-time quantum Monte Carlo algorithm which is based on a perturbation expansion of the partition function in the impurity–bath hybridization. Monte Carlo configurations are represented as segments on the imaginary time interval and individual terms correspond to Feynman diagrams which are stochastically sampled to all orders using a Metropolis algorithm. For a detailed review on the method, we refer the reader to [8].Running time:1–8 h.