Keeping a quantum bit alive by optimized pi-pulse sequences.