Skip to main content

SpinQ Gemini: a desktop quantum computing platform for education and research

Abstract

SpinQ Gemini is a commercial desktop quantum computing platform designed and manufactured by SpinQ Technology. It is an integrated hardware-software system. The first generation product with two qubits was launched in January 2020. The hardware is based on NMR spectrometer, with permanent magnets providing 1 T magnetic field. SpinQ Gemini operates under room temperature (0–30°C), highlighting its lightweight (55 kg with a volume of \(70\times 40 \times 80\text{ cm}^{3}\)), cost-effective (under 50k USD), and maintenance-free. SpinQ Gemini aims to provide real-device experience for quantum computing education for K-12 and at the college level. It also features quantum control design capabilities that benefit the researchers studying quantum control and quantum noise. Since its first launch, SpinQ Gemini has been shipped to institutions in Canada, Taiwan and Mainland China. This paper introduces the system of design of SpinQ Gemini, from hardware to software. We also demonstrate examples for performing quantum computing tasks on SpinQ Gemini, including one task for a variational quantum eigensolver of a two-qubit Heisenberg model. The next generations of SpinQ quantum computing devices will adopt models of more qubits, advanced control functions for researchers with comparable cost, as well as simplified models for much lower cost (under 5k USD) for K-12 education. We believe that low-cost portable quantum computing products will facilitate hands-on experience for teaching quantum computing at all levels, well-prepare younger generations of students and researchers for the future of quantum technologies.

1 Introduction

SpinQ Gemini is a commercial desktop quantum computing platform designed and manufactured by SpinQ Technology [1, 2], and the first generation product with two qubits was launched in January 2020. It is an integrated hardware-software system as shown in Fig. 1: the left figure shows the exterior look of the device, with a dimension of \(70\times 40 \times 80\text{ cm}^{3}\), and a weight of 55 kg; the right figure shows the user interface software SpinQuasar.

Figure 1
figure 1

(a) The photo of Gemini and (b) the homepage of SpinQuasar [1]. The Gemini connects with a personal computer (PC) installed with SpinQuasar. SpinQuasar provides an interface for the users to manipulate the desktop platform

The hardware part of Gemini is based on nuclear magnetic resonance (NMR) spectrometer. NMR was among the very first systems developed for quantum computing [39]. Despite its limitations on scalability, a lot of pioneer research and techniques for quantum computing were first demonstrated in NMR systems [1022]. Notably, many quantum control techniques developed in NMR can be readily applied to other quantum computing platforms [9, 2331].

Traditional NMR quantum computing is performed on commercial spectrometers with a superconducting magnet. Those spectrometers are expensive (almost 1 million USD), large (can be as high as 3 meters), and need to work in specially designed labs. They also require regular liquid nitrogen and helium refills for maintenance. These issues on cost, weight, volume and extreme physical conditions also in general exist on other systems for quantum computing, making them hard to be accessible for users in real life, but instead with only possible access on cloud, such as IBM Q [32], IonQ [33] and Rigetti.Footnote 1 As an example, superconducting qubits need to work in dilution fridges which usually cost almost 1 million USD. Similar to the superconducting NMR systems, they require special lab conditions and are not portable. Furthermore, special training is needed for operations of dilution fridges [3440].

With the development of permanent magnet technology in recent years [41], it is possible to bring down the size and cost of NMR spectrometers [4246]. This then makes the NMR technology an ideal choice for building portable quantum platforms. By using a permanent magnet providing 1 T magnetic fields, SpinQ Gemini highlights its lightweight (55 kg with a volume of \(70 \times 40\times 80\text{ cm}^{3}\)) and cost-effective (under 50k USD) features, and maintenance-free, making it portable almost like a desktop PC.

Customised quantum algorithm circuit design and programming are supported on SpinQ Gemini using its software SpinQuasar (Fig. 1). SpinQ Gemini also provides demonstrations of >10 famous quantum algorithms, such as Deutsch algorithm [47], Grover algorithm [48, 49], and HHL algorithm [50]. It also has build-in teaching examples for quantum mechanic, such as Rabi oscillation observation and decoherence time measurement. Gemini not only provides a very friendly platform for non-specialists who aim to learn quantum computing basics and quantum programming fast, but also serves as a powerful tool for quantum computing related research.

In this paper, we introduce the system of the first generation SpinQ Gemini. In Sec. 2, we discuss the system design, from hardware to software. In Sec. 3, we discuss how to perform quantum computing with SpinQ Gemini. We give two concrete examples of quantum computing tasks performed on SpinQ Gemini, one on the measurement of geometric phase of mixed state in Sec. 4, and the other on a variational quantum eigensolver for a two-qubit Heisenberg model in Sec. 5. A discussion on future plans of next generations products will follow in Sec. 6.

We believe that low-cost portable quantum computing products will facilitate hands-on experience for teaching quantum computing at all levels, well-prepare younger generations for the future of quantum technologies. It will also be accessible to a wider range of researchers to operate under real world conditions for quantum computers, benefiting them for further studies on quantum control and quantum noise.

2 System

The overall schematic diagram is shown in Fig. 2. Gemini is composed of a PC with SpinQuasar, a control system on the master board, a radio frequency (RF) system, a temperature control module, a pair of permanent magnets, a field shimming system, and a tube of sample.

Figure 2
figure 2

The overview of the schematic diagram of Gemini system and the interface SpinQuasar. The master board equipped with an FPGA, provides the control logic of Gemini. SpinQuasar communicates with FPGA through USB so that the user can access Gemini. The magnets, together with the temperature control unit and the field shimming system provide a stable static homogeneous magnetic field. The RF module provides the function required to control and measure the qubits

The PC with SpinQuasar and the master board together realize the algorithms and interfaces to all the functions. The magnets provide stable static magnetic field. The field shimming system and temperature control system together make the field stable and homogeneous enough for nuclear magnetic resonance as well as quantum computing. The RF system provides generation, modulation, amplification, transmission, detection and reception of the RF pulses and signals so that we can control and measure the quantum system.

The PC with SpinQuasar and the master board altogether realize the software part. The modules are shown in Fig. 3. The software SpinQuasar provides an interface for a user to communicate with Gemini. The master board, of which the core device is an FPGA, realizes all the algorithms to control the pulses (hence control the quantum state), the temperature and shimming of the field (hence generate a stable homogeneous field). SpinQuasar and the master board communicate with each other through USB.

Figure 3
figure 3

Software structure. The software could be divided into two parts: one (the left block) we called SpinQuasar provides an interface for users with access to all the functions of Gemini, the other (the right block) realizes the algorithms and controls required for Gemini to function properly. These two parts communicate with each other through USB

2.1 SpinQuasar

The left half of Fig. 3 shows the structure of SpinQuasar. It is composed of five modules: the quantum computing module, the NMR spectroscopy module, the instrument calibration module, the task management module and the dynamic library module. These modules can be easily accessed from the homepage of SpinQuasar, as shown in Fig. 1(b).

The quantum computing module provides an interface of a two-qubit quantum computer and will be discussed later in Sec. 3.

The NMR spectroscopy module provides an interface of direct accessing to the 1H and 31P nuclear magnetic resonance signal of our sample. It provides the direct control of the pulse parameters on the two nuclei. Also, it provides both the free induction decay (FID) signals and the spectra after fast Fourier transform (FFT). This interface provides a good demonstration of a modern FFT based NMR spectrometer.

The instrument calibration module provides an interface for users to calibrate the parameters of the spectrometer, such as field shimming, phase calibration, and the temperature control for the system.

Gemini also supports cloud quantum computing where one can access to it from the Internet [51]. For cloud quantum computing, the tasks are managed by the task management module. Also, to support more complicated control, such as the variational quantum eigensolver (VQE) which requires adjusting the parameters of the pulses, we provide the APIs for programmable control, and embedded these into the dynamic library.

2.2 Master board

The master board integrates the digital parts of the hardware, including an FPGA, an analog-digital converter (ADC) and a digital-analog converter (DAC). The digital parts, as shown in the right block of Fig. 3, altogether realize the algorithms required to generate the RF pulse, measure the readout signal, control the temperature and shimming. These algorithms will be described further in the introduction of each module. The ADC converts the readout signal from the RF part as measurement, while the DAC generates the initial RF signal for state manipulation.

2.3 Magnets

The permanent magnets provide a stable static homogeneous magnetic field, which split the nuclei with spin-half into two energy levels and therefore the spin becomes a qubit. The permanent magnets are two NdFeB plates. The field generated is 1 Tesla. The field near the center of the two magnets is roughly homogeneous: the homogeneity generated by such magnets can reach a level of 20 ppm. Compared with modern commercial NMR spectrometers, of which the magnet is generated by the superconducting coil that requires a large cryogenic storage dewar and regular refilling of liquid helium and nitrogen, the magnets of Gemini work under room temperature, hence are maintenance free and portable. The disadvantages are that the magnitude of the magnetic field could only reach about 2 T, and it is highly sensitive to the temperature of the magnets themselves.

