Introduction

Quantum computation is carried out with the use of quantum mechanical states1,2,3, where superpositions and entanglements play essential roles. In order to execute arbitrary quantum algorithms, it is enough to construct the π/4 phase-shift gate, the Hadamard gate, and the controlled-NOT-(CNOT) gate. Namely, universal quantum computation is made possible by these three gates according to the Solovay–Kitaev theorem4,5,6.

A fundamental problem is how to construct qubits with the use of actual materials. Attempts have been made in superconductors7, photonic systems8, quantum dots9, trapped ions10, and nuclear magnetic resonance11,12. Recently, qubits based on nanoscale skyrmions have also been proposed13,14. It is worth mentioning that skyrmions are typical topological spin textures in magnetic materials with chiral exchange interactions15,16,17,18. They can be found in both two-dimensional and three-dimensional magnetic nanostructures17,18,19,20,21 and therefore, are promising candidates for classical and quantum applications based on magnetic materials13,14,22. However, the simplest example of a qubit is a single spin, where the up spin is assigned to the quantum state \(\left\vert 0\right\rangle\) and the down spin is assigned to the state \(\left\vert 1\right\rangle\). The one-qubit gate operation is executed by applying a magnetic field, where the Rabi precession changes the direction of the spin. The Heisenberg interaction gives a two-qubit gate operation9,12.

Instead of using an isolated single spin, we focus on the core spin in a nanoscale disk made of a chiral ferromagnet, where the magnetic dipole–dipole interaction (DDI) and the easy-plane magnetic anisotropy force the spin direction to show a clockwise or anticlockwise circular rotation in disk geometry, forming a vortex-like structure called a meron23,24,25,26,27,28,29,30,31,32,33. Four typical spin configurations of merons are illustrated in Fig. 1. Due to the Dzyaloshinskii–Moriya interaction (DMI), the degenerated ground states are given by the left-handed merons30 as shown in Fig. 1a, b, which serve as a classical bit.

Fig. 1: Schematic illustration of Bloch-type merons.
figure 1

a A Bloch-type meron with polarity p = 1 and chirality c = 1 representing the qubit state \(\left\vert 0\right\rangle\). b A Bloch-type meron with p = −1 and c = −1 representing \(\left\vert 1\right\rangle\). c A Bloch-type meron with p = 1 and c = −1. d A Bloch-type meron with p = −1 and c = 1. a and b are the left-handed merons, while c and d are right-handed merons. The right-handed merons have higher energy than the left-handed merons due to the DMI considered in this work. The arrow represents the spin direction. The out-of-plane spin components are color-coded by the red and blue color scheme: the red arrow points in the +z direction and the blue arrow points in the −z direction.

The meron structure is also a topological spin texture and is topologically protected when the sample size is infinitely large. However, when its size is of the order of 100 nm, it is known to be quite stable and yet to be possible to reverse the core spin. The core-spin direction can be reversed and read out by using a magnetic field23,26,28 or spin-polarized current24,25,27. Hence, a random-access memory has been proposed based on merons25.

In this work, we propose to use a nanoscale meron in a magnetic nanodisk as a qubit, where it simulates a single spin with a longer relaxation time. First, we study numerically how much the size of a classical meron can be made small. We find that a meron with a radius containing as small as 7 spins are stable by assuming typical material parameters. It is of the order of 3 nm as the lattice constant is 0.4 nm. When the radius of the magnetic nanodisk is of the order of nanometers, the quantum effect will be dominant. A nanoscale meron is uniquely specified by the direction of the core spin. Thus, we assign the up-spin state as \(\left\vert 0\right\rangle\) and the down-spin state as \(\left\vert 1\right\rangle\). Their superposition is allowed quantum mechanically, which represents the qubit.

