Skip to main content

Experimenting quantum phenomena on NISQ computers using high level quantum programming

Abstract

We execute the quantum eraser, the Elitzur–Vaidman bomb, and the Hardy’s paradox experiment using high-level programming language on a generic, gate-based superconducting quantum processor made publicly available by IBM. The quantum circuits for these experiments use a mixture of one-qubit and multi-qubit gates and require high entanglement gate accuracy. The results aligned with theoretical predictions of quantum mechanics to high confidence on circuits using up to 3 qubits. The power of quantum computers and high-level language as a platform for experimenting and studying quantum phenomena is henceforth demonstrated.

1 Introduction

Recent advances in quantum engineering have brought about the realization of quantum computers that perform key quantum algorithms satisfactorily and display gigantic potentials [1, 2]. This powerful Turing machine employs quantum superposition and entanglement to perform calculations. By entangling multiple qubits together, techniques such as quantum parallelism is achieved to provide exponential speedup for quantum algorithms over classical ones. Despite prospective impacts, it is tremendously difficult to build a practical quantum computer that is fault-tolerant [3]. The main technical obstacle lies in the fact that a quantum state is fragile to noise. It is hard to engineer a quantum system that is both well-controlled and long-lived. Termed NISQ for Noisy Intermediate Scale Quantum [4], these prototypes are not ready for real-life applications that require complexity and precision lying beyond our current state of the art.

At the moment, the leading candidate in hardware is perhaps superconducting circuits [5]. At its heart, the qubit comprises a collective state of electrons, condensed into a single quantum state, the Cooper pairs. This artificial quantum object can be freely designed and engineered, conveniently controlled using microwave pulses, and scalable using established nano-fabrications techniques. In this system, for example of a charge qubit [6], the quantum superposition is realized by a microwave pulse that places the tiny superconducting island at a potential that supports both N and \(N+1\) number of charges at the same time. This action is equivalent to a beamsplitter in a Mach–Zehnder interferometer (MZI) that splits the photon’s route into two uncertain paths. In the quantum circuit language, this is performed by a Hadamard gate with matrix form H= 1 2 [ 1 1 1 1 ] . In a transmon quantum processor [7], such as those provided by IBM [8], the error of a Hadamard gate is in the range of 10−3 to 10−4. Designed as a universal computing platform and programmed using high-level language through cloud access, there is a range of remarkable works performed on real devices with few qubits. They include the demonstration of important quantum algorithms [9, 10], simulation of quantum phenomena [1116], or reproducing foundation quantum experiences [1721].

Quantum physics is a generic theory that applies to any physical objects, such as photons, electrons, or artificial devices engineered in the lab. However, lying on the surface of a chip, the superconducting qubits have limited connectivity between neighbors. It is unclear if the entanglement of a collective quantum state induced by a metallic coupler is the same as that of genuine nature elements. In this work, we perform three fundamental experiments—those at the core of quantum physics—by programming the IBM NISQ computers. Using Python scripts written in Qiskit, we demonstrate that the quantum eraser, the Elitzur–Vaidman bomb, and the Hardy’s paradox experiments can be reproduced successfully on the same quantum processor. Originally proposed and realized in optical apparatuses, we showed that theoretically, these optical setups are equivalent to our quantum circuits. The quantum circuits are executed on real quantum computers with reasonable agreement [22]. The experimental deviations to the original results are associated with the erroneousness in the performance of the superconducting devices provided by IBM.

2 The quantum eraser

The quantum eraser experiment [2325] is a natural extension of the double-slit experiment that demonstrates the counter-intuitive nature of quantum physics—the wave-particle duality. In Fig. 1(a, d), the duality is eavesdropped on by using the Mach–Zehnder interferometer (MZI) apparatus with a spontaneous parametric down-conversion (SPDC) process. Upon passing the first beamsplitter (BS), the photon splits into an upper-path (red) and a lower-path (blue), which indicates the “which-path” information. These paths encounter the SPDC that generates an entangled “signal-idler” photons pair for each path, which are denoted as (s) and (i) in Fig. 1(a, d), respectively. The signals arrive at the second BS to interfere and are detected by D1, D2 detectors. The idlers are measured by D3 and D4 detectors. In Fig. 1(a), we measure them directly after the SPDC, which reveals the red-path or blue-path information by the clicking of D3 or D4, respectively. In this case, both D1 and D2 click with equal probability, which implies that there is a loss of interference in the signal photons. By observing the which-path information via idler photons, the interference in the signal photons is deleted; in other words, they behave as “particles.” In Fig. 1(d), the idlers are interfered with a BS before the measurement. Hence, the which-path information is “erased.” Jointly measuring D1,2 and D3,4 yields surprising results: only D1 and D3 click coincidentally but not for D2 and D3. It indicates that the interference in the signal photons produces a constructive signal at D1 and a destructive signal at D2. Inversely, only D2 and D4 click coincidentally but not for D1 and D4 detectors. The interference in the signal photons generates a constructive signal at D2 and a destructive signal at D1. Thus, by erasing the which-path information, we observe interference in signal photons; in other words, they behave as “waves.” The wave-particle duality depends on “our action” on the entangled counterparts. Termed quantum eraser, the phenomenon is verified for photons [2527], or surface acoustic phonons [28].

Figure 1
figure 1

In the quantum eraser experiment, we recover the interference pattern by choosing an appropriate measurement basis. (ad) The quantum eraser experiments using a Mach–Zehnder interferometer (MZI) and a spontaneous parametric down-conversion (SPDC), an alternative setup to the double-slit experiment: upon entering the first beamsplitter (BS), the original photon is split into upper-path (red) and lower-path (blue). Each path transforms into a signal-idler photons pair by passing through the SPDC. The signal photons (s) interfere at the second BS and are measured by D1(2). The idler photons are measured by D3(4) without an eraser in (a) and with an eraser in (d). (be) Quantum circuit for the experiment in (a, d), respectively. (cf) Experiment results obtained from the IBM Vigo quantum computer shown as blue bars and the theoretical value showed as red lines. The device error is estimated at 3.7%, while standard error from the mean of 8192 shots is minimal at 0.5%

