  We use a gradient-based optimization scheme to find single-qubit rotations to
be interwoven between timesteps of a noisy logical two-qubit entangling gate in
order to suppress arbitrary logical and leakage errors in the two-qubit gate.
We show how the sequence fidelity is affected by imperfections in the
single-qubit operations, as well as by various relative strengths of the
logical and leakage noise. Our approach is completely general and
system-independent, allowing for application to any two-qubit system regardless
of the experimental implementation details.
