  We apply the quantum optimal control theory based on the Krotov method to
implement single-qubit $X$ and $Z$ gates and two-qubit CNOT gates for
inductively coupled superconducting flux qubits with fixed qubit transition
frequencies and fixed off-diagonal qubit-qubit coupling. Our scheme that shares
the same advantage of other directly coupling schemes requires no additional
coupler subcircuit and control lines. The control lines needed are only for the
manipulation of individual qubits (e.g., a time-dependent magnetic flux or
field applied on each qubit). The qubits are operated at the optimal coherence
points and the gate operation times (single-qubit gates $< 1$ ns; CNOT gates
$\sim 2$ ns) are much shorter than the corresponding qubit decoherence time. A
CNOT gate or other general quantum gates can be implemented in a single run of
pulse sequence rather than being decomposed into several single-qubit and some
entangled two-qubit operations in series by composite pulse sequences. Quantum
gates constructed via our scheme are all with very high fidelity (very low
error) as our optimal control scheme takes into account the fixed qubit
detuning and fixed two-qubit interaction as well as all other time-dependent
magnetic-field-induced single-qubit interactions and two-qubit couplings. The
effect of leakage to higher energy-level states and the effect of qubit
decoherence on the quantum gate operations are also discussed.
