Fig. 2: Encoding of three-qubit GHZ states and resonantly driven iToffoli gate.

a, Quantum circuit to generate three-qubit GHZ-class states. X (Y, Z) represents a π rotation about the x (y, z) axis and X/2 (Y/2, Z/2) represents a π/2 rotation about the x (y, z) axis. The two CNOT gates acting on the neighbouring qubits are implemented by the combination of single-qubit and two-qubit gates, as shown in the bottom half. The Y pulses in the middle of the sequence (surrounded by the purple box) are used to suppress the low-frequency single-qubit phase noise. b,c, Real parts of the measured density matrices of the three-qubit GHZ states (ϕ = 0 in b and ϕ = π in c). d, Result of the GHZ state generation for various input states. The solid black line shows the average of GHZ state fidelities, that is 0.866. The range above the threshold value 0.75 (0.5) to distinguish the GHZ-class states from the W-class (biseparable) states40 is shown as the coloured band. e, Schematic energy diagram of the three-spin state. f, Resonance peaks of Q2 for four different control qubit states at the exchange couplings J12 = J23 = 4.5 MHz. Here we define δf = 0 as the resonance condition when \({{\rm{Q}}}_{1}{{\rm{Q}}}_{3}=| \downarrow \downarrow \rangle \). The circles show the measured Q2 spin-up probabilities for the four different control qubit configurations. The solid lines show fitting with Gaussian functions. The traces are offset by 1 from each other for clarity. g, Schematic sequence of the measurement of the iToffoli gate truth table. h, Measurement result of the iToffoli gate truth table.