2.4 Sample

The sample we use is Dimethylphosphite ((CH3O)2PH). The 31P and 1H atom are connected directly and provide a two-qubit quantum processor. Both 31P and 1H nuclei have a \(1/2\)-spin, and therefore have two energy levels. The Lamor frequency of 31P and 1H in 1 T magnetic field are 17.2 MHz and 42.6 MHz, respectively. The structure and the parameters of the sample are listed in Fig. 4.

Figure 4
figure 4

(a) The molecule structure (left) and its parameter table (right). There are multiple 1H nuclear spins. Only the 1H spin that is directly corrected to the 31P spin is used as a qubit. The J coupling between the 1H and 31P nuclear spins is 697.4 Hz. The control pulses are on resonance with 1H and 31P spins and thus their frequency offsets are both 0 Hz. The spin Hamiltonian is \(H_{0}=\pi J \sigma _{z}^{H}\sigma _{z}^{P}/2\), where \(J=697.4\text{ Hz}\). (b) The Fourier transform spectrum of the 1H spin which is directly connected to 31P, obtained using Gemini. The small spikes between the two major peaks are due to non-idea removal of the signals of the 1H spins in the methyl groups. The inset shows the thermal spectrum of all the 1H spins. The peaks (labeled as ‘P’) of methyl 1H spins are fitted using Lorentzian line shapes and removed on purpose in signal processing to get a clear signal of the 1H of interest. (c) The Fourier transform spectrum of the 31P spin obtained using Gemini

2.5 RF pulse generation

The states of the nuclei could be manipulated by irradiating electro-magnetic waves (pulses) with frequencies close to there Larmor frequency (the physics behind this will be described later). Since the Larmor frequencies of the two nuclei lie in the range of RF range, an RF system is designed and manufactured to operate the quantum state and realize the quantum gates. The largest RF power that can be applied is 2 W, and the linear range of the power amplifier is 01 W. Pulses as short as 10 us and 20 us can be applied to realize 90 degree rotations of the 1H and 31P spins. While the default built-in sample in Gemini is Dimethylphosphite and the band-pass filters are optimized for 1H and 31P signals, the RF transmission and NMR reception parts as shown in Fig. 5 can work in the frequency range of 0100 MHz. This means it is possible to use this RF system to perform NMR spectroscopy on other nuclear species whose frequencies fall in this range after adjusting the band-pass filters.

Figure 5
figure 5

RF pulse generation and signal readout. The upper half shows how an arbitrary wave is generated. After the wave is generated, it is power amplified and sent to the control coil (see Fig. 2) so that the quantum state can be manipulated. After the RF pulse irradiation, the electro-magnetic signal induced during spin relaxation is picked up by the coil, and then is sent to the preamplifier. After the signal is amplified, it is sent to the ADC and processed by the master board

2.6 Temperature control

The field generated by the permanent magnets is highly sensitive to the temperature of the permanent magnets themselves. Therefore, a temperature control system is required to guarantee that the field does not drift following the room temperature. The architechture of the temprature control unit is shown in Fig. 6.

Figure 6
figure 6

Temperature control. The temperature control is realized by a famous feedback algorithm: the PID algorithm. The temperature probe picks the temperature signal and send it to the FPGA. The FPGA decides what to do next according to the temperature signal and then controls the power of the heating module accordingly

2.7 Field shimming

The homogeneity of the static magnetic field generated by the permanent magnets is 20 ppm, which is too large. To compensate this inhomogeneity, we designed a field shimming system to reduce the homogeneity to less than 1 ppm. The best homogeneity could reach 0.3 ppm. As a comparison, the homogeneity of a commercial NMR spectrometer with a superconducting magnet is 0.01 ppm. The struture of the shimming unit is shown in Fig. 7.

Figure 7
figure 7

Shimming module. Currently, the field shimming is accomplished by measuring the FWHM of the hydrogen signal. It is also a feedback algorithm by reading the FWHM information of the hydrogen signal and adjusting the current of the shimming coils

3 Quantum computation

3.1 The spin system

Gemini contains two qubits which are the two connected 31P and 1H nuclear spins in Dimethylphosphite ((CH4O)2PH) molecules (Fig. 4). The molecules are placed in the center of the parallel permanent magnets. The 31P and 1H Larmor frequencies are 17.2 MHz and 42.6 MHz, respectively. The 31P spin has a T1 and T2 of 7.2 s and 0.5 s, respectively. The 1H spin has a T1 and T2 of 4 s and 0.3 s, respectively. The J coupling between the two spins is 697.4 Hz. The control pulses are on resonance with 1H and 31P spins and thus their frequency offsets are both 0 Hz. The spin Hamiltonian in the rotating frame is

$$\begin{aligned} H_{0}=2\pi J I_{z}^{H}I_{z}^{P}= \frac{\pi }{2} J \sigma _{z}^{H} \sigma _{z}^{P}, \end{aligned}$$
(1)

where \(J=697.4\text{ Hz}\).

3.2 The gate set

Single-qubit 90 degree rotation gates can be realized using square pulses of 20 us and 10 us for 31P and 1H, respectively. The hardware-level pulse design and engineering are available in later versions of Gemini which provide an arbitrary waveform generation function to users. In the current paper, all quantum gates are realized using square pulses which are resonant with 1H or 31P and combined with free evolution. The available quantum gates contain single-qubit and two-qubit gates. The single-qubit gates are as follows:

$$\begin{aligned} &X=\sigma _{x}= \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}, \quad\quad Y= \sigma _{y}= \begin{pmatrix} 0 & -i \\ i & 0 \end{pmatrix},\quad\quad Z=\sigma _{y}= \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}, \\ &X90=e^{-i\frac{\pi }{4}\sigma _{x}},\quad\quad Y90=e^{-i\frac{\pi }{4}\sigma _{y}},\quad\quad Z90=e^{-i \frac{\pi }{4}\sigma _{z}}, \\ &Rx=e^{-i\frac{\alpha }{2}\sigma _{x}},\quad\quad Ry=e^{-i\frac{\beta }{2}\sigma _{y}},\quad\quad Rz=e^{-i \frac{\gamma }{2}\sigma _{z}}, \\ &H=\frac{1}{\sqrt{2}} \begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}, \quad\quad I= \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}. \end{aligned}$$
(2)

Here, α, β and γ are the rotation angles defined by users. The two-qubit gates are as follows

$$\begin{aligned} &\mathrm{CX}= \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 \end{pmatrix}, \quad\quad \mathrm{CY}= \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & -i \\ 0 & 0 & i & 0 \end{pmatrix}, \\ &\mathrm{CZ}= \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & -1 \end{pmatrix},\quad\quad \mathrm{delay}=e^{-itH_{0}}=e^{-it\frac{\pi }{2}J \sigma _{z}^{H}\sigma _{z}^{P}}, \end{aligned}$$
(3)

where CX gate is the famous control NOT (CNOT) gate. Here, the delay gate is a free evolution gate with the duration t defined by users. It should be noted that when t is comparable to \(T_{2}^{*}\), noise plays a non-negligible role and the action of this gate is not ideal as the form in the above equation. The single-qubit gate fidelity is estimated to be 0.99 and the two-qubit gate fidelity is estimated to be 0.98.

3.3 The pseudo-pure state

The initial state of the two-qubit system is prepared to be a pseudo-pure state (PPS) [3]. The thermal equilibrium state of a liquid-state NMR system is subject to Boltzmann distribution and at room temperature can be expressed as follow:

$$\begin{aligned} \rho _{\mathrm{eq}}= \frac{e^{-H_{s}/k_{B}T}}{\operatorname{Tr}(e^{-H_{s}/k_{B}T})}\approx \frac{1}{2^{n}}I^{\otimes n}+ \sum^{n}_{k=1}\frac{1}{2}\epsilon _{k} \sigma _{z}^{k}. \end{aligned}$$
(4)

Here, \(H_{s}\) is the spin Hamiltonian in the lab frame, and n is the number of qubits. The part \(\sum^{n}_{k=1}\frac{1}{2}\epsilon _{k}\sigma _{z}^{k}\) gives NMR signals. At room temperature \(\epsilon \sim e^{-5}\) is small and thus this is a highly mixed state. To implement quantum computation, researchers [3] proposed to use PPS as the initial state which has the following form,

