Noise cancelling for quantum bits