  Simulation of continuous time evolution requires time discretization on both
classical and quantum computers. A finer time step improves simulation
precision, but it inevitably leads to increased computational efforts. This is
particularly costly for today's noisy intermediate scale quantum computers,
where notable gate imperfections limit the circuit depth that can be executed
at a given accuracy. Classical adaptive solvers are well-developed to save
numerical computation times. However, it remains an outstanding challenge to
make optimal usage of the available quantum resources by means of adaptive time
steps. Here, we introduce a quantum algorithm to solve this problem, providing
a controlled solution of the quantum many-body dynamics of local observables.
The key conceptual element of our algorithm is a feedback loop which
self-corrects the simulation errors by adapting time steps, thereby
significantly outperforming conventional Trotter schemes on a fundamental level
and reducing the circuit depth. It even allows for a controlled asymptotic
long-time error, where usual Trotterized dynamics is facing difficulties.
Another key advantage of our quantum algorithm is that any desired conservation
law can be included in the self-correcting feedback loop, which has potentially
a wide range of applicability. We demonstrate the capabilities by enforcing
gauge invariance which is crucial for a faithful and long-sought quantum
simulation of lattice gauge theories. Our algorithm can be potentially useful
on a more general level whenever time discretization is involved concerning,
for instance, also numerical approaches based on time-evolving block decimation
methods.