The Zeeman effect due to a perpendicular constant magnetic field induces the Pauli-Z operation to this qubit. By controlling the time duration of the Zeeman field, it is possible to construct an arbitrary phase-shift gate including the π/4 phase shift gate. Furthermore, by applying an in-plane constant magnetic field, it is possible to flip a spin, which acts as the Pauli-X gate. A sequential application of the Pauli-Z and Pauli-X gates produces the Hadamard gate. Finally, the Ising interaction between layered merons produces the controlled-Z (CZ) gate. A sequential application of the CZ and Pauli-Z gates produces the CNOT gate.

Results and discussion

Classical meron in a chiral magnet

A meron is formed when the spin system has a disk geometry. It is a vortex-like circulating structure of spins, where the spins on the circumference lie within the plane while the core spin points upward or downward, forming the Bloch structure due to the DDI, as illustrated in Fig. 1.

The spin texture located at the coordinate center is parametrized as

$${{{{{{{\boldsymbol{m}}}}}}}}\left(x,y\right)=(\sin \theta (r)\cos \phi ,\sin \theta (r)\sin \phi ,\cos \theta (r)),$$
(1)

with

$$\phi =\varphi +\eta +\pi /2,$$
(2)

where φ is the azimuthal angle (0 ≤ φ < 2π) satisyfing \(x=r\cos \varphi\), \(y=r\sin \varphi\). The polar angle θ is subject to

$$\theta (0)=0,\pi ,\qquad \mathop{\lim }\limits_{r\to R}\theta (r)=\pi /2,$$
(3)

where R is the radius of the nanodisk.

A meron is specified by the spin-circulation direction called the chirality c = ±1 and the core-spin direction called the polarity p = ±1. Here, c = 1 (c = −1) for the anti-clockwise (clockwise) rotation, and p = 1 (p = −1) for the up (down) spin. The meron with cp = 1 is called right-handed and the one with cp = −1 is called left-handed.

There are four degenerate merons with c = ±1 and p = ±1 in the absence of the DMI. However, the DMI correlates the polarity and the chirality. The DMI is induced by the inversion symmetry breaking due to the interface between the nanodisk and the substrate30. As a result, the left-handed merons are energetically favored30. We assign the merons with p = 1 and p = −1 to the classical states \(\left\vert 0\right\rangle\) and \(\left\vert 1\right\rangle\), respectively.

Comments are in order. First, there is a difference from the conventional definition in Eq. (2) by angle π/2, which makes η = 0, π correspond to c = 1, −1, respectively. Second, θ(0) = 0, π correspond to p = 1, −1, respectively, in the boundary conditions (3).

There are two topological numbers defining the meron. One is the skyrmion number,

$$Q\equiv -\frac{1}{4\pi }\int{{{{{{{\boldsymbol{m}}}}}}}}\left({{{{{{{\boldsymbol{r}}}}}}}}\right)\cdot ({\partial }_{x}{{{{{{{\boldsymbol{m}}}}}}}}\left({{{{{{{\boldsymbol{r}}}}}}}}\right)\times {\partial }_{y}{{{{{{{\boldsymbol{m}}}}}}}}\left({{{{{{{\boldsymbol{r}}}}}}}}\right)){\rm {d}}x{\rm {d}}y,$$
(4)

which is given by Q = p/2 depending on the polarity p. Note that Q is a half-integer for the meron.

The other is the winding number defined by

$$\omega \equiv \int{\left({{{{{{{\boldsymbol{m}}}}}}}}\times \frac{\partial {{{{{{{\boldsymbol{m}}}}}}}}}{\partial \varphi }\right)}_{z}{\rm {d}}\varphi =c,$$
(5)

which depends on the chirality c.

It is a nontrivial problem how much the size of a meron can be made small. Let us call it a meron with a radius n when its radius contains n spins. We have performed simulations on the stability of a relaxed static meron with radius n, n = 3, 4, , 10, by embedding it in the (2n−1) × (2n−1) square lattice, as shown in Fig. 2. The simulations are carried out under the framework of micromagnetics (see the “Methods” section), where we include the ferromagnetic exchange, the DMI, the magnetic DDI, and the easy-plane magnetic anisotropy. As a concrete instance, we have used the material parameters Aex = 0.32 pJ m−1, D = 0.5 mJ m−2, and Ms = 152 kA m−1. We also considered an in-plane magnetic anisotropy K = −0.5 MJ m−3, which favors in-plane spin textures and could assist in stabilizing the meron state. The simulated state of a typical meron is demonstrated in Fig. 2 for n = 3, 4, , 10. We find that a meron is formed for n ≥ 7.

