Quantum nondemolition measurement of a superconducting qubit in the weakly projective regime.