  We design composite controlled-phase gates, which compensate errors in the
phase of a single gate. The errors can be of various nature, such as relative,
absolute or both. We present composite sequences which are robust to relative
errors up to the 6th order, with the number of the constituent gates growing
just linearly with the desired accuracy, and we describe a method to achieve
even higher accuracy. We show that the absolute error can be canceled entirely
with only two gates. We describe an ion-trap implementation of our composite
gates, in which simultaneous cancellation of the error in both the pulse area
and the detuning is achieved.