Fig. 2: A simulated state for a meron for radius n = 3, 4, , 10.
figure 2

The in-plane spin direction is indicated by the arrow. The out-of-plane spin component is color-coded: white is in-plane and red is out of the plane. The material parameters used in the simulation are: the exchange constant Aex = 0.32 pJ m−1, Dzyaloshinskii–Moriya interaction (DMI) constant D = 0.5 mJ m−2, saturation magnetization Ms = 152 kA m−1, and anisotropy constant K = −0.5 MJ m−3. More details are given in the “Methods” section.

There are two key features with respect to a meron. One is that a small-size meron is stabilized for a small value of the exchange interaction. It is understood that the exchange interaction becomes large for a large spin angle between the adjacent spins. The spin angle becomes large and the small exchange interaction has an advantage for a nanoscale meron. The other feature is that the large easy-plane magnetic anisotropy stabilizes a nanoscale meron. It is natural because the meron has an in-plane vortex structure except for the core. The radius can be as small as 7 spins. The requirement of the exchange interaction and the easy-plane magnetic anisotropy is relaxed for a larger size of a meron.

Core-spin qubit

We consider a nanodisk in the order of nanometers, where a superposition of the up and down spins is a quantum mechanical state. In this regime, the up and down states of the core spin may act as a qubit. We assign the meron with the up core spin (p = 1) as the quantum state \(\left\vert 0\right\rangle\) and the one with the down core-spin (p = −1) as the quantum state \(\left\vert 1\right\rangle\), as illustrated in Fig. 1. We propose to construct various quantum gates by controlling the meron core spin.

Pauli-Z gate

When we apply an external constant magnetic field Bz along the z-axis, the Zeeman effect splits the energy between the up and down spins. The effective Hamiltonian is given by

$${H}_{z}={\alpha }_{z}{\sigma }_{z}={\alpha }_{z}(\left\vert 0\right\rangle \left\langle 0\right\vert -\left\vert 1\right\rangle \left\langle 1\right\vert ),$$
(6)

where αz is a constant proportional to Bz. The Pauli-Z gate is constructed by the unitary evolution of Hz, and given by UZ = σz (see the “Methods” section).

We have numerically evaluated the energy under such a magnetic field in Fig. 3. The energy difference depending on the polarity is of the order of 10−22 J at 100 mT, from which it follows that the operating time is of the order of 1 ps based on Eq. (16).

Fig. 3: Total energy of a meron with p = ± 1 as a function of applied perpendicular magnetic field Bz.
figure 3

The radius of a meron is n = 7. The simulation parameters are given in the caption of Fig. 2. More details are given in the “Methods” section.

Pauli-X gate

There are several ways to flip the core spin, such as by applying in-plane magnetic field34, in-plane oscillating magnetic field35, currents24,36,37, rotating magnetic fields38,39,40, and spin-polarized current41,42. In any case, the effective Hamiltonian is given by

$${H}_{x}={\alpha }_{x}{\sigma }_{x}={\alpha }_{x}(\left\vert 0\right\rangle \left\langle 1\right\vert +\left\vert 1\right\rangle \left\langle 0\right\vert ),$$
(7)

where αx is a constant. The Pauli-X gate is constructed by the unitary evolution of Hx, and given by UX = σx (see the “Methods” section).

We have numerically analyzed the spin–flip process, by applying an external constant pulse in-plane magnetic field. We see explicitly how each spin rotates to flip the core spin within a meron in Fig. 4. It follows that the switching time of the vortex core direction is of the order of 200 ps.

Fig. 4: The switching of the polarity of a meron induced by an in-plane magnetic field pulse.
figure 4

