1. A method for generating, in a quantum computer or nuclear magnetic resonance device, a fully-compensating composite pulse sequence of arbitrary accuracy, comprising the step of: wherein the composite pulse sequence, denoted by R φ [n] (θ), is a sequence of operations {M φ 1 (θ 1 ),. .. , M φ 1 (θ 1 )} such that R φ [n] (θ)=M φ 1 (θ 2 ). .. M φ 2 (θ 2 ). .. M φ 1 (θ 1 )=R φ(θ)+O(ε n +1), for unknown error ε, approximating R φ (−θε) by a product of operators R φ 1 (2k 1 πε).