Experimental realization of post-selected weak measurements on an NMR quantum processor

The ability to post-select the outcomes of an experiment is a useful theoretical concept and experimental tool. In the context of weak measurements post-selection can lead to surprising results such as complex weak values outside the range of eigenvalues. Usually post-selection is realized by a projective measurement, which is hard to implement in ensemble systems such as NMR. We demonstrate the first experiment of a weak measurement with post-selection on an NMR quantum information processor. Our setup is used for measuring complex weak values and weak values outside the range of eigenvalues. The scheme for overcoming the problem of post-selection in an ensemble quantum computer is general and can be applied to any circuit-based implementation. This experiment paves the way for studying and exploiting post-selection and weak measurements in systems where projective measurements are hard to realize experimentally.

post-selection. By post-selecting, experimenters condition their statistics only on those experiments that (will) meet a certain criteria such as the result of a projective measurement performed at the end of the experiment. Such conditioning produces a number of surprising effects like strange weak values [2] and nonlinear quantum gates [3]. Although they are sometimes described via quantum circuits, experiments involving post-selection are usually implemented in a dedicated setup which is not intended to act as a universal quantum processor. For example in current optical implementations [4,5] the addition of more gates would require extra hardware.
Nowadays, implementations of quantum computing tasks in NMR architectures provide a good test-bed for up to 12 qubits [6]. Universal quantum circuits can be implemented on mid-scale (5-7 qubit) NMR quantum computers with the development of high-fidelity control [7]. However, the difficulty in performing projective measurements poses a handicap with the implementation of circuits involving post-selection. Here we will show how to overcome this difficulty theoretically and experimentally, in the setting of weak measurements.
Weak measurements provide an elegant way to learn something about a quantum system S in the interval between preparation and post-selection [8]. When the interaction between S and a measuring device M is weak enough, the back-action is negligible [9]. Moreover the effective evolution of the measuring device during the measurement is proportional to a weak value, a complex number which is a function of the pre-selection, post-selection and the desired observable. These weak values allow us to make statements that would otherwise be in the realm of counterfactuals [10,11]. Weak values have been interpreted as complex probabilities [12] and/or element of reality [13] and, although somewhat controversial [14][15][16], they are used to describe a number of fundamental issues in quantum mechanics including: Non-locality in the two slit experiment [9], the trajectories of photons [17], the reality of the wave function [18], Hardy's paradox [10,11,19], the three box paradox [8,13,20], measurement precision-disturbance relations [5,21] and the Leggett-Garg inequality [22][23][24]. Recently the amplification effect associated with large real and imaginary weak values was used in practical schemes for precision measurements. While these schemes cannot overcome the limits imposed by quantum mechanics, they can be used to improve precision under various types of operational imitations such as technical noise [25].
Experimental realizations of weak measurements have so far been limited to optics with only a few recent exceptions [24,26]. In all cases post-selection was done using projective measurements that physically select events with successful post-selection. Optical experiments (e.g ref. [27]) exploit the fact that one degree of freedom can be used as the system while another (usually a continuous degree of freedom) can be used as the measuring device. Post-selection is achieved by filtering out photons that fail post-selection and the readout is done at the end only on the surviving systems. This type of filtering is outside the scope of ensemble quantum computers where all operations apart from the final ensemble measurement are unitary. One can overcome the difficulty by either including a physical filter or by finding some way for post-selection using unitary operations. The former poses a technical challenge as well as a conceptual deviation from the circuit model. In what follows we show how to perform the latter by resetting the measuring device each time post-selection fails. Our theoretical proposal is compatible with a number of current implementation of quantum processors such as such as liquid and solid state NMR [6,[28][29][30], electron spin qubits [31,32] and rare earth crystal implementations [33].
We begin by describing the weak measurement process for qubits and the theoretical circuit for weak measurements on an ensemble quantum computer (Fig. 1). Next we describe our experiment in detail (Fig. 2). We demonstrate two properties of weak values associated with post-selection: weak values outside the range of eigenvalues and imaginary weak values (Figs. 3,4). We conclude with a discussion of future applications

II. WEAK MEASUREMENTS
The weak measurement procedure (for qubits) [34] involves a system S qubit initially prepared in the state |ψ S and a measuring device qubit initially in the state |M i M such that M i | σ z |M i = 0.
The system and measuring device are coupled for a very short time via the interaction Hamiltonian z with the coupling constant g << 1 and σn =n · σ a Pauli observable in the directionn. This is followed by a projective (post-selection) measurement on S with outcome |φ S .
Up to normalization we have The unnormalized state of M at the end is where is the weak value of σn. We can now take the weak measurement approximation |g{σn} w | << 1 so that up to first order in g we have The measurement device is rotated by g{σn} w around the z-axis. Note that this is the actual unitary evolution (at this approximation), not an average unitary. If we set the measuring device to be in the initial state 1 Choosingm appropriately we can get the real or imaginary part of the weak value.
The scheme above is based on the fact that S was post-selected in the correct state |φ . Since this cannot be guaranteed in an experiment, we need to somehow disregard those events where post-selection fails. As noted previously, the standard method for implementing the post-selection is by filtering out the composite S, M systems that fail post-selection. While this is relatively simple in some implementations it is not a generic property of a quantum processor. In particular post-selection is not implicit in the circuit model. The method to overcome this problem is to reset the measuring device whenever post-selection fails.
One way to implement the controlled reset (see Fig. 1) is by using a controlled depolarizing gate with the following properties where ρ M is an arbitrary state and |φ ⊥ S is the orthogonal state to the post-selection φ ⊥ |φ = 0.
This gate is not unitary and requires an ancillary system A. It can be constructed by setting ρ A = 1 1/2 and using a controlled-SWAP with the swap between A and M. To keep the control in the computational basis, we preceded the controlled-SWAP gate by U S † φ where U φ |0 = |φ . At the readout stage we need to measure the observable |0 0| which will give the probability of post-selection p 0 as well as σ M m . Finally we divide σ M m by p 0 to obtain the weak value.
If we are only interested in reading out the real or imaginary part of the weak value we can further simplify this operation by a controlled dephasing in a complementary basis to σ M m . This allows us to replace the controlled-SWAP by a controlled-controlled-phase with M as the target and A, S as the control (see Fig. 2b). In our experimental setup we used the latter (simplified) approach. A controlled-controlled-σ z was used in the post-selection for measuring real weak values and controlled-controlled-σ x was used for complex weak values.

III. EXPERIMENTAL IMPLEMENTATION
We conducted three types of experiments. In each experiment we prepared S in an initial state on the x − z plane, cos(θ) |0 S + sin(θ) |1 S , the weak measurement observable was a Pauli operator in the x−y plane, cos(α)σ S x +sin(α)σ S y and the post-selection was always the |0 S state. In the first experiment (Fig. 3b) we set α = 0 to make a measurement of σ x and varied the coupling strength from g = 0.05 to g = 0.7. We used three different initial states: θ = π/4 -corresponding to a measurement where the weak value coincides with the result of a projective (g = π/4) measurement, θ = 1.2 -where we were able to observe a large weak value,{σ x } w = 2.57, at g = 0.05 , and θ = 1.4 -where the weak value (first order) approximation is off by more than 10% at g = 0.05. Next we kept the coupling constant at g = 0.1 and varied over θ to observe real weak values both inside and outside the range of eigenvalues [−1, 1] (Fig. 4a). Finally we measured complex weak values with an absolute magnitude of 1 by keeping the initial state constant, θ = π/4, and varying over the measurement direction α at g = 0.1 (Fig. 4b).
All experiments were conducted on a Bruker DRX 700MHZ spectrometer at room temperature.
Our 3-qubit sample was 13 C labeled trichloroethylene (TCE) dissolved in d-chloroform. The structure of the molecule is shown in Fig. 2a, where we denote C1 as qubit 1, C2 as qubit 2, and H as qubit 3. The internal Hamiltonian of this system can be described as where ν j is the chemical shift of the jth spin and J ij is the scalar coupling strength between spins i and j. As the difference in frequencies between C1 and C2 is not large enough to adopt the (NMR [41]) weak J-coupling approximation [35], these two carbon spins are treated in the strongly coupled regime. The parameters of the Hamiltonian are obtained by iteratively fitting the calculated and observed spectra through perturbation, and shown in the table of Fig. 2a.
We label C1 as the ancilla A, C2 as the measuring device M, and H as the system S (Fig. 2b).
Each experiment can be divided into four parts: (A) Pre-selection: Initializing the ancilla to the identity matrix 1 1/2, the measurement device to 1/ √ 2(|0 +|1 ), and the system to cosθ|0 +sinθ|1 . for the imaginary part) and σ S z on the system. The experimental details of the four parts above are as follows.
(A) Pre-selection: Starting from the thermal equilibrium state, first we excite the ancilla C1 to the transverse field by a π/2 rotation, followed with a gradient pulse to destroy coherence leaving C1 in the maximally mixed state 1 1/2. Next we create the pseudopure state (PPS) of C2 (M) and H (S) with deviation 1 1⊗|00 00| using the spatial average technique [30]. For traceless observables and unital evolution the identity part of the PPS can be treated as noise on top of a pure state.
The spectra of the PPS followed by π/2 readout pulses are shown in the upper part of Fig. 3a.
The readout pulses are applied on C2 (left figure) and H (right figure), respectively. Two peaks are generated in the PPS spectra because C1 is in the maximally mixed state 1   on C2 and one R y (θ) = e −iθσy rotation on H. At the end of this procedure the state is (B) Weak measurement: The unitary operator to realize the weak measurement can be simulated by the interaction term σ 2 z σ 3 z between C2 and H using the average Hamiltonian theory [36]. However, since the internal Hamiltonian contains a strongly coupling term and the refocusing scheme requires the WAHUHA-4 sequence [37] we adopted the gradient ascent pulse engineering (GRAPE) technique [38,39] to improve the fidelity (see discussion below).
(C) Post-selection: In order to mimic the post-selection of |0 on the system spin H in NMR, we introduce an ancilla qubit C1 in the maximally mixed state 1 1. The controlled resetting noise operation is a controlled-controlled-σ z gate 1 If post-selection is successful, the measurement device will point to the weak value. Otherwise the measurement device will become dephased and the expectation value σ 2 y will be reset to 0. For the measurement of complex weak values we used a standard Toffoli and applied the same reasoning.
(D) Measurement: Finally we measure the expectation value σ 2 y on C2 and σ 3 z on H, to calculate the weak value by the expression For the imaginary part we similarly use σ 2 z . Since the timescales for the experiment are much shorter than T 1 the evolution is very close to unital.
In the experiment, the π/2 rotation of H is realized by the hard pulse with a duration of 10 µs.
All the other operations are implemented through GRAPE pulses to achieve high-fidelity control.
These GRAPE pulses are designed to be robust to the inhomogeneity of the magnetic field, and the imprecisions of the parameters in the Hamiltonian. For the two selective π/2 excitations on C1 and C2, the GRAPE pulses are generated with the length 1.5 ms, segments 300 and fidelity over 99.95%. These two pulses are only used for the preparation and observation of PPS. Besides these two GRAPE pulses, the PPS preparation involves another GRAPE pulse of 10 ms and 99.99% fidelity for the creation of two-body coherence. The top spectra in Fig. 3a are the PPS both on C2 and H, which are used as the benchmark for the following experiments.
The main body of the network shown in Fig. 2b, including the pre-selection, weak measurement and post-selection, is calculated by a single GRAPE pulse. Since we have to alter the initial state by θ and interaction strength g in the experiment, we have used different GRAPE pulses to implement the experiments with different group of parameters. All of these GRAPE pulses have the same length: 20 ms, and fidelity over 99.98%.
There are two essential advantages in utilizing the GRAPE pulses: reducing the error accumulated by the long pulse sequence if we directly decompose the network, and reducing the error caused by decoherence. Because the U w evolution is supposed to be very "weak", the intensity of the output signal is quite small. Moreover, the calculated weak values are more sensitive to the intensity of the signal, because the small g in the denominator (Eq 13) will amplify the errors in the experiment. Therefore, we need to achieve as accurate coherent control as we can to obtain precise experimental results. The direct decomposition of the original network requires many single rotations, as well as a relatively long evolution time. For example, an efficient way to decompose the controlled-controlled-σ z gate is by six CNOT gates and several one qubit gates [40], which requires more than 50 ms in our experimental condition. Therefore, using short GRAPE pulses of high fidelity we were able to decrease the potential errors due to decoherence and imperfect implementation of the long pulse sequence. Fig. 3a shows the experimental spectra compared with the simulated one in the case g = 0.05 and θ = 1.4. The top plots are the reference (PPS) spectra while the bottom are the spectra measured at the end of the experiment. The predicted value of σ 2 y in this case is only 1.67%. However, since the experimental spectra are very close to the simulated one, we can obtain a good result after extracting the data. The effects of decoherence in the case of small post-selection probabilities values can be seen in Fig. 3b where the experimental values are consistently lower than the theoretical predictions. Since decoherence reduces the expectation values the results of Eq (13) will be more sensitive to decoherence as σ 3 z → −1. In the first experiment we varied the interaction strength g = 0.05 to g = 0.7 for α = 0 and three different initial states θ = 1.4, θ = 1.2, and θ = π/4. We obtained the weak value through a final measurement of σ 2 y on the measuring device C2 and σ 3 z on the system H, respectively. The weak value {σ x } w was calculated through Eq (13), with the result shown in Fig. 3b. The In the second experiment we studied the behavior of measured weak values as a function of the initial state parameter θ at g = 0.1 and α = 0. The theoretical weak value should be tan(θ) (at g → 0). We compared our results with a theoretical curve at g = 0.1 (Fig. 4a). As expected this curve diverges from the weak value of tan(θ) as the overlap between the pre and post-selection vanishes and second order terms become more dominant. The experimental data matches with the smooth part of the curve. When θ is very close to π/2, we were unable to measure the extremely low NMR signals due to the signal-to-noise ratio(SNR) issues, moreover decoherence effects become more prominent at these values (see discussion above).
In the final experiment we measured both the real part and imaginary parts of the weak value ( Fig. 4b). We set θ = π/4 and g = 0.1, and changed α, the observable of the measuring device C2.
The expected weak values have an absolute magnitude of 1 and the overlap between the pre and post-selected state is 1/ √ 2. To measure the imaginary part, we replaced the controlled-controlledσ z gate in Fig. 2b with a controlled-controlled-σ x gate, and measured the expectation value σ 2 z on the measuring device C2. The other parts of the experiments remain the same. In Fig. 2b we can see the real part and imaginary part of the weak value along with the parameter α. The    without the weak measurement approximation, and the experimental data is denoted by red circles. As expected at π/4 < θ < π − π/4 we measure a relative shift outside the range of eigenvalues, −1 ≤ σ x ≤ 1.
As θ approached π/2 the signal was too weak to measure due to the low probability of post-selection. results match well with the theory.