a The out-of-plane component of the reduced magnetization mz as a function of time. The initial state is a meron (p = 1) relaxed in the disk with 13 spins in the diameter (i.e., the radius of the meron is n = 7). The in-plane magnetic field of Hx = 400 mT is applied for 60 ps (indicated by the cyan area), followed by the relaxation until t = 1000 ps. The meron is switched to the state with p = −1 after the application of the in-plane field. b The in-plane components of the reduced magnetization mx and my as functions of time. c Selected top-view snapshots showing the spin configuration in the nanodisk during the field-induced switching of the meron polarity. The simulation parameters are given in the caption of Fig. 2. More details are given in the “Methods” section.

Ising gate

We consider a bilayer nanodisk, where two nanodisks are placed vertically (Fig. 5a). The exchange interaction between two spins reads

$${H}_{{{{{{{{\rm{Ising}}}}}}}}}={J}_{{{{{{{{\rm{exchange}}}}}}}}}{\sigma }_{z}^{(1)}\otimes {\sigma }_{z}^{(2)},$$
(8)

where the two nanodisks are placed vertically (Fig. 5a). The Ising gate is constructed by the unitary evolution of HIsing, and given by \({U}_{ZZ}={\sigma }_{z}^{(1)}\otimes {\sigma }_{z}^{(2)}\) (see the “Methods” section).

Fig. 5: The Ising interaction between two merons.
figure 5

a Schematic illustration for the Ising interaction between two merons. Dark green cylinders represent a spacer. b The contribution of different energy terms to the total energy ETotal of a relaxed exchange-coupled bilayer meron with identical or opposite core-spin direction, including the intralayer exchange energy EA, DMI energy EDMI, interlayer exchange energy EInter, anisotropy energy EK, and dipole–dipole interaction (DDI) energy EDDI. The total energy difference for the exchange-coupled bilayer merons with identical and opposite core-spin directions equals 3.6 × 10−22 J. The radius of the meron is n = 7, and we have used AInter = 0.005 pJ m−1. The simulation parameters are given in the caption of Fig. 2. More details are given in the “Methods” section.

We have numerically evaluated the energy difference between the identical and opposite polarities, which is ~ 3.6 × 10−22 J. The operating time is ~0.23 ps based on Eq. (25). The detailed energies of the bilayer merons are shown in Fig. 5b.

Universal quantum gates

The phase-shift gate is constructed with the use of Hz. The Hadamard gate is constructed with the use of Hz and Hx. The CNOT gate is constructed with by HIsing and Hz. See the “Methods” section for more details.

Thermal effect

We study thermal stability at finite temperatures. The results are given in Fig. 6. The dynamics of the total mz are shown in Fig. 6a, where it is seen that the core spin does not flip below 3 K, but flips above 3 K. The time evolution of the Pontryagin number is shown in Fig. 6b. It is stable below 3 K. The time evolution of the spatial profile of the spin configuration is shown in Fig. 6c. The meron texture is destroyed above 3 K. These phenomena correspond to the core spin flipping dynamics in Fig. 6a. Thus, we need to cool down a sample below 3 K.

Fig. 6: The meron dynamics at finite temperatures.
figure 6

a The out-of-plane spin component mz as functions of time at different temperatures T. A relaxed meron with p = +1 is placed at the nanodisk with n = 7 at t = 0 ps. The thermal fluctuations reduce the stability of the meron state. b The topological charge of the system Q as functions of time at different temperatures. For a relaxed meron at zero temperature, the topological charge equals 0.5. c Selected top-view snapshots of the spin configurations in the nanodisk at different temperatures. The radius of the meron is n = 7, and the damping parameter α = 0.1. The simulation parameters are given in the caption of Fig. 2. More details are given in the “Methods” section.

Relaxation time and coherent time

The skyrmion-number conservation prohibits the core spin to flip when the sample is infinitely large. Then, the relaxation time is infinite. This is topological protection. Physically, it follows from the fact that it costs infinitely large energy to inverse spin directions in an infinitely large sample. The topological protection is lost when the sample size is small. Indeed, when its size is of the order of 100 nm, it is possible to flip the core spin by applying magnetic field23,26,28 or spin-polarized current24,25,27.