$$\begin{aligned} \rho _{\mathrm{pps}}=\frac{1-\eta }{2^{n}}I^{\otimes n}+\eta \mathopen\vert \psi \mathclose\rangle \mathopen\langle \psi \mathclose\vert . \end{aligned}$$
(5)

\(\mathopen\vert \psi \mathclose\rangle \) is a pure state. The PPS above has the same unitary dynamics and observable effects as the pure state \(\mathopen\vert \psi \mathclose\rangle \) except for the factor η. PPS is widely used in NMR quantum computation.

Gemini utilizes the relaxation method in Ref. [52] to prepare the two-qubit PPS starting from the thermal equilibrium state. As shown in Fig. 8, the first four pulses realize a basis permutation gate which can be expressed as

$$\begin{aligned} &U_{\mathrm{permute}}= \begin{pmatrix} -i & 0 & 0 & 0 \\ 0 & 0 & 0 & -i \\ 0 & -1 & 0 & 0 \\ 0 & 0 & 1 & 0 \end{pmatrix}. \end{aligned}$$
(6)

\(U_{\mathrm{permute}}\) permutes the basis \(\mathopen\vert 01\mathclose\rangle \), \(\mathopen\vert 10\mathclose\rangle \) and \(\mathopen\vert 11\mathclose\rangle \) and leaves \(\mathopen\vert 00\mathclose\rangle \) unchanged upon a phase. The relaxation method in Ref. [52] combines \(U_{\mathrm{permute}}\) and a delay after it during which T1 relaxation takes effect. By properly choosing the number of the repetitions of this combination and the delay time t, the system can reach a state whose dominantly occupied basis is \(\mathopen\vert 00\mathclose\rangle \) and the other three base have the same but smaller probability. This obtained state is a PPS and can be used as the initial state \(\mathopen\vert 00\mathclose\rangle \) in NMR quantum computing.

Figure 8
figure 8

The pulse sequence for pseudo-pure state preparation. The first four pulses realize a basis permutation gate. After it is a long delay within which the natural relaxation takes effect. By properly choosing the repetition number, N, and the duration of the delay, t, the system can be steered to the pseudo-pure state \(\mathopen\vert 00\mathclose\rangle \) from the thermal equilibrium state

3.4 Density matrix reconstruction

Gemini implements quantum state tomography [53] to reconstruct the density matrix of the quantum state after a certain gate sequence is applied. Any two-qubit density matrix can be expressed in the following way,

$$\begin{aligned} &\rho =\frac{1}{4}I^{\otimes 2}+\frac{1}{4}\sum _{i,j}c_{ij}\sigma _{i} \sigma _{j}, \\ &i(j)=x,y,z,0, \quad \text{but } (i,j)\neq (0,0). \end{aligned}$$
(7)

Here \(\sigma _{0}=I\) is the \(2 \times 2\) identity matrix. To reconstruct a density matrix, one need to measure all the \(c_{ij}\) which are \(c_{ij}=\operatorname{Tr}(\rho \sigma _{i}\sigma _{j})\), in other words, the expectation values of the Pauli matrices \(\sigma _{i}\sigma _{j}\). There are total 15 of \(\sigma _{i}\sigma _{j}\). But only \(\{\sigma _{x}I, \sigma _{x}\sigma _{z} , \sigma _{y}I , \sigma _{y}\sigma _{z} , I \sigma _{x} , \sigma _{z}\sigma _{x} , I\sigma _{y} , \sigma _{z}\sigma _{y} \}\) are observables in NMR. Additional readout pulses are needed to transform the unobservable components to be observable. For example, by applying a readout pulse Y90 to the first qubit prior to measurement, \(c_{z0}\) can be obtained, \(c_{z0}=\operatorname{Tr}(Y90\rho Y90^{\dagger }\sigma _{x}I)\). In Gemini, the reconstruction is realized by repeating an experiment six times, each time with a different readout pulse and observing either 31P or 1H. The readout pulses and \(c_{ij}\) obtained in each of the six repetitions are listed in Fig. 9. The reconstructed initial PPS has a fidelity of higher than 0.99.

Figure 9
figure 9

The readout pulses, observed spins and the obtained \(c_{ij}\) of the six experiments needed to reconstruct a density matrix in the form of Eq. (7)

3.5 Software interface

The user can use the quantum computing interface of SpinQuasar to access the quantum computing function of Gemini (Fig. 10). The structure and flow-chart of quantum computing is shown in Fig. 11. This system wraps up the calibrated pulses into the quantum gates aforementioned. Users can drag the supported gates into the circuits and press Run, the two-qubit quantum computer will start running. The final result will be shown in the form of density matrix which is reconstructed in the way discussed in last section. There is also a noiseless simulator embedded in this system so that one can easily compare the experimental results with theoretical results.

Figure 10
figure 10

The SpinQuasar interface for quantum computing [1]. There is a quantum circuit composer where users can drag and drop the supported quantum gates to construct a desired circuit. The corresponding pulse sequence is shown below the quantum circuit. There are two buttons, ‘Run’ and ‘Simulate’, for activation of the experiment and the simulation, respectively. The density matrices from the experiment and the simulation are shown in the bottom half of the interface

Figure 11
figure 11

Realization of the quantum computing system. It consists of the experiment on the two-qubit processor and the numerical simulation

4 Application: measurement of geometric phase of mixed state

Gemini provides demonstrations of >10 famous quantum algorithms, such as Deutsch–Jozsa algorithm [54], Grover search [48], and HHL algorithm [50]. In this paper, we provide two more advanced examples that demonstrate Gemini’s ability on running quantum algorithms. In this section, we will demonstrate the measurement of the geometric phase of mixed states.

4.1 Theory

Geometric phase [55] is a very important concept in quantum mechanics. It is a type of phase gained by a system that is determined by the geometry of the system’s evolution path. The most famous geometric phase is Berry phase [56] which is associated with cyclic adiabatic evolution. Here we use a spin half system as an example. A spin in a magnetic field is aligned with the field and is in the state \(\mathopen\vert 0\mathclose\rangle \). If the field direction changes slowly and the adiabatic conditions are satisfied, the spin direction changes also adiabatically and is always along the field direction. When the magnetic field returns to its initial direction, the spin returns to its initial direction as well. However, the spin state gains a global phase and is \(e^{i(\alpha +\beta )}\mathopen\vert 0\mathclose\rangle \), where α is the dynamic phase and β is the Berry phase. α and β have expressions as follows:

$$\begin{aligned}& \alpha =-\frac{1}{\hbar } \int _{0}^{\tau }E(t)\,\mathrm{d}t, \end{aligned}$$
(8)
$$\begin{aligned}& \beta =-\frac{1}{2}\Omega . \end{aligned}$$
(9)

\(E(t)\) is the energy of \(\mathopen\vert 0\mathclose\rangle \) at the time t and is determined by the instant Hamiltonian. Ω is the solid angle enclosed by the path. If the initial state is in \(\mathopen\vert 1\mathclose\rangle \), and the magnetic field changes along the same path, then the geometric phase gained by the spin is \(\Omega /2\). This is because the spin is opposite in this case and hence its path encloses a solid angle of −Ω.

Berry phase is discussed above in the context of adiabatic evolution. Researchers have proved that adiabatic evolution is not a necessary condition for geometric phase [57]. Geometric phase stays the same as long as the geometry of the evolution path stays the same, and is not affected by the Hamiltonian that drives this evolution.

Geometric phase is believed to be robust to local noise and fluctuations of Hamiltonian parameters because of its connection with the path geometry. Therefore, geometric quantum computation is proposed as a candidate for fault-tolerant quantum computation [21, 5867]. Geometric phase in noisy environments is also studied. When the environment is noisy, quantum systems are always in mixed states due to the interaction with the environment. The work in Ref. [68] provides a definition for the geometric phase of a mixed state: It is the phase shift of the interference oscillations in interferometry gained by the mixed state after a unitary evolution. The unitary evolution must satisfy the parallel transport requirement [55, 68]: The state at any instant is in-phase with the state after an infinitesimal time. It can be proved that the dynamical phase is 0 if the parallel transport requirement can be satisfied. After such a unitary evolution, each eigen state of the density matrix of the initial mixed state gains a phase denoted as \(\gamma _{n}\), and has the interference visibility \(\nu _{n}\). The geometric phase γ of the mixed state and its interference visibility ν satisfy the following equation:

$$\begin{aligned} \nu e^{i\gamma }=\sum_{n} p_{n}\nu _{n} e^{i\gamma _{n}}. \end{aligned}$$
(10)

Here, \(p_{n}\) is the eigen value of the nth eigen state of the density matrix.

4.2 Experimental protocol

