We show that optimizing a quantum gate for an open quantum system requires the time
evolution of only three states irrespective of the dimension of Hilbert space. This
represents a significant reduction in computational resources compared to the complete
basis of Liouville space that is commonly believed necessary for this task. The
reduction is based on two observations: The target is not a general dynamical map but
a unitary operation; and the time evolution of two properly chosen states is
sufficient to distinguish any two unitaries. We illustrate gate optimization employing
a reduced set of states for a controlled phasegate with trapped atoms as qubit
carriers and a viSWAP gate with superconducting qubits.