The two merons representing \(\left\vert 0\right\rangle\) and \(\left\vert 1\right\rangle\) are obstructed by an energy barrier made of the exchange energy, easy-plane magnetic anisotropy, and the DDI. We make an estimation for a small-size classical meron based on the energy (9) in the “Methods” section. The size dependence of various energies including the total, exchange, DMI, easy-plane magnetic anisotropy, and magnetic DDI energies is shown in Fig. 7. The total energy increases as the increase of the meron size as shown in Fig. 7a. The total energy is mainly determined by the exchange energy as shown in Fig. 7b. Roughly speaking, the relaxation time is proportional to the total energy because it is necessary to overcome the total energy to flip the core spin.

Fig. 7: Size dependence of the energy of the meron in units of Joule.
figure 7

a The total energy. b The exchange energy. c The DMI energy. d The easy-plane magnetic anisotropy energy. e The magnetic dipole–dipole energy. f The normalized out-of-plane magnetization. The radius of the meron is n = 7. The simulation parameters are given in the caption of Fig. 2. More details are given in the “Methods” section.

There are some features in the size dependence of the energy. The DMI decreases as the increase of meron size as shown in Fig. 7c. It is understood as follows. The DMI is proportional to the spin angles between the adjacent sites. The spin angle is small for larger size merons because the spin texture becomes smooth. As a result, the DMI energy is smaller for larger size merons.

The magnetic anisotropy energy and the DDI energy monotonically increase as the increase of size of a meron as shown in Fig. 7d, e.

The mean magnetization becomes smaller for larger-size merons as shown in Fig. 7f. It means that the size of the core spin is almost identical and the total spin texture looks more like a vortex structure for larger-size merons.

Initialization

We apply a magnetic field to the sample and raise the temperature, where the system is a paramagnet. We have numerically checked that the polarity is chosen to be up by applying a small external magnetic field. When we cool down the sample, left-handed up-spin merons are nucleated. This is the initialization of the quantum state \(\left\vert 00\cdots 0\right\rangle\).

Read out

The polarity can be observed by the full-field soft X-ray transmission microscopy30,31, magnetic force microscopy24,43, or magnetic tunneling junction44. The polarity is fixed to be up or down by the observation. Hence, the quantum state is fixed to be \(\left\vert {s}_{1}{s}_{2}\cdots {s}_{N}\right\rangle\) with sj = 0, 1 as in the standard quantum computation.

Conclusions

We have explicitly analyzed how the Pauli-X, Pauli-Z, and Ising gate operations proceed in a meron-based system. It seems to be a puzzle that the core spin of a meron can be flipped by applying an in-plane constant magnetic field because it is well-known that the spin direction of a ferromagnet cannot be flipped. We have demonstrated how each spin is flipped inside a meron under an in-plane constant magnetic field in Fig. 4. We find that the following process continuously occurs: The spin pointing upward at the core moves to the edge and tilts to the horizontal plane, and then, the spin at the symmetric edge point across the center tilts downward to the south pole and moves to the core.

The numerical estimation suggests that the minimum size of a meron is of the order of 3 nm. The present proposal will excite experimental studies on magnetic nanodisks to pursue how small a nanodisk can be manufactured.

Methods

Simulations of spin configurations

The static spin configurations in the magnetic nanodisk are simulated by using the GPU-accelerated micromagnetic simulator MUMAX3 developed at Ghent University45. The energy density of the system is given by

