Skip to main content
Problem List
Q26.Deutsch Oracle: Constant-1 Function f(x) = 1Medium

Q26.Deutsch Oracle: Constant-1 Function f(x) = 1

Quantum ParallelismQubits: 2Q
Implement Deutsch algorithm for oracle f(x)=1f(x)=1, which applies an unconditional bit-flip (Pauli-X) on the ancilla qubit.
Target Objective:
Prepare ancilla Q1 in |-\rangle, put Q0 in +|+\rangle, apply Pauli-X on Q1 as the oracle, and apply Hadamard on Q0 to measure 0|0\rangle with 100% probability.
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
Click slot to place selected gate. Right-click to remove.0 gates in circuit
Click "Submit" in the top bar to run automated test cases against your circuit.