{ "schema": "wai.quantum.exercise/1", "id": "rotation", "translations": { "zh-CN": "machine-assisted: to be reviewed by a fluent reader before it is advertised" }, "title": { "en": "Probabilities other than one half", "zh-CN": "不是二分之一的概率" }, "task": { "en": "One qubit. Make its measurement give 1 with probability exactly 1/4, using one rotation ry(θ).", "zh-CN": "一个量子比特。只用一个旋转门 ry(θ),让测量以恰好 1/4 的概率给出 1。" }, "starter": [ "OPENQASM 3.0;", "include \"stdgates.inc\";", "qubit[1] q;", "bit[1] c;", "ry(pi/2) q[0];", "c = measure q;" ], "intent": { "distribution": { "0": 0.75, "1": 0.25 } }, "constraints": { "allow": ["ry"], "counts": { "ry": { "min": 1, "max": 1 } } }, "hints": { "en": [ "After ry(θ) on |0⟩, the probability of 1 is sin²(θ/2).", "Which angle has a sine of one half?" ], "zh-CN": [ "对 |0⟩ 作用 ry(θ) 之后,得到 1 的概率是 sin²(θ/2)。", "哪个角的正弦等于二分之一?" ] }, "reference": [ "OPENQASM 3.0;", "include \"stdgates.inc\";", "qubit[1] q;", "bit[1] c;", "ry(pi/3) q[0];", "c = measure q;" ], "wrong": [ { "fails": "intent", "note": "θ = π/4 gives sin²(π/8), about 0.146", "qasm": ["OPENQASM 3.0;", "include \"stdgates.inc\";", "qubit[1] q;", "bit[1] c;", "ry(pi/4) q[0];", "c = measure q;"] }, { "fails": "constraint", "note": "two rotations where the exercise asks for one", "qasm": ["OPENQASM 3.0;", "include \"stdgates.inc\";", "qubit[1] q;", "bit[1] c;", "ry(pi/6) q[0];", "ry(pi/6) q[0];", "c = measure q;"] } ] }