$$\begin{array}{rcl}{{{{{{{\mathcal{E}}}}}}}}=-{A}_{{{{{{{{\rm{ex}}}}}}}}}\mathop{\sum}\limits_{\langle i,j\rangle }{{{{{{{{\boldsymbol{m}}}}}}}}}_{i}\cdot {{{{{{{{\boldsymbol{m}}}}}}}}}_{j}-\mathop{\sum}\limits_{i}K{({{{{{{{{\boldsymbol{m}}}}}}}}}_{i}\cdot {{{{{{{{\boldsymbol{e}}}}}}}}}_{z})}^{2}-{M}_{{{{{{{{\rm{s}}}}}}}}}\mathop{\sum}\limits_{i}{{{{{{{\boldsymbol{B}}}}}}}}\cdot {{{{{{{{\boldsymbol{m}}}}}}}}}_{i}\\ -\,{\mu }_{0}{M}_{{{{{{{{\rm{s}}}}}}}}}\mathop{\sum}\limits_{i}{{{{{{{{\boldsymbol{m}}}}}}}}}_{i}\cdot \frac{1}{2}{{{{{{{{\boldsymbol{H}}}}}}}}}_{{{{{{{{\rm{dd}}}}}}}}}-\mathop{\sum}\limits_{\langle i,j\rangle }D{{{{{{{{\boldsymbol{e}}}}}}}}}_{ij}\cdot ({{{{{{{{\boldsymbol{m}}}}}}}}}_{i}\times {{{{{{{{\boldsymbol{m}}}}}}}}}_{j}),\end{array}$$
(9)

where mi represents the local magnetic moment orientation (i.e., mi = 1), and Aex represents the ferromagnetic exchange constant. K is the easy-plane anisotropy constant, which is a negative number. The axis direction ez is normal to the easy plane. Ms represents saturation magnetization. B is the applied magnetic field. Hdd is the magnetic-dipole–dipole interaction. The last term represents the bulk DMI with eij being the unit vector pointing between the lattice site i and j, and D being the magnitude of the DMI, which stabilizes Bloch-type merons. The simulations of spin dynamics at zero and finite temperatures are carried out by using the micromagnetic simulator OOMMF46, where the spin dynamics at zero temperature is described by the Landau–Lifshitz–Gilbert (LLG) equation

$$\frac{{\rm {d}}{{{{{{{\boldsymbol{m}}}}}}}}}{{\rm {d}}t}=-{\gamma }_{0}{{{{{{{\boldsymbol{m}}}}}}}}\times {{{{{{{{\boldsymbol{h}}}}}}}}}_{{{{{{{{\rm{eff}}}}}}}}}+\alpha \left({{{{{{{\boldsymbol{m}}}}}}}}\times \frac{{\rm {d}}{{{{{{{\boldsymbol{m}}}}}}}}}{{\rm {d}}t}\right),$$
(10)

where

$${{{{{{{{\boldsymbol{h}}}}}}}}}_{{{{{{{{\rm{eff}}}}}}}}}=-\frac{1}{{\mu }_{0}{M}_{{{{{{{{\rm{s}}}}}}}}}}\cdot \frac{\delta {{{{{{{\mathcal{E}}}}}}}}}{\delta {{{{{{{\boldsymbol{m}}}}}}}}}$$
(11)

is the effective field. α is the Gilbert damping parameter, and γ0 is the absolute gyromagnetic ratio. The thermal effect is described by the stochastic LLG equation, where a highly irregular fluctuating field hf is added to the effective field heff, satisfying

$$\langle {h}_{i}({{{{{{{\boldsymbol{x}}}}}}}},t) \rangle = \; 0,\\ \langle {h}_{i}({{{{{{{\boldsymbol{x}}}}}}}},t){h}_{j}({{{{{{{\boldsymbol{x}}}}}}}}^{\prime} ,t^{\prime} ) \rangle = \frac{2\alpha {k}_{{{{{{{{\rm{B}}}}}}}}}T}{{M}_{{{{{{{{\rm{s}}}}}}}}}{\gamma }_{0}{\mu }_{0}V}{\delta }_{ij}\delta ({{{{{{{\boldsymbol{x}}}}}}}}-{{{{{{{\boldsymbol{x}}}}}}}}^{\prime} )\delta (t-t^{\prime} ),$$
(12)

