Skip to main content
Problem List
Q69.Quantum Kernel Between Two Data PointsMedium

Q69.Quantum Kernel Between Two Data Points

Variational & SimulationQubits: 2Q
Estimate k(x,x′)k(x, x') for x=(π/4,π/2)x = (\pi/4, \pi/2) and x′=(0,π/2)x' = (0, \pi/2) by encoding xx and un-encoding x′x'. The probability of ∣00⟩|00\rangle is the kernel value, cos⁡2(π/8)≈0.85\cos^2(\pi/8) \approx 0.85.
Target Objective:
Encode xx with TT on Qubit 0 and SS on Qubit 1, undo x′x' with S†=Z SS^\dagger = Z\,S on Qubit 1, and close with Hadamards.
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
Live Python / Qiskit Code (Edit to Update Circuit)
 
Type Qiskit Python code above to update gates on wires automatically0 gates · 2Q
0 gates placed2 Qubits · 8 Steps
State Measurement Distribution:4 non-zero basis states
|10⟩0.0%
|11⟩0.0%
|00⟩100.0%
|01⟩0.0%