This experiment can be written in the quantum circuit language [29] as showed in Fig. 1(b, e). Similar to the role of a BS in an optical setup, the first Hadamard gate splits the first qubit’s initial state \(|q_{0}\rangle =|0\rangle \) into \(|0\rangle \) and \(|1\rangle \) to represent the which-path information: \(|0\rangle \) ↔ red-path, and \(|1\rangle \) ↔ blue-path. Then, a CNOT gate entangles \(|q_{0}\rangle \) with the target \(|q_{1}\rangle \) qubit, which simulates the function of the SPDC. By resembling \(|q_{0}\rangle \) as the signals, a second Hadamard gate is applied on it to probe the interference patterns. The outcome of this quantum eraser experiment relies on qubit \(|q_{1}\rangle \), which plays the role of the idler photons. In Fig. 1(b), \(|q_{1}\rangle \) is measured right after the CNOT gate such that the which-path information can be verified. The measurement results are shown in Fig. 1(c), indicating no interference in both \(|q_{0}\rangle \) and \(|q_{1}\rangle \). Similarly, in Fig. 1(e), \(|q_{1}\rangle \) is measured after the action of the Hadamard gate. This is equivalent to the application of a BS on idler photons in Fig. 1(d). The which-path information is erased and interference patterns are detected in \(|q_{0}\rangle \), as can be seen from Fig. 1(f). Mathematically, it is simple to verify the equivalence between the quantum circuit and the optical MZI setup. Using matrix multiplication, it is straightforward to confirm that the circuit in Fig. 1(b) changes state \(|00\rangle \) to \(\frac{1}{2}(|00\rangle +|01\rangle +|10\rangle -|11\rangle \), while the circuit in Fig. 1(e) changes \(|00\rangle \) to \(\frac{1}{\sqrt{2}}(|00\rangle +|11\rangle \), in agreement with the optical MZI setup in Fig. 1(a, d), respectively. These results are confirmed by simulation results as solid lines on Fig. 1(c, f) and agree with the original proposal in the optical apparatus. We execute these circuits on IBM’s Vigo quantum computer by programming them using Qiskit [22]. In the non-erased experiment Fig. 1(c), the measurement probabilities for \(|00\rangle \), \(|01\rangle \), \(|10\rangle \), and \(|11\rangle \) are \(25.4\pm 0.9\%\), \(25.6\pm 0.9\%\), \(22.9\pm 0.8\%\), \(26.1\pm 1.0\%\), respectively. Compared to theoretical value of 25% for each state, the experiment results are quite closely matched. Similarly in the erased experiment Fig. 1(f), the corresponding probabilities are \(47.0\pm 1.7\%\), \(2.1\pm 0.1\%\), \(2.0\pm 0.1\%\), \(48.9\pm 1.8\%\), which resemble the theoretical distribution of 50%, 0%, 0%, 50%. It is possible to estimate errors from our quantum circuits in Fig. 1(b, e) due to gate and measurement errors. Using calibration values provided by IBM [22], the uncertainty in our circuits is 3.7%. We emphasize that a classical interpretation would predict no recovery of the interference pattern in the erased case, and an equal distribution to all states in the non-erased case; this was not found. Our result, therefore, satisfactorily demonstrate the quantum nature of the IBM machines.

In the quantum circuit representation, the difference between (b) and (e) is the Hadamard gate on \(|q_{1}\rangle \), which changes the measurement basis: in (b) the measurement is performed on the z-basis, while in (e) it is on the x-basis. The wave-particle duality is thus demonstrated by the choice of measurement basis. This is a feature of our proposed scheme in contrast with [29], where they encoded the wave and particle behaviors into one photon (qubit) while entangling with another ancilla photon.

3 The Elitzur–Vaidman bomb

The second experiment we address here is the interaction-free measurement, also known as the Elitzur–Vaidman bomb [30, 31]. In an optical experiment as shown in Fig. 2(a), a classical object, such as a light-sensitive bomb, is placed on one path of the MZI. Due to the non-locality of the photon’s wavefunction, there is a probability that the bomb is detected without actually being hit by the photon, thus the name interaction-free measurement. This experiment has been verified for photon [32], electrons [33], atoms [34], as well as proposed for solid-state systems [35, 36].

Figure 2
figure 2

The Elitzur–Vaidman bomb experiment. (a) The original optical setup [30] with a light-sensitive bomb inside a MZI. There is a non-zero probability that a single measurement detects the bomb without an interaction, i.e., the photon takes the lower path and hits detector D1. More detail description of this apparatus can be found in the text. (b) Quantum circuit for this experiment, where the first qubit represents the photon and the second qubit reveals the status of the bomb. (c) Our experiments on a range of IBM quantum computers in 2020. The dashed-dotted line at 0.33 is the theoretical value from Eq. (1). Each dot represents an execution of the experiment on the corresponding quantum computer. The solid black lines are the average value of dots. The device errors and standard deviations are 9.3%, 4.9%, 6.2%, 7.4%, 4.1%, 4.0%, 5.3% and 0.034, 0.047, 0.060, 0.029, 0.017, 0.025, 0.028, in order given above, from left to right

Putting philosophical discussion aside, this experiment can be described as follows. In a standard MZI without the bomb, the original photon splits into an upper path and a lower path with 50% chance for each case after the first BS. It then interferes with itself at the second BS, and always lights up the constructive detector D2. With the bomb however, if the photon takes the upper path, it will be absorbed by the bomb, and thus produces no clicks in the detectors. If the lower path is taken, the photon will split again with an even chance for each possibility at the second BS, resulting in clicks at D1 and D2 with 25% detection each. While the click on D2 is indistinguishable from the no-bomb case, a click on detector D1 tells us that there is an active bomb residing on the upper path inside the MZI. In the latter case, we detect the existence of the bomb without touching it, hence the name “interaction-free” measurement.

This experiment is described using a quantum circuit containing two Hadamard gates together with a CNOT gate. In our setup as shown in Fig. 2(b), the first qubit represents the photon in the MZI, and the two Hadamard gates simulate the two BSs. Like the bomb that detects the photon’s quantum state inside the MZI, a CNOT gate between the two H gates is targeted on a second qubit. The value of this second qubit \(|q_{1}\rangle \) indicates if the bomb has been touched or not. Let \(|q_{1}\rangle =|1\rangle \) means the bomb is touched, we summarize what happens in the circuit via a diagram as follows:

figure c

Even though there is a 50% probability of explosion, this scheme allows us to probe the existence of a classical object in an interaction-free manner. The efficiency rate η can be expressed by a measurement on the two-qubit system [32]

$$ \eta =\frac{P_{\mathrm{det}}}{P_{\mathrm{det}}+P_{\mathrm{abs}}}= \frac{P_{|10\rangle }}{P_{|10\rangle }+P_{|01\rangle }+P_{|11\rangle }}= \frac{P_{|10\rangle }}{1-P_{|00\rangle }}. $$
(1)

Here, \(P_{\mathrm{det}}\) is the probability of detecting the bomb without touching it, and \(P_{\mathrm{abs}}\) is the probability that the bomb explodes; or in other words, the photon is absorbed. With a 50:50 beamsplitter, the efficiency rate \(\eta = \frac{1/4}{1/4+1/2} = \frac{1}{3}\). We execute the quantum circuit using a virtual quantum machine and obtain an exact value of 1/3, shown as a dashed-dotted line in Fig. 2(c). The same circuit running on real IBMQ quantum hardware at various times in August 2020 yields results that differ from each other and deviate from the theoretical value 1/3. We learn that even when mitigation error correction [37] is applied, most systems have large errors as shown with error bars in Fig. 2(c), see Table 1 for more detail for Essex, Ourense, Burlington, London, Vigo, Valencia, and x2. Especially, IBM Essex is systematically off to one side, while IBM London is off to the other side of the average value. Of all devices, the IBM Vigo and IBM Valencia achieve the best result with the smallest errors in all aspects. We emphasize that these results are obtained from an identical set of codes, and thus imply large variations in IBM’s hardware. Even with a shallow circuit as shown in Fig. 2(b), one need to be cautious and choose a proper backend for their calculations.

Table 1 Performance of IBM’s quantum devices in our Elitzur–Vaidman bomb experiments. The averaged efficiency η for all machines are listed in the first row, differ from the theoretical efficiency \(\eta =1/3\). The absolute error is calculated as \(\vert \eta -1/3 \vert \), relative error is \(\frac{ \vert 1/3-\eta \vert }{1/3}\), and standard deviation is \(\sqrt{ \sum_{i=1}^{n}\frac{(\eta _{i}-\eta )^{2}}{n}}\), with n is the total number of runs and \(\eta _{i}\) is the efficiency of the ith run. Device error is calculated using the fidelity of a circuit, which is estimated as the product of fidelities of the circuit’s component gates. This information from IBM can be found in our Github [22] for the time that we ran these experiments

To qualify for “interaction-free measurement” [32], the efficiency η needs to reach 100%. In the optical setup, this efficiency can be obtained by a series of connected MZIs such that the photon repeatedly detects the bomb multiple times. In a setup with N BSs, each with reflectivity \(R=\cos ^{2}(\pi /2N)\), the photon gradually transfers from the lower to the upper halves, as shown in Fig. 3(a). After every beamsplitter, there is a dominant chance that the photon takes the lower path and avoids the bomb, and every time it does so the quantum state collapses and fully recovers at the lower path before continuing to evolve unitarily [31, 38]. After \(N-1\) stages with N beamsplitters, the probability that the photon only takes the lower path becomes \([\cos ^{2}(\pi /2N)]^{N}\). Following Eq. (1), the efficiency η [32] is

$$ \eta = \frac{\cos ^{2N}(\frac{\pi }{2N})}{1-\sin ^{2}(\frac{\pi }{2N})\cos ^{2(N-1)}(\frac{\pi }{2N})}. $$
(2)
Figure 3
figure 3

The general Elitzur–Vaidman bomb experiment. (a) The original optical setup [32] used a series of MZIs to detect the bomb multiple times. (b) Quantum circuit for the experiment. The \(R_{y}(\theta _{i})\) replaces the H gate for control over the reflectivity; an extension from Fig. 2(b). (c) Our experiment data from the IBMQ Valencia. Since Valencia is a 5-qubit computer, the experiment extends to 4 stages. Device errors are 7.2%, 10.3%, 13.8%, 19.0% for stage \(n=2,3,4,5\), respectively. Standard deviations for all points are shown as error bars, with the largest at 0.087

The quantum circuit that simulates the series of MZIs in Fig. 3(a) is shown in Fig. 3(b) for the case \(N = 5\), which is a natural expansion from the circuit shown in Fig. 2(b). The first qubit represents the chain of MZI and the photon that pass through it. The Hadamard gate is now replaced by rotation gates in the y-axis R y (θ)= [ cos ( θ / 2 ) sin ( θ / 2 ) sin ( θ / 2 ) cos ( θ / 2 ) ] . We assume an arbitrary angle for these rotations \(R_{y,i}(\theta _{i})\), with \(i \in [1,N]\). These angles need to satisfy the condition

$$ \sum_{i=1}^{N}\theta _{i}=\pi , $$
(3)

such that the measurement is performed on the original basis after all these rotations. In contrast to Hadamard gates, a chain of \(R_{y}(\theta _{i})\) satisfying Eq. (3) interferes \(|0\rangle \rightarrow |1\rangle \), instead of \(|0\rangle \rightarrow |0\rangle \). To detect the status of the photon, a chain of CNOT gates is added in between these rotation \(R_{y}\). If any of these target qubits change their value to \(|1\rangle \), the photon is absorbed and the bomb explodes. The state of interested is \(|00..00\rangle \); it indicates that the photon has successfully passed through the circuit without exploding the bomb. Here, we post-select out the explosion cases, i.e., the target qubits turn to \(|1\rangle \). Since the CNOTs do not change the value of their control qubit \(q_{0}\), the coefficient for state \(|00..00\rangle \) and \(|10..00\rangle \) are \(\prod_{i=1}^{N}\cos (\theta _{i}/2)\) and \(\sin (\theta _{N}/2)\prod_{i=1}^{N-1}\cos (\theta _{i}/2)\), respectively. From Eq. (1), \(\eta =\frac{P_{\mathrm{det}}}{P_{\mathrm{det}}+P_{\mathrm{abs}}}\), the efficiency becomes

$$ \eta =\frac{P_{|00..00\rangle }}{1-P_{|10..00\rangle }} = \frac{\prod_{i=1}^{N}\cos ^{2} (\frac{\theta _{i}}{2} )}{1-\sin ^{2} (\frac{\theta _{N}}{2} )\prod_{i=1}^{N-1}\cos ^{2} (\frac{\theta _{ i}}{2} )}. $$
(4)

It is easy to see that Eq. (2) is a special case of our result when all \(\theta _{i}\) are equal \(\frac{\pi }{N}\).

To simplify Eq. (4), we set \(\theta _{N}=\theta \). Then from Eq. (3), we have \(\theta _{i} = \frac{\pi -\theta }{N-1}\) for \(i\in [1,N-1]\). Following the result in Fig. 2(c), the circuit is executed on the Valencia quantum computer provided by IBMQ [8, 22]. In Fig. 3(c) we show theoretical curves from Eq. (4) in solid gray, and simulations of the quantum circuit in Fig. 3(b) using a virtual machine as red dots. Experiment data from the Valencia device is shown as circular dots in different colors for \(N = 2,3,4,5\), with device errors expected at 7.2%, 10.3%, 13.8%, 19.0%, respectively. The code is executed 10 times, each with 8192 shots, and error bars are calculated based on these deviations. The measurement data fit pretty well to theory for a small number of BSs, at \(N=2\) and 3. However, running the same quantum circuit on other systems, such as London or Ourense, yields substantial errors, even with \(N = 2\) (data not shown). At larger N= 4 or 5, the experiment requires entanglement of more qubits that demands a “deeper” circuit and more gates. Our data are quite off compared to theoretical and simulation results. This is not a surprising result, as the IBM’s NISQ computers are known for noises and mostly limit to shallow circuits [9, 10, 1621]. Finding the origin for these errors is outside the scope of this work, as it requires in-depth information from the chip design, fabrication process, microwave setup, cryostat, and their inter-connections. Although being unreliable with quite many errors, it is impressive that these computers reach \(\eta > 0.64\) for \(N=3\) with θ around 0.6 π, and thus satisfactorily demonstrate the interaction-free measurement. At the classical limit, we expect \(\eta = 0\), for such an effect should be impossible.

4 The Hardy’s paradox

The original Elitzur–Vaidman bomb can be extended to illustrate the Hardy’s paradox [39, 40] with the optical setup showed in Fig. 4(a). Here, the classical bomb is replaced with two quantum objects, an electron and a positron. They enter two MZIs arranged so that their path crosses, which would lead to an annihilation typically. Without the positron, the electron would always go to its constructive interference detector D1, and similarly for the case of the positron that light up detector D4. A detection at the destructive interference detectors D2 or D3 indicates that a counterpart is sent through the MZI. The interesting case occurs when both D2 and D3 click, which indicates that the electron and the positron collide at the crossing point. According to their nature, they must annihilate and can not trigger D2,3 detectors. The coincident clicks are a paradox that a local hidden-variable theory cannot explain [39]. Nevertheless, the Hardy’s paradox has been theoretically explained in terms of weak values [4143] and experimentally verified [4446]. Hardy’s paradox indicates the nonlocality feature of the quantum state inside the two MZIs [47]. Nonlocality is an intriguing topic that has been realized in photons [4851], atoms [52, 53], or superconducting circuits [54, 55].

Figure 4
figure 4

The Hardy’s paradox experiment. (a) The original optical setup [39] where two MZIs are combined. (b) The quantum circuit, where each particle passing through its BS is represented by a qubit evolves under the action of a \(R_{y}(\theta _{i})\) and a \(R_{y}(\pi -\theta _{i})\) gate. The annihilation cases are marked by the Toffoli gate. (c) Data from the IBM Vigo in direct comparison with theory when \(\theta =\theta _{0}=\theta _{1}\). (d) The nonlocal probability as calculated from Eq. (6) showed in percentage. (e) Experiment data for the nonlocal probability obtained from the IBMQ Vigo quantum computer with a maximum of \(\gamma =0.119\) at \(\theta =0.533\pi \), close to Hardy’s result [40]. The relative device error is estimated at 12.1% giving an absolute device error of 0.014, while the largest standard deviation is 0.015

In Fig. 4(b), the quantum circuit for this experiment is built similarly to the two previous experiments. Two qubits represent the two MZIs with rotation gates also satisfying Eq. (3) to put the qubits into their superpositions. In between the rotations, a Toffoli gate is targeted on the third qubit, revealing the quantum state of the control qubits when they are both at \(|1\rangle \). Finally, the qubits are rotated back to the original basis for the measurement. With the original state denoted as \(|\psi \rangle =|000\rangle \), the final state after the quantum circuit is

$$\begin{aligned} \begin{aligned}[b] |\psi _{f}\rangle &=- \frac{1}{4}\sin \theta _{1}\sin \theta _{0}|000 \rangle \\ &\quad{} +\frac{1}{2}\sin \theta _{1}\sin ^{2}\frac{\theta _{0}}{2}|100\rangle + \frac{1}{2}\sin ^{2}\frac{\theta _{1}}{2}\sin \theta _{0}|010\rangle \\ &\quad{} +\frac{1}{4}\biggl(2\cos \theta _{1}\sin ^{2}\frac{\theta _{0}}{2}+\cos \theta _{0}+3\biggr)|110 \rangle \\ &\quad{} +\frac{1}{4}\sin \theta _{1}\sin {\theta _{0}}|001\rangle -\frac{1}{2}\sin ^{2} \frac{\theta _{0}}{2}\sin {\theta _{1}}|101\rangle \\ &\quad{} -\frac{1}{2}\sin ^{2}{\frac{\theta _{1}}{2}}\sin {\theta _{0}}|011 \rangle +\sin ^{2} \frac{\theta _{1}}{2}\sin ^{2}{ \frac{\theta _{0}}{2}}|111\rangle . \end{aligned} \end{aligned}$$
(5)

Here, \(\theta _{i}\) is the rotation angle of the ith qubit, \(i=[0,1]\). The state of interest, called the nonlocal state, corresponds to the case when the electron and the positron enter the cross-link without an annihilation. In our setup using a \(R_{y}( \theta _{i})\) and a \(R_{y}(\pi -\theta _{i})\), it is state \(|000\rangle \) where the first two-qubit has value \(|q_{0}=0,q_{1}=0\rangle \) and the last qubit is 0: \(|q_{2}=0\rangle \). To resemble the electron-positron annihilation in the quantum circuit, we reject all states with \(|q_{2}=1\rangle \) in Eq. (5) and obtain the remain probabilities from which the nonlocal probability for \(|000\rangle \) is

$$\begin{aligned} \gamma ={}& \frac{P(|000\rangle )}{P(|000\rangle )+P(|100\rangle )+P(|010\rangle )+P(|110\rangle )} \\ ={}& \frac{\sin ^{2}\theta _{1}\sin ^{2}\theta _{0}}{4(2\cos \theta _{1}\sin ^{2}\frac{\theta _{0}}{2}+\cos \theta _{0}+3)} \end{aligned}$$
(6)
$$\begin{aligned} ={}& \frac{2\sin ^{4}\frac{\theta }{2}\cos ^{2}\frac{\theta }{2}}{3-\cos \theta }. \end{aligned}$$
(7)

Equation (7) is obtained from Eq. (6) by choosing \(\theta _{1}=\theta _{0}=\theta \), i.e., the two MZIs are set up identically. To show that our result is equivalent to Hardy’s original probability, we change to new variables: \(\sin \frac{\theta }{2}= \frac{\sqrt{\alpha \beta }}{\sqrt{1- \vert \alpha \beta \vert }}\) and \(\cos \frac{\theta }{2}= \frac{ \vert \alpha \vert - \vert \beta \vert }{\sqrt{1- \vert \alpha \beta \vert }}\). Equation (7) becomes

$$\begin{aligned} \begin{aligned}[b] \gamma &=-2 \biggl[ \frac{ \vert \alpha \beta \vert ( \vert \alpha \vert - \vert \beta \vert )}{1- \vert \alpha \beta \vert } \biggr]^{2} \frac{1}{( \vert \alpha \vert - \vert \beta \vert )^{2}+2 \vert \alpha \beta \vert -3} \\ &= \biggl[\frac{ \vert \alpha \beta \vert ( \vert \alpha \vert - \vert \beta \vert )}{1- \vert \alpha \beta \vert } \biggr]^{2}, \end{aligned} \end{aligned}$$
(8)

which is Eq. 20 in Ref. [40]. The two approaches: the original calculation [40] and the quantum circuit, are indeed equivalent, which yield a maximum value \(\gamma =\frac{1}{2}(5\sqrt{5}-11) \approx 0.090\) at \(\theta = 0.575\pi \). In Fig. 4(c), data from IBMQ Vigo are directly compared to theoretical result Eq. (6), which show similar shapes of quite large error bars. These results are fully plotted in 3D as a function of the two beamsplitters’ angles in Fig. 4(d) for theory and (e) for experiment. The maximum nonlocality probability γ measures at \(0.119\pm 0.015\) around \(\theta _{0} = \theta _{1} = \theta = 0.533\pi \), slightly larger than the value 0.090 estimated by Eq. (8) at \(\theta _{0} = \theta _{1} = \theta = 0.575\pi \). This is the best result obtained by executing the quantum circuit in Fig. 4(b) multiple time on various IBM’s quantum devices. Once again, the IBM quantum computer reproduces the Hardy’s paradox reasonably well with decent precision, especially with a Toffoli gate that demands complicated technical details.

5 Discussion and conclusion

The three chosen experiments all stemmed from the seeming non-definiteness of quantum observables [30, 41, 56, 57]. Inside an MZI where the photon’s route is uncertain, it is the premise for restoration of the interference patterns in the eraser experiment, for the detection without interaction with the bomb, and for the collision at the cross-link of the electron-positron pair without an annihilation. As shown in Fig. 1(a), Fig. 2(a), Fig. 4(a), these MZI apparatus are quite similar, but a slight variation in the experiment setup reveals profound quantum phenomena. Using an equivalent language, the quantum circuits showed in Fig. 1(b), Fig. 2(b), Fig. 4(b) are also quite similar. Indeed, Fig. 1(b) and Fig. 2(b) are identical, implying a connection between the quantum eraser experiment and the Elitzur–Vaidman bomb. To see the similarity between the optical setup and a superconducting quantum processor, we should think of photon travels inside the MZI as a function of time. In the quantum circuit model, the quantum state evolves as a function of time under a series of gate actions, as we read it from left to right. In the original optical setup, these experiments explore the nonlocality of the photon path. In the superconducting setup, there is no spatial separation between the two eigenstates. Instead, the variable here is the charge number for charge qubits.

In 2020, our experiments are performed on some of IBM’s quantum backends, namely Athens, Burlington, Essex, London, Ourense, Valencia, Vigo, and x2. These 5 qubit processors are of standard transmon design [7, 8] with lifetime T1 and decoherence time T2 are in the range of 50–150 μs, see Table 2 for more detail. They are equipped with an universal set of gates with fidelity in the range of 99%. In their most popular layout, the center qubit in the T-shape processors like Vigo or Valencia has the most connectivity: it is in direct connection to three other ones. Although our quantum circuits are compiled from standard gates such as H, CNOT, or \(R_{y}\), they are translated into the devices’ physical gates denoted U1, U2, and U3. As noise arise from any possible sources, performance of these devices complicatedly depends on the chip design, fabrication process, cryostat setup, which are not available to end users. An in-depth analysis of these error is outside the scope of our work, but we do employ certain techniques to manage error and achieve reasonable results. Firstly, the fidelity of a circuit is estimated as the product of fidelities of applied gates given in that run, and the error of an experiment can be deduced thereafter. Secondly, the quality are tightly controlled as performances of these devices can fluctuate. Although calibrated daily, the data can suddenly be bad. Thirdly, the best qubits of the best machine are hand-picked for our circuit. Not all qubits are equal, and their qualities vary as IBM constantly updates their system. Finally, we applied mitigation error correction [37] extensively. Many times, this error-correction scheme can vastly improve our results. In any case, IBM’s quantum computers are state of the art devices that offer an unprecedented opportunity to study the quantum world.

Table 2 IBM quantum devices used in our experiments. “Date” indicates the time that we execute our codes, which can be found on Github [22]. All other column including the lifetime \(T_{1}\), decoherence time \(T_{2}\), gate errors, readout errors are recorded at the time of the experiments. Their values are averaged over all 5 qubits. Connectivity denote the layout of the chip. Most of them are designed as T shape, which mean the center qubit connects to three other qubits

A central issue with gedanken quantum experiments is that they are difficult to verify on physical systems. The three experiments in our work have been realized on optical or atomic setups, the popular testbeds for foundation quantum experiments. However, we are unaware of any work that reproduces them on superconducting circuits, where the quantum object is the macroscopic collective state of condensates electron pairs. Replicating these experiments on the IBM quantum computers identifies two important aspects. First, it benchmarks the quantum nature of the IBM machines. Our results show that all experiments are reproduced with decent precision. The quantum eraser achieves pretty high accuracy, while the original bomb experiments yield results that fluctuate with devices, with the best machines being IBMQ Vigo and IBMQ Valencia. However, the accuracy is lost when the quantum circuit contains more than 4 qubits. Using the same codes and quantum circuit, we could not reproduce the Elitzur–Vaidman bomb in the general case when the qubit number is larger than 3. Apparently, we need gates with high fidelity, especially the 2 qubit gates that produce entanglement. Second, the IBM machines provide a general-purpose testbed for quantum experiments. Remotely controlled using a high-level language, we can reproduce a range of core quantum experiments in one run. By submitting a single job to the IBM quantum cloud, we execute both the quantum eraser, the Elitzur–Vaidman bomb, and the Hardy’s paradox at once on a single solid-state device. More specially, we tune a wide range of parameters and thus verify our calculations as shown in the general bomb experiment in Fig. 3(c). Similarly, in the Hardy’s paradox experiment, our result spans the full range of \(\theta _{0}\), \(\theta _{1}\), which requires a tremendous amount of work in the optical setup. Previously, such experiments needed weeks for the demonstration. As shown in our calculations above, we emphasize the equivalent between the quantum circuit language and the traditional analysis.

In summary, we present quantum circuits for the quantum eraser, the Elitzur–Vaidman bomb, and the Hardy’s paradox experiments and prove that they are equivalent to the original setups using optical apparatuses. We further execute them on the IBM quantum computers and obtain reasonable results. While the current NISQ devices allow for the implementation of these experiments with few qubits, it is reasonable to demonstrate these proof-of-principle experiments as the testbed for testing quantum mechanics using noisy quantum computers.

Availability of data and materials

The datasets supporting the conclusions of this article are available in the Github repository [22].

Abbreviations

BS:

Beamsplitter

MZI:

Mach–Zehnder interferometer

SPDC:

spontaneous parametric down-conversion

NISQ:

Noisy Intermediate Scale Quantum

References

  1. Arute F et al.. Quantum supremacy using a programmable superconducting processor. Nature. 2019;574:505.

    Article  ADS  Google Scholar 

  2. Zhong H-S et al.. Quantum computational advantage using photons. Science. 2020;370:1460.

    Article  ADS  Google Scholar 

  3. DiVincenzo DP. The physical implementation of quantum computation. Fortschr Phys. 2000;48:771.

    Article  MATH  Google Scholar 

  4. Preskill J. Quantum computing in the NISQ era and beyond. Quantum. 2018-07-30.

  5. Krantz P, Kjaergaard M, Yan F, Orlando TP, Gustavsson S, Oliver WD. A quantum engineer’s guide to superconducting qubits. Appl Phys Rev. 2019;6:021318.

    Article  Google Scholar 

  6. Nakamura Y, Pashkin YuA, Tsai JS. Coherent control of macroscopic quantum states in a single-Cooper-pair box. Nature. 1999;398:786.

    Article  ADS  Google Scholar 

  7. Koch J, Yu TM, Gambetta J, Houck AA, Schuster DI, Majer J, Blais A, Devoret MH, Girvin SM, Schoelkopf RJ. Charge-insensitive qubit design derived from the Cooper pair box. Phys Rev A. 2007;76:042319.

    Article  ADS  Google Scholar 

  8. The IBM Quantum Experiences is electronically accessed at https://quantum-computing.ibm.com. 2021.

  9. Amico M, Saleem ZH, Kumph M. Experimental study of Shor’s factoring algorithm using the IBM Q Experience. Phys Rev A. 2019;100:012305.

    Article  ADS  Google Scholar 

  10. Mandviwalla A, Ohshiro K, Ji B. Implementing Grover’s algorithm on the IBM quantum computers. In: 2018 IEEE international conference on big data (big data). 2018. p. 2531.

    Chapter  Google Scholar 

  11. Casanova J, Mezzacapo A, Lamata L, Solano E. Quantum simulation of interacting fermion lattice models in trapped ions. Phys Rev Lett. 2012;108:190502.

    Article  ADS  Google Scholar 

  12. Barends R, Lamata L, Kelly J, Garcıa-Alvarez L, Fowler AG, Megrant A, Jeffrey E, White TC, Sank D, Mutus JY, Campbell B, Chen Y, Chen Z, Chiaro B, Dunsworth A, Hoi IC, Neill C, O’Malley PJJ, Quintana C, Roushan P, Vainsencher A, Wenner J, Solano E, Martinis JM. Digital quantum simulation of fermionic models with a superconducting circuit. Nat Commun. 2015;6:7654.

    Article  ADS  Google Scholar 

  13. Arguelles CA, Jones BJP. Neutrino oscillations in a quantum processor. Phys Rev Res. 2019;1:033176.

    Article  Google Scholar 

  14. Martinez EA, Muschik CA, Schindler P, Nigg D, Erhard A, Heyl M, Hauke P, Dalmonte M, Monz T, Zoller P, Blatt R. Real-time dynamics of lattice gauge theories with a few-qubit quantum computer. Nature. 2016;534:516.

    Article  ADS  Google Scholar 

  15. Fitzpatrick M, Sundaresan NM, Li ACY, Koch J, Houck AA. Observation of a dissipative phase transition in a one-dimensional circuit QED lattice. Phys Rev X. 2017;7:011016.

    Google Scholar 

  16. Kandala A, Mezzacapo A, Temme K, Takita M, Brink M, Chow JM, Gambetta JM. Hardware-efficient variational quantum eigensolver for small molecules and quantum magnets. Nature. 2017;549:242.

    Article  ADS  Google Scholar 

  17. Garcia-Martin D, Sierra G. Five experimental tests on the 5-qubit IBM quantum computer. J Appl Math Phys. 2018;6:1460.

    Google Scholar 

  18. Sisodia M. Comparison the performance of five-qubit IBM quantum computers in terms of Bell states preparation. Quantum Inf Process. 2020;19:214.

    Article  ADS  MathSciNet  Google Scholar 

  19. Schwaller N, Dupertuis M-A, Javerzac-Galy C. Evidence of the entanglement constraint on wave-particle duality using the IBM Q quantum computer. Phys Rev A. 2021;103:022409.

    Article  ADS  Google Scholar 

  20. Ku H-Y, Lambert N, Chan F-J, Emary C, Chen Y-N, Nori F. Experimental test of non-macrorealistic cat states in the cloud. npj Quantum Inf. 2020;6:98.

    Article  ADS  Google Scholar 

  21. Devitt SJ. Performing quantum computing experiments in the cloud. Phys Rev A. 2016;94:032329.

    Article  ADS  Google Scholar 

  22. The code in this work can be accessed at: https://github.com/mx73/Testing-QM-on-NISQ.

  23. Ma X-S, Kofler J, Zeilinger A. Delayed-choice gedanken experiments and their realizations. Rev Mod Phys. 2016;88:015005.

    Article  ADS  Google Scholar 

  24. Scully MO, DrL̆l K. Quantum eraser: a proposed photon correlation experiment concerning observation and “delayed choice” in quantum mechanics. Phys Rev A. 1982;25:2208.

    Article  ADS  Google Scholar 

  25. Kim YH, Yu R, Kulik SP, Scully MO, Shih Y. Delayed “choice” quantum eraser. Phys Rev Lett. 2000;84:1.

    Article  ADS  Google Scholar 

  26. Kaiser F, Coudreau T, Milman P, Ostrowsky DB, Tanzilli S. Entanglement-enabled delayed-choice experiment. Science. 2012;338:637.

    Article  ADS  Google Scholar 

  27. Walborn SP, Terra Cunha MO, Padua S, Monken CH. Double-slit quantum eraser. Phys Rev A. 2002;65:033818.

    Article  ADS  Google Scholar 

  28. Bienfait A, Zhong YP, Chang H-S, Chou M-H, Conner CR, Dumur E, Grebel J, Peairs GA, Povey RG, Satzinger KJ, Cleland AN. Quantum erasure using entangled surface acoustic phonons. Phys Rev X. 2020;10:021055.

    Google Scholar 

  29. Ionicioiu R, Terno DR. Proposal for a quantum delayed-choice experiment. Phys Rev Lett. 2011;107:230406.

    Article  ADS  Google Scholar 

  30. Elitzur AC, Vaidman L. Quantum mechanical interaction-free measurements. Found Phys. 1993;23:987.

    Article  ADS  Google Scholar 

  31. Vaidman L. The meaning of the interaction-free measurements. Found Phys. 2003;33:491.

    Article  MathSciNet  Google Scholar 

  32. Kwiat P, Weinfurter H, Herzog T, Kasevich MA, Zeilinger A. Interaction-free measurement. Phys Rev Lett. 1995;74:4763.

    Article  ADS  Google Scholar 

  33. Turner AE, Johnson CW, Kruit P, McMorran BJ. Interaction free measurement with electrons. Phys Rev Lett. 2021;127:110401.

    Article  ADS  Google Scholar 

  34. Robens C, Alt W, Emary C, Meschede D, Alberti A. Atomic “bomb testing”: the Elitzur–Vaidman experiment violates the Leggett–Garg inequality. Appl Phys B. 2017;123:11.

    ADS  Google Scholar 

  35. Chirolli L, Strambini E, Giovannetti V, Taddei F, Piazza V, Fazio R, Beltram F, Burkard G. Electronic implementations of interaction-free measurements. Phys Rev B. 2010;82:045403.

    Article  ADS  Google Scholar 

  36. Paraoanu GS. Interaction free measurements with superconducting qubits. Phys Rev Lett. 2006;97:180406.

    Article  ADS  Google Scholar 

  37. Temme K, Bravyi S, Gambetta JM. Error mitigation for short-depth quantum circuits. Phys Rev Lett. 2017;119:180509.

    Article  ADS  MathSciNet  Google Scholar 

  38. Misra B, Sudarshan ECG. The Zeno’s paradox in quantum theory. J Math Phys. 1977;18:756.

    Article  ADS  MathSciNet  Google Scholar 

  39. Hardy L. Quantum mechanics, local realistic theories, and Lorentz-invariant realistic theories. Phys Rev Lett. 1992;68:2981.

    Article  ADS  MathSciNet  MATH  Google Scholar 

  40. Hardy L. Nonlocality for two particles without inequalities for almost all entangled states. Phys Rev Lett. 1993;71:1665.

    Article  ADS  MathSciNet  MATH  Google Scholar 

  41. Aharonov Y, Botero A, Popescue S, Reznik B, Tollaksen J. Revisiting Hardy’s paradox: counterfactual statements, real measurements, entanglement and weak values. Phys Lett A. 2002;301:130–8.

    Article  ADS  MathSciNet  MATH  Google Scholar 

  42. Kedem Y, Vaidman L. Modular values and weak values of quantum observables. Phys Rev Lett. 2010;105:230401.

    Article  ADS  Google Scholar 

  43. Ho LB, Imoto N. Full characterization of modular values for finite-dimensional systems. Phys Lett A. 2016;380:2129–35.

    Article  ADS  MathSciNet  MATH  Google Scholar 

  44. Irvine W, Hodelin J, Simon C, Bouwmeester D. Realization of Hardy’s thought experiment with photons. Phys Rev Lett. 2005;95:030401.

    Article  ADS  MathSciNet  MATH  Google Scholar 

  45. Lundeen JS, Steinberg AM. Experimental joint weak measurement on a photon pair as a probe of Hardy’s paradox. Phys Rev Lett. 2009;102:020404.

    Article  ADS  Google Scholar 

  46. Yokota K, Yamamoto T, Koashi M, Imoto N. Direct observation of Hardy’s paradox by joint weak measurement with an entangled photon pair. New J Phys. 2009;11:033011.

    Article  Google Scholar 

  47. Brunner N, Cavalcanti D, Pironio S, Scarani V, Wehner S. Bell nonlocality. Rev Mod Phys. 2014;86:419.

    Article  ADS  Google Scholar 

  48. Aspect A, Dalibard J, Roger G. Experimental test of Bell’s inequalities using time-varying analyzers. Phys Rev Lett. 1982;49:1804.

    Article  ADS  MathSciNet  Google Scholar 

  49. Fedrizzi A, Ursin R, Herbst T, Nespoli M, Prevedel R, Scheidl T, Tiefenbacher F, Jennewein T, Zeilinger A. High-fidelity transmission of entanglement over a high-loss free-space channel. Nat Phys. 2009;5:389.

    Article  Google Scholar 

  50. White AG, James DFV, Eberhard PH, Kwiat PG. Nonmaximally entangled states: production, characterization, and utilization. Phys Rev Lett. 1999;83:3103.

    Article  ADS  Google Scholar 

  51. Luo YH, Su HY, Huang HL, Wang XL, Yang T, Li L, Liu NL, Chen JL, Lu CY, Pan JW. Experimental test of generalized Hardy’s paradox. Sci Bull. 2018;63:1611.

    Article  Google Scholar 

  52. Matsukevich DN, Maunz P, Moehring DL, Olmschenk S, Monroe C. Bell inequality violation with two remote atomic qubits. Phys Rev Lett. 2008;100:150404.

    Article  ADS  Google Scholar 

  53. Hofmann J, Krug M, Ortegel N, Gerard L, Weber M, Rosenfeld W, Weinfurter H. Heralded entanglement between widely separated atoms. Science. 2012;337:72.

    Article  ADS  Google Scholar 

  54. Neeley M, Bialczak RC, Lenander M, Lucero E, Mariantoni M, O’Connell AD, Sank D, Wang H, Weides M, Wenner J, Yin Y, Yamamoto T, Cleland AN, Martinis JM. Generation of three-qubit entangled states using superconducting phase qubits. Nature. 2010;467:570.

    Article  ADS  Google Scholar 

  55. DiCarlo L, Reed MD, Sun L, Johnson BR, Chow JM, Gambetta JM, Frunzio L, Girvin SM, Devoret MH, Schoelkopf RJ. Preparation and measurement of three-qubit entanglement in a superconducting circuit. Nature. 2010;467:574.

    Article  ADS  Google Scholar 

  56. Bell JS. On the Einstein Podolsky Rosen paradox. Physics. 1964;1:195–200.

    Article  MathSciNet  Google Scholar 

  57. Kochen S, Specker EP. The problem of hidden variables in quantum mechanics. J Math Mech. 1967;17:59–87.

    MathSciNet  MATH  Google Scholar 

Download references

Acknowledgements

We would like to thank Nguyen Hai Chau for the fruitful discussions.

Funding

This work was supported by JSPS, Japan KAKENHI Grant Number 20F20021.

Author information

Authors and Affiliations

Authors

Contributions

The programming and initial data analysis was performed by TMD. Theoretical calculation are done by all authors. The manuscript was written with contribution from all authors. All authors read and approved the final manuscript.

Corresponding author

Correspondence to Hung Q. Nguyen.

Ethics declarations

Ethics approval and consent to participate

Not applicable.

Consent for publication

Not applicable.

Competing interests

The authors declare that they have no competing interests.

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Tran, D.M., Nguyen, D.V., Le, B.H. et al. Experimenting quantum phenomena on NISQ computers using high level quantum programming. EPJ Quantum Technol. 9, 6 (2022). https://doi.org/10.1140/epjqt/s40507-022-00126-1

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1140/epjqt/s40507-022-00126-1

Keywords