where i and j are Cartesian components, kB is the Boltzmann constant, T is the temperature, V is the volume, and δij and δ(…) stand for the Kronecker and Dirac delta symbols, respectively. The finite-temperature simulations are performed with a fixed time step of 2 × 10−15 s, while the time step in zero-temperature simulations is adaptive. The square lattice with a circular shape is used for simulations with the lattice constant being 0.4 nm, i.e., the mesh size is 0.4 nm × 0.4 nm. Open boundary conditions are used for all sample edges. The nanodisk is assumed to be a 1-nm-thick with bulk DMI. The following material parameters are used as default parameters: Aex = 0.32 pJ m−1, α = 0.3, Ms = 152 kA m−1, D = 0.5 mJ m−2, and K = −0.5 mJ m−3.

Construction of quantum gates

The Schrödinger equation for qubits is

$$i\hslash \frac{d}{dt}\left\vert \psi \right\rangle =H\left\vert \psi \right\rangle ,$$
(13)

with the Hamiltonian

$$H={\alpha }_{z}{\sigma }_{z}+{\alpha }_{x}{\sigma }_{x}$$
(14)

for a single qubit, and

$${H}_{{{{{{{{\rm{Ising}}}}}}}}}={J}_{{{{{{{{\rm{exchange}}}}}}}}}{\sigma }_{z}^{(1)}\otimes {\sigma }_{z}^{(2)}$$
(15)

for two qubits. We control the coefficient Bz, Bx, and Jexchange temporally. We first discuss single-qubit gates.

Pauli-Z gate

We set Bx = 0 and

$${\alpha }_{z}\left(t\right)=\hslash \theta /2{t}_{0}$$
(16)

for 0 ≤ t ≤ t0 and \({\alpha }_{z}\left(t\right)=0\) otherwise. The solution of the Schrödinger equation reads

$${U}_{Z}\left(\theta \right)=\exp \left[-\frac{i}{\hslash }{\sigma }_{z}\int\nolimits_{0}^{{t}_{0}}{\alpha }_{z}\left(t\right){\rm {d}}t\right]=\exp \left[-\frac{{\rm {i}}\theta }{2}{\sigma }_{z}\right].$$
(17)

This is the z rotation gate by the angle θ. It gives an arbitrary phase-shift gate

$${U}_{\theta }={{\rm {e}}}^{{\rm {i}}\theta /2}{U}_{Z}\left(-\theta \right)={{{{{{{\rm{diag}}}}}}}}(1,{{\rm {e}}}^{{\rm {i}}\theta }).$$
(18)

In particular, the Pauli-Z gate UZ ≡ σz is constructed by setting θ = π as \({U}_{Z}=i{U}_{Z}\left(\pi \right)\).

Pauli-X gate

In a similar way, we set Bz = 0 and

$${\alpha }_{x}=\hslash \theta /2{t}_{0}$$
(19)

for 0 ≤ t ≤ t0 and \({B}_{z}\left(t\right)=0\) otherwise. The solution of the Schrödinger equation reads

$${U}_{X}\left(\theta \right)=\exp \left[-\frac{i}{\hslash }{\sigma }_{x}\int\nolimits_{0}^{{t}_{0}}{\alpha }_{x}\left(t\right){\rm {d}}t\right]=\exp \left[-\frac{{\rm {i}}\theta }{2}{\sigma }_{x}\right].$$
(20)

This is the x rotation gate by the angle θ. The Pauli-X gate UX ≡ σx is constructed by setting θ = π as \({U}_{X}=i{U}_{X}\left(\pi \right)\).

π/4 phase-shift gate

The π/4 phase-shift gate is realized by the z rotation (17) with the angle −π/4 as

$${U}_{T}={{\rm {e}}}^{{\rm {i}}\pi /8}{U}_{Z}\left(-\frac{\pi }{4}\right),$$
(21)

up to the overall phase factor eiπ/8.

Hadamard gate

The Hadamard gate is defined by

$${U}_{{{{{{{{\rm{H}}}}}}}}}\equiv \frac{1}{\sqrt{2}}\left(\begin{array}{cc}1&1\\ 1&-1\end{array}\right),$$
(22)

