{ "schema": "wai.quantum.exercise/1", "id": "first-circuit", "translations": { "zh-CN": "machine-assisted: to be reviewed by a fluent reader before it is advertised" }, "title": { "en": "A qubit, a gate, a measurement", "zh-CN": "一个量子比特、一个门、一次测量" }, "task": { "en": "One qubit starts in |0⟩. Add one gate so that measuring it gives 1 every time.", "zh-CN": "一个量子比特从 |0⟩ 开始。加一个门,使测量结果每次都是 1。" }, "starter": [ "OPENQASM 3.0;", "include \"stdgates.inc\";", "qubit[1] q;", "bit[1] c;", "// your gate here", "c = measure q;" ], "intent": { "distribution": { "1": 1.0 } }, "hints": { "en": [ "A measurement of |0⟩ always gives 0. What gate takes |0⟩ to |1⟩?", "The gate is the quantum version of a NOT: its name is one letter." ], "zh-CN": [ "测量 |0⟩ 总是得到 0。哪个门能把 |0⟩ 变成 |1⟩?", "这个门是经典“非”运算的量子版本,名字只有一个字母。" ] }, "reference": [ "OPENQASM 3.0;", "include \"stdgates.inc\";", "qubit[1] q;", "bit[1] c;", "x q[0];", "c = measure q;" ], "wrong": [ { "fails": "intent", "note": "a Hadamard gives 0 or 1 by chance, not 1 every time", "qasm": ["OPENQASM 3.0;", "include \"stdgates.inc\";", "qubit[1] q;", "bit[1] c;", "h q[0];", "c = measure q;"] }, { "fails": "refused", "note": "a gate the reader does not know", "qasm": ["OPENQASM 3.0;", "include \"stdgates.inc\";", "qubit[1] q;", "bit[1] c;", "not q[0];", "c = measure q;"] } ] }