Superposition

Loaded Twin Coins

Difficulty: Easy ★

Two quantum coins are rigged: they always land the same way, and they land heads (1) together with probability p. Flipping each coin with its own bias does not work, because the outcomes have to be perfectly correlated.

Objective

biased_twins(p) returns a two-qubit circuit with measurement probabilities P(00) = 1 - p, P(11) = p and P(01) = P(10) = 0.

Constraints

  • Allowed gates: ry, cx.

Entry Point

biased_twins

Checks

  • Exports biased_twins(p).
  • Outcome distribution matches for p in {0, 0.25, 0.5, 0.9, 1}.

Your Code

Outputpending

Execution results will appear here.