which is realized by a sequential application of the z rotation and the x rotation47 as

$${U}_{{{{{{{{\rm{H}}}}}}}}}=-i{U}_{Z}\left(\frac{\pi }{2}\right){U}_{X}\left(\frac{\pi }{2}\right){U}_{Z}\left(\frac{\pi }{2}\right),$$
(23)

with the use of Eqs. (17) and (20). The quantum circuit representation of Eq. (23) is shown in Fig. 8a.

Fig. 8: Quantum circuit representations.
figure 8

a The Hadamard gate in terms of a sequential application of rotation gates as in Eq. (23). b The CZ gate in terms of a sequential application of the z rotation gate and the Ising coupling gate UZZ as in Eq. (28). c Quantum circuit representations of the equivalence between the CNOT gate as in Eq. (30) and the CZ gate with the application of the Hadamard gates. \({U}_{{{{{{{{\rm{CNOT}}}}}}}}}^{1\to 2}\).

Ising coupling gate

Next, we discuss the two-qubit gate. We manually control dm as a function of time. Then, the time evolution is given by

$$U=\exp \left[-\frac{i}{\hslash }\int\nolimits_{0}^{{t}_{0}}{H}_{{{{{{{{\rm{Ising}}}}}}}}}\left({d}_{m}(t)\right){\rm {d}}t\right]$$
(24)

with dm = dm(t) in Eq. (15). If we set

$${J}_{{{{{{{{\rm{int}}}}}}}}}\left({d}_{m}(t)\right)=\hslash \theta /2{t}_{0}$$
(25)

for 0 ≤ t ≤ t0 and \({J}_{{{{{{{{\rm{int}}}}}}}}}\left({d}_{m}(t)\right)=0\) otherwise, we obtain the Ising coupling gate

$${U}_{ZZ}\left(\theta \right)\equiv \exp \left[-\frac{i\theta }{2}{\sigma }_{z}^{\left(1\right)}{\sigma }_{z}^{\left(2\right)}\right],$$
(26)

acting on the 2-qubit in the neighboring layers. By setting θ = π, we obtain the Ising coupling gate UZZ ≡ (1, −1, −1, 1) as UZZ = iUZZ(π).

CZ gate

The controlled-Z (CZ) gate UCZ is a unitary operation acting on two adjacent qubits defined by

$${U}_{{{{{{{{\rm{CZ}}}}}}}}}={{{{{{{\rm{diag.}}}}}}}}(1,1,1,-1),$$
(27)

and constructed as48

$${U}_{{{{{{{{\rm{CZ}}}}}}}}}={{\rm {e}}}^{{\rm {i}}\pi /4}{U}_{Z}^{\left(1\right)}\left(\frac{\pi }{2}\right){U}_{Z}^{(2)}\left(\frac{\pi }{2}\right){U}_{ZZ}^{\left(1\right)}\left(-\frac{\pi }{2}\right),$$
(28)

whose quantum circuit representation is shown in Fig. 8b.

CNOT gate

The CNOT gate \({U}_{{{{{{{{\rm{CNOT}}}}}}}}}^{1\to 2}\) is defined by

$${U}_{{{{{{{{\rm{CNOT}}}}}}}}}^{1\to 2}\equiv \left(\begin{array}{cccc}1&0&0&0\\ 0&1&0&0\\ 0&0&0&1\\ 0&0&1&0\end{array}\right),$$
(29)

which is constructed by a sequential application of the CZ gate and the Hadamard gate as

$${U}_{{{{{{{{\rm{CNOT}}}}}}}}}^{1\to 2}={U}_{{{{{{{{\rm{H}}}}}}}}}^{\left(2\right)}{U}_{{{{{{{{\rm{CZ}}}}}}}}}{U}_{{{{{{{{\rm{H}}}}}}}}}^{\left(2\right)},$$
(30)

where the control qubit is the meron in the first layer and the target qubit is the meron in the second layer. The corresponding quantum circuit representation is shown in Fig. 8c.