This paper is dedicated to the memory of Martti Salomaa.Quantum optimal control theory is applied to two and three coupled Josephson charge qubits. It is shown that by using shaped pulses a cnot gate can be obtained with a trace fidelity > 0.99999 for the two qubits, and even when including higher charge states, the leakage is below 1%. Yet, the required time is only a fifth of the pioneering experiment [1] for otherwise identical parameters. The controls have palindromic smooth time courses representable by superpositions of a few harmonics. We outline schemes to generate these shaped pulses such as simple network synthesis. The approach is easy to generalise to larger systems as shown by a fast realisation of Toffoli's gate in three linearly coupled charge qubits. Thus it is to be anticipated that this method will find wide application in coherent quantum control of systems with finite degrees of freedom whose dynamics are Liealgebraically closed.PACS numbers: 85.25. Cp, 82.65.Jn, 03.67.Lx, 85.35.Gv In view of Hamiltonian simulation and quantum computation recent years have seen an increasing amount of quantum systems that can be coherently controlled. Next to natural microscopic quantum systems, a particular attractive candidate for scalable setups are superconducting devices based on Josephson junctions [2]. Due to the ubiquitous bath degrees of freedom in the solid-state environment, the time over which quantum coherence can be maintained remains limited, although significant progress has been achieved [3,4]. Yet, it is a challenge how to produce accurate quantum gates, and how to minimize their duration such that the number of possible operations within T 2 meets the error correction threshold. Concomitantly, progress has been made in applying optimal control techniques to steer quantum systems [5] in a robust, relaxation-minimising [6] or timeoptimal way [7]. Spin systems are a particularly powerful paradigm of quantum systems [8]: under mild conditions they are fully controllable, i.e., local and universal quantum gates can be implemented. In N spins-1 2 it suffices that (i) all spins can be addressed selectively by rf-pulses and (ii) that the spins form an arbitrary connected graph of weak coupling interactions. The optimal control techniques of spin systems can be extended to pseudo-spin systems, such as charge or flux states in superconducting setups, provided their Hamiltonian dynamics can be approximated to sufficient accuracy by a closed Lie algebra, e.g., in a system of N qubits su(2 N ).As a practically relevant and illustrative example, we consider two capacitively coupled charge qubits controlled by DC pulses as in Ref. [1]. The infinitedimensional Hilbert space of charge states in the device can be projected to its low-energy part defined by zero or one excess charge on the respective islands [2]. Identifying these charges as pseudo-spin states, the Hamiltonian can be written as H tot = H drift + H control , where the drift or static part reads (for the constants see caption to Fig. 1)while...