We adapt the protocol used in Ref. [69] to measure the geometric phase in mixed states as defined in Eq. (10). A two-qubit system is used in this protocol. The first qubit is an ancilla qubit and the second qubit is in the mixed states whose geometric phase is to be measured. The mixed state is a mix of \(\mathopen\vert +\mathclose\rangle =\sqrt{2}(\mathopen\vert 0\mathclose\rangle + \mathopen\vert 1\mathclose\rangle )/2\) and \(\mathopen\vert -\mathclose\rangle =\sqrt{2}(\mathopen\vert 0\mathclose\rangle -\mathopen\vert 1\mathclose\rangle )/2\). The initial mixed state is:

$$\begin{aligned} \rho (0)=\frac{1}{2}(I+\vec{\boldsymbol{r}}\cdot \vec{\boldsymbol{\sigma }})= \frac{1}{2}(I-r\sigma _{x}). \end{aligned}$$
(11)

Here \(\vec{\boldsymbol{r}}\) is the Bloch vector, and r is its length that corresponds to the purity of the state. If \(r = 1\), the state is a pure state which is \(\mathopen\vert -\mathclose\rangle \). If \(r = 0\), the state is totally mixed. \(\mathopen\vert -\mathclose\rangle \) and \(\mathopen\vert +\mathclose\rangle \) are the two eigen states of the above density matrix with eigen values of \((1+r)/2\) and \((1-r)/2\). Here we steer the state along the path (A–B–C–D–A) which encloses a solid angle Ω as shown in Fig. 12. Because the path is made up of geodesic curves, the parallel transport requirement can be satisfied and thus the dynamical phase is zero. The \(\mathopen\vert -\mathclose\rangle \) and \(\mathopen\vert +\mathclose\rangle \) states gain geometric phases of \(-\Omega /2\) and \(\Omega /2\), and change to \(e^{-i\Omega /2}\mathopen\vert -\mathclose\rangle \) and \(e^{i\Omega /2}\mathopen\vert +\mathclose\rangle \), respectively. It can be proved that the interference visibilities of the two eigen states are both 1. Then the geometric phase γ of the mixed state satisfies

$$\begin{aligned}& \nu e^{i\gamma }=\frac{1}{2}(1+r)e^{-i\frac{\Omega }{2}}+ \frac{1}{2}(1-r)e^{i \frac{\Omega }{2}}=\cos \frac{\Omega }{2}-ir\sin \frac{\Omega }{2}, \end{aligned}$$
(12)
$$\begin{aligned}& \gamma =-\tan ^{-1}\biggl(r\tan \frac{\Omega }{2}\biggr). \end{aligned}$$
(13)

In order to measure γ, the ancilla qubit is prepared in the state \(\sqrt{2}(\mathopen \vert 0\mathclose \rangle _{a}+\mathopen \vert 1\mathclose \rangle _{a})/2\), which has the density matrix \((I+\sigma _{x}^{a})/2\). We control the two-qubit system so that when the ancilla qubit is in \(\mathopen \vert 1\mathclose \rangle _{a}\), the mixed state undergoes the unitary evolution and when the ancilla qubit is in \(\mathopen \vert 0\mathclose \rangle _{a}\) nothing happens. The phases gained by \(\mathopen\vert -\mathclose\rangle \) and \(\mathopen\vert +\mathclose\rangle \) in the mixed state (which are \(\mp \Omega /2\)) are passed to the ancilla qubit. Thus after the controlled evolution, the state of the ancilla qubit is \(\sqrt{2}(\mathopen \vert 0\mathclose \rangle _{a}+e^{\mp i\Omega /2}\mathopen \vert 1\mathclose \rangle _{a})/2\). The weighted average phase gained by the ancilla qubit has the form of Eq. (13).

Figure 12
figure 12

The unitary evolution path for the mixed state. The state vector of the initial mixed state is prepared to be along -x axis pointing to A. It evolves along the path A–B–C–D–A to return back to point to A. Ω is the solid angle enclosed by this path. \(\theta =\Omega /4\) is the angle between the xy plane and either of the half paths (A–B–C or C–D–A)

Next, we discuss how to prepare a mixed state in the form of Eq. (11) from the initial PPS state \(\mathopen \vert 00\mathclose \rangle \). The most used method in NMR to prepare such a mixed state is to use a pulsed gradient field, which can dephase the spin polarization in the xy plane fast. However, there is no pulsed gradient field in Gemini. Considering the time scale of dephasing caused by the static field inhomogeneity as well as T2 is much smaller than T1, we exploit the natural dephasing to remove the unwanted polarization. To prepare a state in Eq. (11), first the state \((I+r\sigma _{z})/2\) is prepared from \(\mathopen \vert 0\mathclose \rangle \):

$$\begin{aligned} \mathopen\vert 0\mathclose\rangle =\frac{1}{2}(I+\sigma _{z}) \xrightarrow{R_{x}\bigl(\cos ^{-1}r\bigr)} \frac{1}{2} \bigl(I+r\sigma _{z}-\sqrt{1-r^{2}}\sigma _{y} \bigr). \end{aligned}$$
(14)

The \(-\sqrt{1-r^{2}}\sigma _{y}\) part in the above equation can be removed using natural dephasing and we can get \((I+r\sigma _{z})/2\). Then, rotate \((I+r\sigma _{z})/2\) about y axis by \(-\pi /2\), we get \((I-r\sigma _{x})/2\).

The \(\mathopen \vert 1\mathclose \rangle _{a}\)-controlled unitary can be realized using the following sequence:

$$\begin{aligned} R_{x}(-\theta )\to \mathrm{CZ}\to R_{x}(2\theta -\pi )\to \mathrm{CZ}, \end{aligned}$$
(15)

θ is the angle between either of the two half paths and the xy plane, \(\theta =\Omega /4\). \(R_{x}(-\theta )\) operation rotates the first half of the path to the \(x < 0\) half of the xy plane. CZ is the controlled-Z gate. When the ancilla qubit is in \(\mathopen\vert 0\mathclose\rangle _{a}\), CZ does nothing; when the ancilla qubit is in \(\mathopen \vert 1\mathclose \rangle _{a}\), CZ rotates the mixed state about z axis by π counterclockwise, which means the mixed state evolves along the first half of the path. \(R_{x}(2\theta -\pi )\) rotates the second half of the path to the \(x > 0\) half of the xy plane. The CZ after it realizes the evolution of the mixed state along the second half of the path when the ancilla qubit is \(\mathopen \vert 1\mathclose \rangle _{a}\). In this way, the mixed state undergoes a closed path evolution conditional on the \(\mathopen\vert 1\mathclose\rangle _{a}\) state of the ancilla qubit. CZ can be further decomposed as

$$\begin{aligned} R_{x}\biggl(\frac{\pi }{2}\biggr)\to R_{y}\biggl( \frac{\pi }{2}\biggr)\to R_{x}\biggl(-\frac{\pi }{2}\biggr) \to \frac{1}{2J}, \end{aligned}$$
(16)

here \(1/2J\) refers to the free evolution for a duration of \(1/2J\) under the J coupling between the two qubits. The \(R_{x}(\pi /2)\) gate in CZ can be combined with the \(R_{x}(-\theta )\) and \(R_{x}(2\theta -\pi )\) operations in Eq. (15) and simplified. After this simplification, the quantum circuit is shown in Fig. 13. The first qubit is the ancilla qubit. \(\phi _{1}=\pi /2-\theta \), \(\phi _{2}=2\theta -\pi /2\). The geometric phase γ can be measured by measuring the phase change of the ancilla qubit after implementing the circuit in Fig. 13.

Figure 13
figure 13

The experimental circuit for the measurement of the geometric phase for mixed states

4.3 Results

Experiments with \(\Omega = 180^{\circ }\) and \(\Omega = 240^{\circ }\) are carried out. In each situation, r is chosen to be [0.26, 0.50, 0.71, 0.87, 0.97]. And for each of the r values, the experiment is repeated for five times to get a mean value of the measured phases as the result of γ (Fig. 14). The main error sources are the non-ideal initial mixed state and RF pulse imperfections, such as finite pulse width. The large fluctuations in the experimental results come from the uncertainty in fitting the NMR spectra. In spite of those errors and imperfections in experiments, the change trend of the geometric phase as a function of the purity and the solid angle of the path can be observed from the results.

Figure 14
figure 14

The theoretical and experimental results of the mixed state geometric phase in two situations: \(\Omega = 180^{\circ }\) and \(\Omega = 240^{\circ }\). For each situation, five purity values were chosen for the initial mixed state, \(r=[0.26, 0.50, 0.71, 0.87, 0.97]\). For each experimental data point, the experiments were repeated for 5 times and the mean value of the geometric phase was calculated. The error bar indicates the standard deviation of the geometric phase in the 5 repetitions. The theoretical values of the geometric phase are also shown as circles (\(\Omega = 180^{\circ }\)) and diamonds (\(\Omega = 240^{\circ }\)) in the figure

