  We present a novel automated technique for parallelizing quantum circuits via
forward and backward translation to measurement-based quantum computing
patterns and analyze the trade off in terms of depth and space complexity. As a
result we distinguish a class of polynomial depth circuits that can be
parallelized to logarithmic depth while adding only polynomial many auxiliary
qubits. In particular, we provide for the first time a full characterization of
patterns with flow of arbitrary depth, based on the notion of influencing paths
and a simple rewriting system on the angles of the measurement. Our method
leads to insightful knowledge for constructing parallel circuits and as
applications, we demonstrate several constant and logarithmic depth circuits.
Furthermore, we prove a logarithmic separation in terms of quantum depth
between the quantum circuit model and the measurement-based model.
