Q60.Bernstein-Vazirani: Reveal s = 101Premium Question
Oracle AlgorithmsQubits: 4Q
Run the full Bernstein-Vazirani algorithm for the secret with inputs on Qubits 0-2 and the ancilla on Qubit 3. The register must end in .
Target Objective:
Set the ancilla to , apply Hadamards to all four qubits, add one CNOT to the ancilla for each 1 in the secret, and apply Hadamards to all four qubits again.
Judge Acceptance Criteria:
Statevector fidelity must reach ≥ 99.9% with the target unitary solution.
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
q[3]|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 · 4Q
0 gates placed4 Qubits · 8 Steps
State Measurement Distribution:16 non-zero basis states
|1000⟩0.0%
|1001⟩0.0%
|1010⟩0.0%
|1011⟩0.0%
|1100⟩0.0%
|1101⟩0.0%
|1110⟩0.0%
|1111⟩0.0%
|0000⟩100.0%
|0001⟩0.0%
|0010⟩0.0%
|0011⟩0.0%
|0100⟩0.0%
|0101⟩0.0%
|0110⟩0.0%
|0111⟩0.0%