cirq.bit_flip

Construct a BitFlipChannel that flips a qubit state with probability p.

Used in the notebooks

If p is None, this returns a guaranteed flip in the form of an X operation.

This channel evolves a density matrix via

ρM0ρM0+M1ρM1

With

M0=1p[1001]M1=p[0110]

p the probability of a bit flip.

ValueError if p is not a valid probability.