{ "schema": "wai.quantum.exercise/1", "id": "bit-order", "translations": { "zh-CN": "machine-assisted: to be reviewed by a fluent reader before it is advertised" }, "title": { "en": "Reading the bits", "zh-CN": "读懂比特的顺序" }, "task": { "en": "Two qubits, measured into c. Make the outcome 10 every time: c[1] is 1 and c[0] is 0.", "zh-CN": "两个量子比特,测量到 c 中。让结果每次都是 10:c[1] 为 1,c[0] 为 0。" }, "starter": [ "OPENQASM 3.0;", "include \"stdgates.inc\";", "qubit[2] q;", "bit[2] c;", "// your gates here", "c = measure q;" ], "intent": { "distribution": { "10": 1.0 } }, "hints": { "en": [ "An outcome is written with the highest bit first: in 10, the 1 is c[1].", "c = measure q writes q[0] into c[0] and q[1] into c[1]. Which qubit must end in |1⟩?" ], "zh-CN": [ "结果按最高位在前的顺序书写:在 10 中,1 是 c[1]。", "c = measure q 把 q[0] 写入 c[0],把 q[1] 写入 c[1]。哪个量子比特最后必须处于 |1⟩?" ] }, "reference": [ "OPENQASM 3.0;", "include \"stdgates.inc\";", "qubit[2] q;", "bit[2] c;", "x q[1];", "c = measure q;" ], "wrong": [ { "fails": "intent", "note": "the flip on q[0] gives 01, the lowest bit", "qasm": ["OPENQASM 3.0;", "include \"stdgates.inc\";", "qubit[2] q;", "bit[2] c;", "x q[0];", "c = measure q;"] } ] }