  A versatile and efficient variational approach is developed to solve in- and
out-of-equilibrium problems of generic quantum spin-impurity systems. Employing
the discrete symmetry hidden in spin-impurity models, we present a new
canonical transformation that completely decouples the impurity and bath
degrees of freedom. Combining it with Gaussian states, we present a family of
many-body states to efficiently encode nontrivial impurity-bath correlations.
We demonstrate its successful application to the anisotropic and two-lead Kondo
models by studying their spatiotemporal dynamics and universal behavior in the
correlations, relaxation times and the differential conductance. We compare
them to previous analytical and numerical results. In particular, we apply our
method to study new types of nonequilibrium phenomena that have not been
studied by other methods, such as long-time crossover in the ferromagnetic
easy-plane Kondo model. The present approach will be applicable to a variety of
unsolved problems in solid-state and ultracold-atomic systems.
