  The thermal Sunyaev-Zel'dovich (tSZ) and the kinematic Sunyaev-Zel'dovich
(kSZ) effects trace the distribution of electron pressure and momentum in the
hot Universe. These observables depend on rich multi-scale physics, thus,
simulated maps should ideally be based on calculations that capture baryonic
feedback effects such as cooling, star formation, and other complex processes.
In this paper, we train deep convolutional neural networks with a U-Net
architecture to map from the three-dimensional distribution of dark matter to
electron density, momentum and pressure at ~ 100 kpc resolution. These networks
are trained on a combination of the TNG300 volume and a set of cluster zoom-in
simulations from the IllustrisTNG project. The neural nets are able to
reproduce the power spectrum, one-point probability distribution function,
bispectrum, and cross-correlation coefficients of the simulations more
accurately than the state-of-the-art semi-analytical models. Our approach
offers a route to capture the richness of a full cosmological hydrodynamical
simulation of galaxy formation with the speed of an analytical calculation.
