Skip to main content
Problem List
Q29.Bernstein-Vazirani 2-Bit Hidden String s = "11"PremiumHard

Q29.Bernstein-Vazirani 2-Bit Hidden String s = "11"Premium Question

Quantum ParallelismQubits: 3Q
Find the secret 2-bit string s=11s = 11 with a single quantum oracle evaluation on 3 qubits (q0q_{0}, q1q_{1} inputs, q2q_{2} ancilla).
Target Objective:
Prepare q2q_{2} in ∣−⟩|-\rangle, put q0q_{0},q1q_{1} in ∣+⟩|+\rangle, apply CNOT(0->2) and CNOT(1->2) to query the oracle, then apply Hadamard on q0q_{0},q1q_{1} to measure state ∣111⟩|111\rangle.
Judge Acceptance Criteria:

Measurement probability for designated basis state must reach ≥ 95%.

Gates:
q[0]|0⟩
S0
S1
S2
S3
S4
S5
S6
S7
q[1]|0⟩
S0
S1
S2
S3
S4
S5
S6
S7
q[2]|0⟩
S0
S1
S2
S3
S4
S5
S6
S7
Live Python / Qiskit Code (Edit to Update Circuit)
 
Type Qiskit Python code above to update gates on wires automatically0 gates · 3Q
0 gates placed3 Qubits · 8 Steps
State Measurement Distribution:8 non-zero basis states
|100⟩0.0%
|101⟩0.0%
|110⟩0.0%
|111⟩0.0%
|000⟩100.0%
|001⟩0.0%
|010⟩0.0%
|011⟩0.0%