  In a typical quantum circuit, nonlocal quantum gates are applied to
nonproximal qubits. If the underlying physical interactions are short-range
(e.g., exchange interactions between spins), intermediate swap operations must
be introduced, thus increasing the circuit depth. Here we develop a class of
"mediated" gates for spin qubits, which act on nonproximal spins via
intermediate ancilla qubits. At the end of the operation, the ancillae return
to their initial states. We show how these mediated gates can be used (1) to
generate arbitrary quantum states and (2) to construct arbitrary quantum gates.
We provide some explicit examples of circuits that generate common states
[e.g., Bell, Greenberger-Horne-Zeilinger (GHZ), W, and cluster states] and
gates (e.g.,square-root-SWAP, SWAP, CNOT, and Toffoli gates). We show that the
depths of these circuits are often shorter than those of conventional
swap-based circuits. We also provide an explicit experimental proposal for
implementing a mediated gate in a triple-quantum-dot system.
