Skip to main content
Problem List
Q62.Hidden Shift: Transform the Shifted OraclePremiumHard

Q62.Hidden Shift: Transform the Shifted OraclePremium Question

Oracle AlgorithmsQubits: 4Q
For the four-bit function f(x)=x0x1⊕x2x3f(x) = x_0 x_1 \oplus x_2 x_3 and shift s=1010s = 1010, query g(x)=f(x⊕s)g(x) = f(x \oplus s) on a uniform superposition and apply a Hadamard layer. The result carries the signs (−1)s⋅y(-1)^{s \cdot y} on top of the spectrum of ff.
Target Objective:
Apply Hadamards to all four qubits, then the shifted oracle (XX on Qubits 1 and 3, CZ(0,1) and CZ(2,3), XX on Qubits 1 and 3 again), then Hadamards to all four qubits.
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%