5 Application: variational quantum eigensolver

In this section, we implement a variational quantum eigensolver for a two-qubit Heisenberg model.

5.1 Background

Quantum algorithms such as the Grover search [48], Shor factorization [70, 71] and HHL [50], have proven advantages over their best known classical counterparts. However, these algorithms cannot be efficiently implemented on near-term quantum devices due to inevitable physical noises in quantum gates. Variational quantum algorithms (VQA) [7278], a class of algorithms under the hybrid quantum-classical framework, are more promising to have practical applications on noisy intermediate-scale quantum computers [79]. VQA use a parameterized quantum circuit to estimate the cost function \(C(\boldsymbol{\theta })\) and update θ with a classical optimizer. Variational quantum eigensolver (VQE) [73, 80] is a paradigmatic example of VQA that aims to find the ground state and ground state energy of a given Hamiltonian H. In this section, we will demonstrate the experimental realization of VQE on Gemini.

5.2 Algorithm

In classical computaitional physics (chemistry), we usually estimate the ground state energy of H through variational approaches: parameterize a wave function \(\mathopen \vert \psi \mathclose \rangle =\mathopen \vert \psi (\boldsymbol{\theta })\mathclose \rangle \), update θ to minimize the expectation value \(\mathopen \langle \psi (\boldsymbol{\theta })\mathclose \vert H\mathopen \vert \psi (\boldsymbol{\theta })\mathclose \rangle \) until convergence. VQE facilitates the above procedure with a quantum computer. The wave function is parameterized with a quantum circuit \(U(\boldsymbol{\theta })\) applied to the initial state \(\mathopen \vert \boldsymbol{0} \mathclose \rangle = \mathopen\vert 0\mathclose\rangle ^{\otimes n}\), and we optimize θ to minimize the expectation value,

$$ E(\boldsymbol{\theta })=\mathopen \langle \boldsymbol{0}\mathclose \vert U^{\dagger }(\boldsymbol{\theta }) H U(\boldsymbol{\theta }) \mathopen \vert \boldsymbol{0}\mathclose \rangle . $$
(17)

The classical optimizer can either be gradient-based methods like SGD, Adam, RMSprop, BFGD, or gradient-free methods like Nelder–Mead, Powell. Hardware-efficient ansatz [73], unitary coupled clustered ansatz [81], and Hamiltonian variational ansatz [82, 83] are common choices for \(U(\boldsymbol{\theta })\). In VQE, the gradient can be directly estimated via the parameter-shift rule [84, 85], i.e.,

$$ \frac{\partial E(\boldsymbol{\theta })}{\partial \theta _{i}}=\bigl(\mathopen \langle H\mathclose \rangle _{ \boldsymbol{\theta }_{i}^{+}}- \mathopen \langle H\mathclose \rangle _{ \boldsymbol{\theta }_{i}^{-}}\bigr)/2, $$
(18)

where \(\boldsymbol{\theta }_{i}^{\pm } = \boldsymbol{\theta }\pm \frac{\pi }{2} \boldsymbol{e}_{i}\), \(\boldsymbol{e}_{i}\) is the ith unit vector in the parameter space. Higher order derivatives \(\frac{\partial ^{2} E(\boldsymbol{\theta })}{\partial \theta ^{2}_{i}}\), \(\frac{\partial ^{3} E(\boldsymbol{\theta })}{\partial \theta ^{3} _{i}}\), which are required in some optimizers, can be estimated in a similar way [86].

5.3 Experimental protocol

In this work, we apply VQE to find the ground state of 2-qubit Heisenberg model. The Hamiltonian is

$$ H_{H} = X_{1}X_{2} + Y_{1} Y_{2} + Z_{1}Z_{2}, $$
(19)

where \(X_{j}\), \(Y_{j}\), \(Z_{j}\) are the Pauli operators on the jth qubit. The hardware efficient circuit is shown in Fig. 15.

Figure 15
figure 15

The hardware efficient circuit for 2-qubit VQE. \(\theta _{1}\)\(\theta _{4}\) are the parameters to be optimized

We implement experiments on SpinQ Gemini and IBM Q Yorktown with initial parameter \(\boldsymbol{\theta }=[ 10.2^{\circ } , 8.35^{\circ }, 108^{\circ },91.5^{ \circ }]\), learning rate \(\alpha =0.25\), and carry out numerical simulations.

IBM Q Yorktown is a superconducting quantum computer with 5 qubits [87], the structure is shown in Fig. 16. We only use the first two qubits \(Q_{1}\) and \(Q_{2}\). The single-gate error rates are \(1.173 \times 10^{-3}\) and \(9.810 \times 10^{-4}\), the readout errors are \(2.280 \times 10^{-2}\) and \(3.660 \times 10^{-2}\), and the CNOT error rate is \(1.825 \times 10^{-2}\).

Figure 16
figure 16

The hardware structure of IBM Q Yorktown

