The bulk viscosity determines dissipation during hydrodynamic expansion. It vanishes in scale invariant fluids, while a nonzero value quantifies the deviation from scale invariance. For the dilute Fermi gas the bulk viscosity is given exactly by the correlation function of the contact density of local pairs. As a consequence, scale invariance is broken purely by pair fluctuations. These fluctuations give rise also to logarithmic terms in the bulk viscosity of the high-temperature nondegenerate gas. For the quantum degenerate regime I report numerical Luttinger-Ward results for the contact correlator and the dynamical bulk viscosity throughout the BEC-BCS crossover. The ratio of bulk to shear viscosity ζ/η is found to exceed the kinetic theory prediction in the quantum degenerate regime. Near the superfluid phase transition the bulk viscosity is enhanced by critical fluctuations and has observable effects on dissipative heating, expansion dynamics and sound attenuation.The bulk viscosity is a fundamental transport property which determines friction and dissipation in fluids during hydrodynamic expansion [1,2]. In particular, scale invariant fluids can expand isotropically without dissipation and therefore have zero bulk viscosity [3]. In a generic interacting fluid, instead, a nonzero value of the bulk viscosity quantifies the breaking of scale invariance in physical systems ranging from QCD [4-7] to condensed matter [8][9][10][11][12][13][14]. An intriguing example is the twodimensional dilute Fermi gas, where the classical model is scale invariant but a quantum scale anomaly breaks this symmetry [15][16][17][18]; this has recently been observed via breathing dynamics in cold-atom experiments [19][20][21].The bulk viscosity is necessary to understand and predict the real-time evolution and hydrodynamic modes of dissipative quantum fluids and to quantitatively interpret current experiments. However, measurements of the bulk viscosity remain challenging even for classical fluids [22]. Now a novel experimental probe via the dissipative heating rate due to a change in scattering length has been proposed for atomic gases [14]. It is therefore important to compute the bulk viscosity theoretically for quantum gases, which moreover includes predictions for the classical gas in the high-temperature limit.The bulk viscosity is defined as the correlation function of local pressure (the trace of the stress tensor). Since it vanishes in a scale invariant system, only the scale breaking part of the pressure contributes, the so-called trace anomaly [14,23,24]. This provides a formal link between the breaking of scale invariance and bulk viscosity. The bulk viscosity of the nonrelativistic, strongly interacting Fermi gas has been calculated from kinetic theory in the nondegenerate high-temperature limit [11,12] and in the low-temperature superfluid state [25,26]. Its value is largest in the strongly coupled region of the BEC-BCS crossover [27] near unitarity, but not precisely at unitarity where is must vanish by scale invarianc...