IV. CONCLUSIONS AND OUTLOOK
Post-selection is a useful and interesting conceptual and practical tool. Its experimental implementations have so far been limited to dedicated quantum devices. Here we showed that this paradigm can be realized in a more general setting of a quantum circuit with unitary gates. We Our experiment involved a simple 3-qubit system and we were able to demonstrate the measurement of large (Fig 3b, 4a) and imaginary (Fig. 4b) weak values. We observed a shift of 2.33g with an accuracy of ±0.36g at θ = 1.2 for g = 0.05 compared with the theoretical weak value of 2.57g (at g → 0). The largest relative shift observed was 4.90g ± 0.37g for θ = 1.4 at g = 0.05 compared with a theoretical value of 5.8g. At this value the weak measurement approximation would require the interaction to be an order of magnitude smaller. For complex weak values we were able to demonstrate the full spectrum of complex weak values with unit absolute magnitude.
Our scheme has the advantage that it can be extended to systems with more qubits without significant changes. Implementations on a four qubit system will allow the first fully quantum implementation of the three box paradox and further extensions will allow more intricate experiments such as the measurement of the wave-function and measurement-disturbance relations which have so far been limited to optical implementations, often with classical light. The reasonably large number of qubits that can be manipulated in NMR systems will also allow more intricate experiments that are not possible in optics.
It remains an open question whether our techniques can be used for precision measurements in the same way as they are used in optics. Given that this is the first implementation of weak measurements in NMR there is still much to be explored.
We thank Marco Piani and Sadegh Raeisi for comments and discussion. This work was sup-