The experimental procedures are as follows:

  • Initialize the circuit parameters θ,

  • Estimate the derivatives of θ via parameter-shift rule, \(\frac{\partial E(\boldsymbol{\theta })}{\partial \theta _{i}}=(\mathopen \langle H \mathclose \rangle _{\boldsymbol{\theta }_{i}^{+}}-\mathopen \langle H\mathclose \rangle _{ \boldsymbol{\theta }_{i}^{-}})/2\).

  • Update the parameters with gradient descent, \(\boldsymbol{\theta '}=\boldsymbol{\theta }-\alpha \cdot \nabla E( \boldsymbol{\theta })\);

  • Estimate the expectation value \(\mathopen \langle \boldsymbol{0}\mathclose \vert U^{\dagger }(\boldsymbol{\theta }) H U(\boldsymbol{\theta }) \mathopen \vert \boldsymbol{0} \mathclose \rangle \);

  • Repeat steps 2–4 until convergence.

5.4 Results and simulation

Figure 17 (a) shows the original result of VQE experiment on SpinQ Gemini and IBMQ Yorktown, respectively. The ground state energy of \(H_{H}\) is −3, which is shown by the red line. SpinQ Gemini and IBM Q Yorktown perform similar, both converge to \(E(\boldsymbol{\theta }) \approx -2.6\) after enough iterations, as shown by the blue dot line and the green square line, respectively. According to our simulations and analysis, the error for Gemini mainly comes from the inhomogeneity of the magnetic field, while the error of IBMQ mainly comes from the readout error.

Figure 17
figure 17

Results of VQE. (a) The VQE energy with respect to each iteration on different quantum platforms and simulation. The blue dot line represents the experimental result on SpinQ Gemini. The purple dot line reperents the CNOT error mitigated (CEM) result on SpinQ Gemini. The red triangle line represents the numerical simulation without gate errors. The green square line represents the experimental result on IBM Q Yorktown. The gray square line represents the readout error mitigated (REM) result on IBM Q Yorktown. (b) Numerical simulation for quantum circuit in VQE experiment. The blue dot line represents the experimental result on SpinQ Gemini. The purple dot line reperents the CNOT error mitigated result on SpinQ Gemini. The orange triangle line represents the energy calculate by the noisy circuit with the SpinQ Gemini experimental parameters. The brown square line represents the energy calculate by the ideal circuit with the SpinQ Gemini experimental parameters

The noise in quantum computer cannot be neglected. To study the noise effect and stability of SpinQ Gemini, we construct a noise model to capture the quantum error of the SpinQ Genimi. In the realistic noisy NMR quantum device, the basic noise channels are dephasing and amplitude damping. For an initial state ρ of the system and the quantum circuit unitary transformation U, the local noise model for single-qubit and two-qubit quantum gates can be described by the Kraus representation

$$\begin{aligned} \rho \rightarrow \sum_{k} E_{k} U \rho U^{\dagger } E_{k}^{\dagger } = \sum _{k} E_{k} \rho ' E_{k}^{\dagger } , \end{aligned}$$
(20)

where \(E_{k}\)s are the Kraus operators and \(\sum_{k} E_{k} E_{k}^{\dagger } = I\). The \(E_{k}\)s act on the same single qubit and two qubits as U acts on. The amplitude damping noise can be characterized by the Kraus operators,

$$ K_{1}= \begin{pmatrix} 1 & 0 \\ 0 & \sqrt{1-p} \end{pmatrix}, \quad\quad K_{2}= \begin{pmatrix} 0 & \sqrt{p} \\ 0 & 0 \end{pmatrix}, $$

where \(p \in [0, 1]\) is the probability of the noise. For amplitude damping noise on single-qubit gate U, the Kraus operators \(E_{k}\)s in Eq. (20) run over the set \(\{K_{1}, K_{2}\}\). The Kraus operators \(E_{k}\)s run over the set \(\{K_{1}, K_{2}\}\otimes \{K_{1}, K_{2}\}\) for two-qubit noisy gate. The dephasing noise is characterized by the Kraus operators,

$$\begin{aligned} K_{1}=\sqrt{1-p}I_{2}, \quad\quad K_{2}= \sqrt{p}\sigma _{Z}, \end{aligned}$$
(21)

where \(I_{2}\) is the two dimensional identity matrix and \(\sigma _{Z}\) is Pauli operator. For dephasing noise on single-qubit gate U, the Kraus operators \(E_{k}\)s in Eq. (20) run over the set \(\{K_{1}, K_{2}\}\). The Kraus operators \(E_{k}\)s run over the set \(\{K_{1}, K_{2}\}\otimes \{K_{1}, K_{2}\}\) for two-qubit noisy gate.

We model the noise consisting of single-qubit thermal relaxation error and two-qubit thermal relaxation error. The thermal relaxation error model applies the amplitude damping noise and dephasing noise after each one- or two-qubit gate. This thermal relaxation error model is characterized through the parameters \((T_{1}, T_{2}^{*}, t_{q})\) and the noise probability is formulated by

$$\begin{aligned}& p_{\mathit{damping}} = 1 - e^{-\frac{t_{q}}{T_{1}}}, \end{aligned}$$
(22)
$$\begin{aligned}& p_{\mathit{dephasing}} = \frac{1}{2}\bigl(1- e^{-2\gamma }\bigr), \end{aligned}$$
(23)

where \(\gamma = \frac{t_{q}}{T_{2}^{*}} - \frac{t_{q}}{2T_{1}}\). When the thermal relaxation error model is applied to single-qubit gates, \(t_{q} = {t_{1q}}\) and \(t_{q} = {t_{2q}}\) for two-qubit gates. The final noise model to approximate the noise of NMR quantum device is characterized by the parameters \(\{T_{1}, T_{2}^{*}, t_{1q}, t_{2q} \}\). We set \(\{T_{1} = 5.6\text{ s} , T_{2}^{*}=0.025\text{ s}, t_{1q}=25\ \mu \text{s}, t_{2q}=800\ \mu \text{s}\}\) in the noise simulation for the NMR platform. In NMR system, the dephasing effect is caused by both the spin relaxation and the field inhomogeneity. \(T_{2}\) is used to measure the spin transversal relaxation rate, while \(T_{2}^{*}\) is used to measure the field inhomogeneity. The \(T_{2}\) data is measured using the technique called spin echo, which can refocus the magnetisation and remove the effect of inhomogeneous field. In our VQE experiment, we did not use such technique, so we use \(T_{2}^{*}\) instead of \(T_{2}\).

With the noise model described above, we first record every parameters θ in each iteration of the SpinQ Gemini VQE experiment. Then we take these parameters θ as the parameters of quantum circuit ansatz (Fig. 15) and calculate the energy of the Hamiltonian with respect to the ideal circuit and noisy circuit output in each iteration. As shown in Fig. 17 (b), the noisy circuit result shows great consistancy to the experiment data. The paramaters θ found by SpinQ Gemini is close to the parameters for ground state. These results indicate that our desktop quantum computing platform can run VQE algorithm well.

5.5 Error mitigation

Quantum error mitigation [8890] is a technique to diminish the influence of errors from the statistical perspective.

From the comparison and the simulation described above, we can see that the dephasing error caused by the inhomogeneous magnetic field is dominant. Our circuit consists of four single-qubit rotations and one CNOT gate. The time for a CNOT gate is about 800 μs and for single-qubit gates is \({\sim }20\ \mu \text{s}\). Therefore, the imperfections of the CNOT gate causes primary error. Consider the error model:

$$\begin{aligned} \rho \rightarrow \rho _{f} =\sum_{k} E_{k} U \rho U^{\dagger } E_{k}^{ \dagger } = \sum _{k} E_{k} \rho ' E_{k}^{\dagger }, \end{aligned}$$
(24)

where \(E_{k}\)s are the Kraus operators, \(\rho '\) is the ideal density matrix, and \(\rho _{f}\) is the measured density matrix. Error mitigation is a procedure that for a given \(\rho _{f}\) obtained from the experiment, finds a density matrix \(\rho _{0}\), which is as close to \(\rho '\) as possible, so that the final experiment result could be improved. Here, we employ the superoperator formalism to obtain \(\rho _{0}\). This formalism works as follows. First, let us rewrite the density matrix \(\rho '\) from an \(n\times n\) matrix into an \(n^{2} \times 1\) vector \(\boldsymbol{\rho }'\):

$$ \rho '=\sum_{ij} \rho '_{ij}\mathopen \vert i\mathclose \rangle \mathopen\langle j\mathclose \vert \rightarrow \boldsymbol{\rho }'=\sum _{ij} \rho '_{ij}\mathopen \vert i\mathclose\rangle \mathopen \vert j\mathclose \rangle . $$
(25)

Then the final state \(\boldsymbol{\rho }_{f}\), which is also an \(n^{2} \times 1\) vector is

$$ \boldsymbol{\rho }_{f} = \hat{\hat{S}} \boldsymbol{\rho }', $$
(26)

where \(\hat{\hat{S}}\) is the superoperator. With known Kraus operators \(E_{k}\), it can be obtained as

$$ \hat{\hat{S}}=\sum_{k} E_{k}\otimes E_{k}^{\dagger }. $$
(27)

Therefore, with known \(\boldsymbol{\rho }_{f}\) and \(\hat{\hat{S}}\), we can get

$$ \boldsymbol{\rho }'=\hat{\hat{S}}^{-1}\boldsymbol{\rho }_{f}. $$
(28)

The original result and the mitigated result of Gemini is shown in Fig. 17(b). The blue line and the purple line show the original result and the CNOT error mitigated result. We can see that the error mitigated result of the ground state of \(H_{H}\) could reach about −2.98, much closer to the ideal result. With both the simulation result and the error mitigated result, we can see that the error model we used is a good approximation.

For the IBMQ devices, the readout errors are dominant. Here we consider the simplest linear algebra measurement error mitigation scheme. On IBMQ Santiago we do projective measurement and obtain one of the strings \(\{0,1\}^{\otimes 2}\). Through tomography of measurement process, we get the probability of string \(S_{j}\) becoming \(S_{k}\), denoted by \(P_{kj}\). Suppose we repeat the same measurement many times and have the string probability distribution \(C_{\text{noisy}}\), then

$$ C_{\text{mitigated}}=P^{-1} C_{\text{noisy}} $$
(29)

provides the probability distribution with measurement error mitigated, although \(P^{-1}\) is not a physical operation. Measurement error mitigation can efficiently improve the performance of VQE on IBMQ Santiago, as shown in Fig. 17(a).

6 Discussion

For the next generations of SpinQ desktop quantum computing products, we will develop products running with more qubits (34). Currently, the design of a 3-qubit machine is underway and the product is expected to be released in the second quarter of 2021, with a comparable price as SpinQ Gemini (i.e. under 50k USD). Along the way, compatible software modules with advanced pulse control functions will also be developed, providing more powerful abilities for quantum algorithm/control/error mitigation designs to meet the research needs of advanced users. Meanwhile, another direction is to make a simplified version of the current model, making it more portable with much lower cost (under 5k USD). This simplified version is expected to be released in the fourth quarter of 2021, such that it can be more affordable for most K-12 schools around the world.

7 Conclusion

In this work, we described a desktop and maintenance free quantum computing platform: SpinQ Gemini. We discussed the technique details for both hardware and software parts of it. We demonstrated how quantum computation is accomplished by Gemini, and realized measurement of geometric phase of mixed states as well as variational quantum eigensolver. To obtain a better accuracy in VQE, we also developed an error mitigation algorithm and realized it. In a word, we think SpinQ Gemini is a powerful tool for quantum computation education as well as research.

Availability of data and materials

The datasets generated during and/or analysed during the current study are available from the corresponding author on reasonable request.

Notes

  1. https://www.rigetti.com/.

References

  1. https://www.spinq.cn.

  2. Desktop nuclear magnetic resonance quantum computer. China Patent ZL 2020 2 1195611.3 (2020).

  3. Cory DG, Fahmy AF, Havel TF. Ensemble quantum computing by NMR spectroscopy. Proc Natl Acad Sci. 1997;94:1634. https://www.pnas.org/content/94/5/1634.full.pdf.

    ADS  Google Scholar 

  4. Gershenfeld NA, Chuang IL. Bulk spin-resonance quantum computation. Science. 1997;275:350.

    MathSciNet  MATH  Google Scholar 

  5. Chuang IL, Gershenfeld N, Kubinec MG, Leung DW. Bulk quantum computation with nuclear magnetic resonance: theory and experiment. Proc R Soc Lond, Ser A, Math Phys Eng Sci. 1998;454:447. https://royalsocietypublishing.org/doi/pdf/10.1098/rspa.1998.0170.

    ADS  MATH  Google Scholar 

  6. Cory DG, Price MD, Havel TF. Nuclear magnetic resonance spectroscopy: an experimentally accessible paradigm for quantum computing. Phys D: Nonlinear Phenom. 1998;120:82.

    ADS  Google Scholar 

  7. Knill E, Laflamme R. Power of one bit of quantum information. Phys Rev Lett. 1998;81:5672.

    ADS  Google Scholar 

  8. Cory D, Laflamme R, Knill E, Viola L, Havel T, Boulant N, Boutis G, Fortunato E, Lloyd S, Martinez R, Negrevergne C, Pravia M, Sharf Y, Teklemariam G, Weinstein Y, Zurek W. NMR based quantum information processing: achievements and prospects. Fortschr Phys. 2000;48:875.

    Google Scholar 

  9. Vandersypen LMK, Chuang IL. NMR techniques for quantum control and computation. Rev Mod Phys. 2005;76:1037.

    ADS  Google Scholar 

  10. Chuang IL, Vandersypen LMK, Zhou X, Leung DW, Lloyd S. Experimental realization of a quantum algorithm. Nature. 1998;393:143.

    ADS  Google Scholar 

  11. Jones JA, Mosca M, Hansen RH. Implementation of a quantum search algorithm on a quantum computer. Nature. 1998;393:344.

    ADS  Google Scholar 

  12. Nielsen MA, Knill E, Laflamme R. Complete quantum teleportation using nuclear magnetic resonance. Nature. 1998;396:52.

    ADS  Google Scholar 

  13. Somaroo S, Tseng CH, Havel TF, Laflamme R, Cory DG. Quantum simulations on a quantum computer. Phys Rev Lett. 1999;82:5381.

    ADS  Google Scholar 

  14. Knill E, Laflamme R, Martinez R, Tseng CH. An algorithmic benchmark for quantum information processing. Nature. 2000;404:368.

    ADS  Google Scholar 

  15. Vandersypen LMK, Steffen M, Breyta G, Yannoni CS, Cleve R, Chuang IL. Experimental realization of an order-finding algorithm with an NMR quantum computer. Phys Rev Lett. 2000;85:5452.

    ADS  Google Scholar 

  16. Weinstein YS, Pravia MA, Fortunato EM, Lloyd S, Cory DG. Implementation of the quantum Fourier transform. Phys Rev Lett. 2001;86:1889.

    ADS  Google Scholar 

  17. Cory DG, Price MD, Maas W, Knill E, Laflamme R, Zurek WH, Havel TF, Somaroo SS. Experimental quantum error correction. Phys Rev Lett. 1998;81:2152.

    ADS  Google Scholar 

  18. Knill E, Laflamme R, Martinez R, Negrevergne C. Benchmarking quantum computers: the five-qubit error correcting code. Phys Rev Lett. 2001;86:5811.

    ADS  Google Scholar 

  19. Vandersypen LMK, Steffen M, Breyta G, Yannoni CS, Sherwood MH, Chuang IL. Experimental realization of shor’s quantum factoring algorithm using nuclear magnetic resonance. Nature. 2001;414:883.

    ADS  Google Scholar 

  20. Linden N, Barjat H, Freeman R. An implementation of the Deutsch–Jozsa algorithm on a three-qubit NMR quantum computer. Chem Phys Lett. 1998;296:61.

    ADS  Google Scholar 

  21. Jones JA, Vedral V, Ekert A, Castagnoli G. Geometric quantum computation using nuclear magnetic resonance. Nature. 2000;403:869–71.

    ADS  Google Scholar 

  22. Steffen M, van Dam W, Hogg T, Breyta G, Chuang I. Experimental implementation of an adiabatic quantum optimization algorithm. Phys Rev Lett. 2003;90:067903.

    ADS  Google Scholar 

  23. Carr HY, Purcell EM. Effects of diffusion on free precession in nuclear magnetic resonance experiments. Phys Rev. 1954;94:630.

    ADS  Google Scholar 

  24. Meiboom S, Gill D. Modified spin-echo method for measuring nuclear relaxation times. Rev Sci Instrum. 1958;29:688. https://doi.org/10.1063/1.1716296.

    Article  ADS  Google Scholar 

  25. Khaneja N, Reiss T, Kehlet C, Schulte-Herbrüggen T, Glaser SJ. Optimal control of coupled spin dynamics: design of NMR pulse sequences by gradient ascent algorithms. J Magn Res. 2005;172:296.

    ADS  Google Scholar 

  26. Schulte-Herbrüggen T, Spörl A, Khaneja N, Glaser SJ. Optimal control-based efficient synthesis of building blocks of quantum algorithms: a perspective from network complexity towards time complexity. Phys Rev A. 2005;72:042331.

    ADS  Google Scholar 

  27. Fortunato EM, Pravia MA, Boulant N, Teklemariam G, Havel TF, Cory DG. Design of strongly modulating pulses to implement precise effective Hamiltonians for quantum information processing. J Chem Phys. 2002;116:7599. https://doi.org/10.1063/1.1465412.

    Article  ADS  Google Scholar 

  28. Wimperis S. Broadband, narrowband, and passband composite pulses for use in advanced NMR experiments. J Magn Reson, Ser A. 1994;109:221.

    ADS  Google Scholar 

  29. Brown KR, Harrow AW, Chuang IL. Arbitrarily accurate composite pulse sequences. Phys Rev A. 2004;70:052318.

    ADS  Google Scholar 

  30. Alway WG, Jones JA. Arbitrary precision composite pulses for NMR quantum computing. J Magn Res. 2007;189:114.

    ADS  Google Scholar 

  31. Souza AM, Álvarez GA, Suter D. Robust dynamical decoupling for quantum computing and quantum memory. Phys Rev Lett. 2011;106:240501.

    ADS  Google Scholar 

  32. Cross A. The IBM Q experience and qiskit open-source quantum computing software. In: APS March meeting abstracts. vol. 2018. 2018. abstract id.L58.003.

    Google Scholar 

  33. Monroe C. Ionq quantum computers: clear to scale. Bulletin of the American Physical Society.

  34. Kjaergaard M, Schwartz ME, Braumüller J, Krantz P, Wang JI-J, Gustavsson S, Oliver WD. Superconducting qubits: current state of play. Annu Rev Condens Matter Phys. 2020;11:369.

    Google Scholar 

  35. 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.

    Google Scholar 

  36. Wendin G. Quantum information processing with superconducting circuits: a review. Rep Prog Phys. 2017;80:106001.

    ADS  MathSciNet  Google Scholar 

  37. Gu X, Kockum AF, Miranowicz A, Liu Y-x, Nori F. Microwave photonics with superconducting quantum circuits. Phys Rep. 2017;718:1.

    ADS  MathSciNet  MATH  Google Scholar 

  38. You J, Nori F. Superconducting circuits and quantum information. Phys Today. 2006;58:42.

    Google Scholar 

  39. You J, Nori F. Atomic physics and quantum optics using superconducting circuits. Nature. 2011;474:589.

    ADS  Google Scholar 

  40. Wendin G, Shumeiko V. Quantum bits with Josephson junctions. Low Temp Phys. 2007;33:724.

    ADS  Google Scholar 

  41. Brown D, Ma B-M, Chen Z. Developments in the processing and properties of ndfeb-type permanent magnets. J Magn Magn Mater. 2002;248:432.

    ADS  Google Scholar 

  42. Calin M, Helerea E. Temperature influence on magnetic characteristics of ndfeb permanent magnets. In: 2011 7th international symposium on advanced topics in electrical engineering (ATEE). 2011. p. 1–6.

    Google Scholar 

  43. https://magritek.com/products/spinsolve/.

  44. https://nmr.oxinst.com/x-pulse.

  45. https://www.nanalysis.com/nmready-60pro.

  46. https://www.aiinmr.com/.

  47. David D, Richard J. Rapid solution of problems by quantum computation. Proc R Soc Lond A. 1992;439:553–8.

    ADS  MathSciNet  MATH  Google Scholar 

  48. Grover LK. A fast quantum mechanical algorithm for database search. In: Proceedings of the twenty-eighth annual ACM symposium on theory of computing. 1996. p. 212–9.

    Google Scholar 

  49. Long GL. Grover algorithm with zero theoretical failure rate. Phys Rev A. 2001;64:022307.

    ADS  Google Scholar 

  50. Harrow AW, Hassidim A, Lloyd S. Quantum algorithm for linear systems of equations. Phys Rev Lett. 2009;103:150502.

    ADS  MathSciNet  Google Scholar 

  51. https://cloud.spinq.cn.

  52. Li J, Lu D, Luo Z, Laflamme R, Peng X, Du J. Approximation of reachable sets for coherently controlled open quantum systems: application to quantum state engineering. Phys Rev A. 2016;94:012312.

    ADS  Google Scholar 

  53. Lee J-S. The quantum state tomography on an NMR system. Phys Lett A. 2002;305:349.

    ADS  MATH  Google Scholar 

  54. Deutsch D, Jozsa R. Rapid solution of problems by quantum computation. Proc R Soc Lond Ser A, Math Phys Sci. 1992;439:553.

    ADS  MathSciNet  MATH  Google Scholar 

  55. Anandan J. The geometric phase. Nature. 1992;360:307–13.

    ADS  Google Scholar 

  56. Berry MV. Quantal phase factors accompanying adiabatic changes. Proc R Soc Lond A. 1984;392:45–57.

    ADS  MathSciNet  MATH  Google Scholar 

  57. Aharonov Y, Anandan J. Phase change during a cyclic quantum evolution. Phys Rev Lett. 1987;58:1593.

    ADS  MathSciNet  Google Scholar 

  58. Zanardi P, Rasetti M. Holonomic quantum computation. Phys Lett A. 1999;264:94.

    ADS  MathSciNet  MATH  Google Scholar 

  59. Duan L-M, Cirac JI, Zoller P. Geometric manipulation of trapped ions for quantum computation. Science. 2001;292:1695. https://science.sciencemag.org/content/292/5522/1695.full.pdf.

    ADS  Google Scholar 

  60. Zhu S-L, Wang ZD. Unconventional geometric quantum computation. Phys Rev Lett. 2003;91:187902.

    ADS  Google Scholar 

  61. Wu L-A, Zanardi P, Lidar DA. Holonomic quantum computation in decoherence-free subspaces. Phys Rev Lett. 2005;95:130501.

    ADS  MathSciNet  Google Scholar 

  62. Oreshkov O, Brun TA, Lidar DA. Fault-tolerant holonomic quantum computation. Phys Rev Lett. 2009;102:070502.

    ADS  MathSciNet  Google Scholar 

  63. Xiang-Bin W, Keiji M. Nonadiabatic conditional geometric phase shift with NMR. Phys Rev Lett. 2001;87:097901.

    ADS  Google Scholar 

  64. Sjöqvist E, Tong DM, Andersson LM, Hessmo B, Johansson M, Singh K. Non-adiabatic holonomic quantum computation. New J Phys. 2012;14:103035.

    MathSciNet  MATH  Google Scholar 

  65. Xu GF, Zhang J, Tong DM, Sjöqvist E, Kwek LC. Nonadiabatic holonomic quantum computation in decoherence-free subspaces. Phys Rev Lett. 2012;109:170501.

    ADS  Google Scholar 

  66. Feng G, Xu G, Long G. Experimental realization of nonadiabatic holonomic quantum computation. Phys Rev Lett. 2013;110:190501.

    ADS  Google Scholar 

  67. Zu C, Wang W-B, He L, Zhang W-G, Dai C-Y, Wang F, Duan L-M. Experimental realization of universal geometric quantum gates with solid-state spins. Nature. 2014;514:72–5.

    ADS  Google Scholar 

  68. Sjöqvist E, Pati AK, Ekert A, Anandan JS, Ericsson M, Oi DKL, Vedral V. Geometric phases for mixed states in interferometry. Phys Rev Lett. 2000;85:2845.

    ADS  Google Scholar 

  69. Du J, Zou P, Shi M, Kwek LC, Pan J-W, Oh CH, Ekert A, Oi DKL, Ericsson M. Observation of geometric phases for mixed states using NMR interferometry. Phys Rev Lett. 2003;91:100403.

    ADS  Google Scholar 

  70. Shor PW. Algorithms for quantum computation: discrete logarithms and factoring. In: Proceedings 35th annual symposium on foundations of computer science. 1994. p. 124–34.

    Google Scholar 

  71. Shor PW. Polynomial-time algorithms for prime factorization and discrete logarithms on a quantum computer. SIAM Rev. 1999;41:303.

    ADS  MathSciNet  MATH  Google Scholar 

  72. Cerezo M, Arrasmith A, Babbush R, Benjamin SC, Endo S, Fujii K, McClean JR, Mitarai K, Yuan X, Cincio L, et al. Variational quantum algorithms. arXiv preprint. arXiv:2012.09265 (2020).

  73. 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.

    ADS  Google Scholar 

  74. LaRose R, Tikku A, O’Neel-Judy E, Cincio L, Coles PJ. Variational quantum state diagonalization. npj Quantum Inf. 2019;5:1.

    Google Scholar 

  75. Zeng J, Cao C, Zhang C, Xu P, Zeng B. A variational quantum algorithm for Hamiltonian diagonalization. arXiv preprint. arXiv:2008.09854 (2020).

  76. Romero J, Olson JP, Aspuru-Guzik A. Quantum autoencoders for efficient compression of quantum data. Quantum Sci Technol. 2017;2:045001.

    ADS  Google Scholar 

  77. Cao C, Wang X. Noise-assisted quantum autoencoder. arXiv preprint. arXiv:2012.08331 (2020).

  78. Yuan X, Endo S, Zhao Q, Li Y, Benjamin SC. Theory of variational quantum simulation. Quantum. 2019;3:191.

    Google Scholar 

  79. Preskill J. Quantum computing in the nisq era and beyond. Quantum. 2018;2:79.

    Google Scholar 

  80. Hempel C, Maier C, Romero J, McClean J, Monz T, Shen H, Jurcevic P, Lanyon BP, Love P, Babbush R et al.. Quantum chemistry calculations on a trapped-ion quantum simulator. Phys Rev X. 2018;8:031022.

    Google Scholar 

  81. Lee J, Huggins WJ, Head-Gordon M, Whaley KB. Generalized unitary coupled cluster wave functions for quantum computation. J Chem Theory Comput. 2018;15:311.

    Google Scholar 

  82. Wecker D, Hastings MB, Troyer M. Progress towards practical quantum variational algorithms. Phys Rev A. 2015;92:042303.

    ADS  Google Scholar 

  83. Wiersema R, Zhou C, de Sereville Y, Carrasquilla JF, Kim YB, Yuen H. Exploring entanglement and optimization within the Hamiltonian variational ansatz. PRX Quantum. 2020;1:020319.

    Google Scholar 

  84. Mitarai K, Negoro M, Kitagawa M, Fujii K. Quantum circuit learning. Phys Rev A. 2018;98:032309.

    ADS  Google Scholar 

  85. Schuld M, Bergholm V, Gogolin C, Izaac J, Killoran N. Evaluating analytic gradients on quantum hardware. Phys Rev A. 2019;99:032331.

    ADS  Google Scholar 

  86. Mari A, Bromley TR, Killoran N. Estimating the gradient and higher-order derivatives on quantum hardware. Phys Rev A. 2020;103:012405.

    ADS  MathSciNet  Google Scholar 

  87. 5-qubit backend: IBM Q team. IBM Q 5 Yorktown backend specification V2.2.5. Retrieved from https://quantum-computing.ibm.com (2021).

  88. Li Y, Benjamin SC. Efficient variational quantum simulator incorporating active error minimization. Phys Rev X. 2017;7:021050.

    Google Scholar 

  89. Endo S, Benjamin SC, Li Y. Practical quantum error mitigation for near-future applications. Phys Rev X. 2018;8:031027.

    Google Scholar 

  90. Barron GS, Wood CJ. Measurement error mitigation for variational quantum algorithms. arXiv preprint. arXiv:2010.08520 (2020).

Download references

Acknowledgements

We thank Jun Li and Tao Xin for their contribution to the early stage of this project.

Funding

The whole work is funded by SpinQ technology.

Author information

Authors and Affiliations

Authors

Contributions

S-YH, GM, JX and BZ are responsible for this work. S-YH and GF, CC, ZW and DL designed and conducted the experiments. All authors contributed to the designing and manufacturing of Gemini. All authors read and approved the final manuscript.

Corresponding author

Correspondence to Shi-Yao Hou.

Ethics declarations

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

Hou, SY., Feng, G., Wu, Z. et al. SpinQ Gemini: a desktop quantum computing platform for education and research. EPJ Quantum Technol. 8, 20 (2021). https://doi.org/10.1140/epjqt/s40507-021-00109-8

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1140/epjqt/s40507-021-00109-8

PACS Codes