{ "schema": "wai.quantum.exercise/1", "id": "ghz", "translations": { "zh-CN": "machine-assisted: to be reviewed by a fluent reader before it is advertised" }, "title": { "en": "Three in agreement, with the right sign", "zh-CN": "三个比特一致,而且符号正确" }, "task": { "en": "Three qubits. Prepare the state (|000⟩ + |111⟩)/√2, with a plus sign, and measure every qubit into c. The check compares the state itself, not only its outcomes.", "zh-CN": "三个量子比特。制备状态 (|000⟩ + |111⟩)/√2(加号),并把每个量子比特都测量到 c 中。检查比较的是状态本身,而不只是结果。" }, "starter": [ "OPENQASM 3.0;", "include \"stdgates.inc\";", "qubit[3] q;", "bit[3] c;", "// your gates here", "c = measure q;" ], "intent": { "prepares": "OPENQASM 3.0;\ninclude \"stdgates.inc\";\nqubit[3] q;\nbit[3] c;\nh q[0];\ncx q[0], q[1];\ncx q[0], q[2];\nc = measure q;\n" }, "hints": { "en": [ "Start from the Bell pair and bring a third qubit into the agreement.", "The state (|000⟩ − |111⟩)/√2 has the same outcomes and is a different state: watch for a stray z." ], "zh-CN": [ "从 Bell 对出发,再让第三个量子比特也加入这种一致。", "状态 (|000⟩ − |111⟩)/√2 的结果相同,却是另一个状态:留意多余的 z。" ] }, "reference": [ "OPENQASM 3.0;", "include \"stdgates.inc\";", "qubit[3] q;", "bit[3] c;", "h q[0];", "cx q[0], q[1];", "cx q[1], q[2];", "c = measure q;" ], "wrong": [ { "fails": "intent", "note": "the same outcomes with a minus sign: a different state", "qasm": ["OPENQASM 3.0;", "include \"stdgates.inc\";", "qubit[3] q;", "bit[3] c;", "h q[0];", "cx q[0], q[1];", "cx q[1], q[2];", "z q[0];", "c = measure q;"] }, { "fails": "intent", "note": "only two qubits agree", "qasm": ["OPENQASM 3.0;", "include \"stdgates.inc\";", "qubit[3] q;", "bit[3] c;", "h q[0];", "cx q[0], q[1];", "c = measure q;"] } ] }