Measurement-based quantum computation (MBQC) offers a new platform of quantum information (QI) processing. Quantum algorithms are performed by sequential single-qubit measurements in multipartite entangled states initially (e.g., cluster states1) instead of massive controls of individual qubits during the whole information processing2,3. This advantage is, however, only beneficial for QI processing if the specific multipartite entangled state can be initially well-prepared and the capability of fast and precise single-qubit measurements are viable. For example, a two-qubit cluster state is the simplest resource state for MBQC given by |2CSAB = (|0〉A|+〉B+|1〉A|−〉B)\(\sqrt{2}\) with \(|\,\pm \,\rangle =\mathrm{(|0}\rangle \pm \mathrm{|1}\rangle )/\sqrt{2}\). If the operation angle θ is chosen for the measurement basis vectors in qubit A, \(|\,\pm \,\theta \rangle =\mathrm{(|0}\rangle \pm {e}^{-i\theta }\mathrm{|1}\rangle )/\sqrt{2}\), the resultant state in B after the measurement |±θ〉 〈±θ| on A becomes a single-qubit operated state such as \({}_{A}\,{\langle \pm \theta \mathrm{|2}CS\rangle }_{AB}\propto {\hat{e}}^{\pm }{e}^{\pm i\theta 2}H{R}^{z}(\theta )|\,+\,{\rangle }_{B}\), for Hadamard gate \(H=(X+Z)/\sqrt{2}\), z-axis rotation operator \({R}^{z}(\theta )={e}^{-i\theta 2}\mathrm{|0}\rangle \langle \mathrm{0|}+{e}^{i\theta 2}\mathrm{|1}\rangle \langle \mathrm{1|}\) and \({\hat{e}}^{\pm }=\mathrm{\{1,}\,X\}\) with Pauli operators X, Z. Thus, it is interpreted as the single-qubit gate HRz(θ) is performed on |+〉 by the measurement of qubit A with the chosen angle θ on |2CSAB. It is therefore of essence to demonstrate efficiently building such a useful entangled resource state and performing single-qubit measurements on the resource state for practical MBQC.

The MBQC in continuous variables (CVs) has been firstly well developed in quantum optics since such CV cluster states are achievable using traveling squeezed states through optical parametric amplifiers4,5,6,7. For example, the recent development of creating one-dimensional (1D) and 2D CV cluster states has been demonstrated in quantum optics using quantum memory and in time/frequency domain8,9,10,11. In these methods, a phase-space translation operator is in general used for single-qubit gates while a two-qubit controlled-Z gate is implemented in a sequence of beam-splitters12,13. Toward fault-tolerant CV MBQC using this approach, a scheme of high squeezing photons (20.5 dB) has been required to reach the error tolerance threshold with 10−6 through concatenated codes14, and is very challenging with the state-of-the-art experiments in quantum optics. Recently, an alternative method of creating four-qubit CV cluster states has been suggested in a circuit quantum electrodynamics (circuit-QED15) system16.

One of the advantages of using CVs is that the optical cluster states are built in a deterministic manner and can in principle store information in infinite dimension17,18,19,20 while alternative optical methods of creating discrete-variable cluster states have been in general generated in polarization or spatial modes probabilistically by using parametric down conversion21. We will in particular use a specific logical qubit encoded in generalised Schrödinger cat states, which are the superposition of phase-rotated coherent states22. It is known that the specific CV-qudit states can be used for the error-correctable QI unit against particle-loss and have been successfully demonstrated in circuit-QED for practical quantum memory23,24,25,26. This circuit-QED approach could thus be advantageous for error-correctable quantum computing equipped with photon-loss resilience in the CV-qudit code27,28.

We here propose a novel circuit-QED scheme of performing logical qubit gates and the desired outcome is achieved by cavity measurements from a tripartite CV-qudit cluster state as a single-qubit operated state in the CV-qudit code. Because it might be concerned how to initially implement the complex multipartite cluster state by the manual controls of cavity states, we first suggest a circuit-QED architecture capable of building the target CV-qudit entangled state using an induced cross-Kerr interaction, which naturally provides an entangling gate between neighbouring cavity qudits. It is known that one can in principle engineer cross-Kerr interaction in the multiple-cavity architecture with tunable self-Kerr interaction29. Then, after we define the CV-qudit and its cluster states, we present a new protocol for a logical single-qubit gate in MBQC using three specific circuit-QED techniques such as a coherent-state measurement, parity measurement, and a selective number-dependent arbitrary phase (SNAP) gate. All these techniques have been well developed and demonstrated in theory and experiment30,31,32. We finally examine the cross-Kerr entangling scheme of builiding two CV-qudit cluster states with an intermediary superconducting qubit and this circuit-QED architecture would enable to investigate not only QI processing but also more broader sciences including many-body physics33,34,35 and quantum chemistry36,37 in the future.


Circuit-QED architecture for entangled cavity states

The platform of superconducting circuits has been rapidly developed for QI processing over two decades38. The artificial qubits are intrinsically scalable and manufacturable in the forms of different qubit types with precise control of desired parameters39,40,41,42,43. In experiment, one utilises only superconducting qubits (mainly transmon qubits39,41) for QI unit while it has also been successfully shown that a coupled system of superconducting qubits and 3D cavities offers excellent capability of creating quantum cavity states through the nonilnearity of an intermediary superconducting qubit, e.g., deterministic generation of Schrödinger cat states and entangling CV states inside the cavities44,45.

As shown in the left figure of Fig. 1, we consider a circuit-QED architecture for creating entangled microwave states and the neighboring cavities are connected with each other via a middle transmon qubit Mi (i = 1, 2) enabling to entangle cavity states. This approach shows a unique advantage that a massive 1D CV-qudit cluster state can be built in one step as the key resource state for MBQC. Since two cavities are simple harmonic oscillators, a superconducting qubit inserted in between two cavities brings induced Kerr effects on the joint cavity modes. For an ideal case, it is assumed that two neighboring cavities are only coupled by a cross-Kerr interaction, which is induced by the intermediary superconducting qubit.

Figure 1
figure 1

Schematics of logical MBQC in a circuit-QED architecture. (Left) Three cavities (A, B, C) have the intersected superconducting qubits M1 and M2 used for inducing the Kerr interactions between cavities. When a 3-qudit logical cluster state is built in the cavities by cross-Ker interaction (Kij), logical MBQC is performed by a sequential measurement of each cavity. The colours of transmons energy states represent the anharmonicity of the energy levels in a transmon. (Right) the tunability of Kerr effects between the neighbouring cavities provided with the help of tunable on-site superconducting qubits and an extra (tunable) intermediary qubit in the same architecture (the details are shown in29,64). For example, the self-Kerr effects can be only reduced by shifting energy levels in on-site qubits at point (a) and the simultaneous entangling gates are performed by cross-Kerr Kij between (a,b). From (b) to (c), the cavities are uncoupled and the sequential measurements of each cavity are performed for MBQC.

In a real circuit-QED setup, this architecture might cause unwanted nonlinear effects over the cavities (e.g., self-Kerr distortion effects and non-identical cross-Kerr effects). In general, the cavity self-Kerr effect makes the amount of distortion in the cavity state and could prevent building ideal CV-qudit entangled states and to measure the cavity qubit accurately at an appropriate time. For example, let us consider the Jaynes-Cummings (JC) Hamiltonian for two cavities with an intermediary transmon is given by

$${\hat{H}}_{ABM}^{JC}=\sum _{c=A,B,M}\,{\omega }_{c}{\hat{a}}_{c}^{\dagger }{\hat{a}}_{c}+{K}_{M}{\hat{a}}_{M}^{\dagger }{\hat{a}}_{M}{\hat{a}}_{M}^{\dagger }{\hat{a}}_{M}+\sum _{c=A,B}\,{\lambda }_{c}^{M}({\hat{a}}_{M}^{\dagger }{\hat{a}}_{c}+{\hat{a}}_{M}{\hat{a}}_{c}^{\dagger }),$$

with creation operator \({\hat{a}}^{\dagger }\) and \(\hslash =1\). It is experimentally confirmed that self- and cross-Kerr effects exist in the cavities coupled with a superconducting qubit30,32 and theoretically the adiabatic elimination theory can show the existence of these effects (upto the fourth order in the JC Hamiltonian29,46,47). We will examine the validity of the induced cross-Kerr interaction in this architecture to build a two CV-qudit cluster state in Section 2.7.

Fortunately, a Kerr-engineering scheme has been recently proposed to amend self- and cross-Kerr effects in a qubit-cavity array and is applicable for creating a desired 1D CV-qudit entangled state with the help of extra tunable superconducting qubits in a similar architecture29. For example, suppose that a flux qubit is additionally attached on each cavity. In ref.29, it is shown that the controls of energy levels of the flux qubit diminish the amount of self-Kerr interaction Kj in each cavity, but the cross-Kerr interaction still survives between neighbouring cavities. As shown in the right figure of Fig. 1, two cavity states starts to be entangled with Kj ≈ 0 during the period between (a) and (b). After the entangling period, the cross-Kerr interaction can be also reduced in a similar technique and the cavity states can be effectively decoupled for better performance of individual cavity measurements between (b) and (c) (see Fig. 5 in29). For logical MBQC, we need to perform a type of quantum-non-demolition (QND) measurements on each cavity and their details are addressed in Section 2.4.

Cat qudits

We first introduce the definition of CV qudits (with d = 4) written in the superposition of phase-encoded coherent states. The CV qudits are defined by

$${\mathrm{|0}}_{4}\rangle ={M}_{\alpha }^{0}(|\alpha \rangle +|i\alpha \rangle +|\,-\,\alpha \rangle +|\,-\,i\alpha \rangle )=\mathop{\sum }\limits_{m\mathrm{=0}}^{\infty }\,{c}_{0m}\mathrm{|4}m\rangle ,$$
$${\mathrm{|1}}_{4}\rangle ={M}_{\alpha }^{1}(|\alpha \rangle -i|i\alpha \rangle -|\,-\,\alpha \rangle +i|\,-\,i\alpha \rangle )=\mathop{\sum }\limits_{m\mathrm{=0}}^{\infty }\,{c}_{1m}\mathrm{|4}m+1\rangle ,$$
$${\mathrm{|2}}_{4}\rangle ={M}_{\alpha }^{2}(|\alpha \rangle -|i\alpha \rangle +|\,-\,\alpha \rangle -|\,-\,i\alpha \rangle )=\mathop{\sum }\limits_{m\mathrm{=0}}^{\infty }\,{c}_{2m}\mathrm{|4}m+2\rangle ,$$
$${\mathrm{|3}}_{4}\rangle ={M}_{\alpha }^{3}(|\alpha \rangle +i|i\alpha \rangle -|\,-\,\alpha \rangle -i|\,-\,i\alpha \rangle )=\mathop{\sum }\limits_{m=0}^{\infty }\,{c}_{3m}\mathrm{|4}m+3\rangle ,$$

where a coherent state with real values α and ϕ is \(|\alpha {e}^{i\varphi }\rangle ={e}^{-|\alpha {|}^{2}\mathrm{/2}}{\sum }_{n=0}^{\infty }\,\frac{{\alpha }^{n}{e}^{i\varphi n}}{\sqrt{n!}|n\rangle }\) and |4m + j〉 is a Fock state with 4m + j photons (Mα as a normalisation factor). Note that their complementary qudits are defined as \(|{\tilde{0}}_{4}\rangle =|\alpha \rangle \), \(|{\tilde{1}}_{4}\rangle =|i\alpha \rangle \), \(|{\tilde{2}}_{4}\rangle =|-\,\alpha \rangle \), and \(|{\tilde{3}}_{4}\rangle =|\,-\,i\alpha \rangle \)48.

The generalised Pauli operators for the qudits are defined by \({\hat{Z}}_{4}|{\tilde{k}}_{4}\rangle =|{\tilde{(k+\mathrm{1)}}}_{4}\rangle \) and \({\hat{X}}_{4}|(k+{\mathrm{1)}}_{4}\rangle =|{k}_{4}\rangle \). The qudit Pauli operators can be physically implemented by phase rotation \({\hat{Z}}_{4}={e}^{i\pi \mathrm{2(}{\hat{a}}^{\dagger }\hat{a})}\) and photon addition \({\hat{X}}_{4}\approx {\hat{a}}^{\dagger }/\sqrt{\langle {\hat{a}}^{\dagger }\hat{a}\rangle }\) (or photon subtraction \(\hat{a}/\sqrt{\langle {\hat{a}}^{\dagger }\hat{a}\rangle }\)). Note that the normalisation coefficients \({M}_{\alpha }^{i}\) are approximately equal to 1/2 for α ≥ 2, which implies the validity of orthogonality in qudit |k4〉 for QI unit (k = 1, 2, 3, 4). In other words, if the average photon number is large enough to distinguish between coherent states, the qudits can be treated as logical qubits against photon-loss errors (details in Section 2.5)27.

How to create ideal three CV-qudit cluster states

We here show an mathematical description of how to build 1D CV-qudit cluster states with an ideal cross-Kerr interaction49,50. The cross-Kerr interaction shows a natural way to entangle two coherent states (see the details in Section 4.1). For a three-cavity case, an initial state |ψintABC is prepared in three cavities and a time-evolved state at time t is given by

$$|\psi (t){\rangle }_{ABC}=\exp (i{\hat{H}}_{ABC}\,t)|{\psi }^{int}{\rangle }_{ABC}.$$

The cross-Kerr Hamiltonian is ideally given in \({\hat{H}}_{ABC}^{tot}={K}_{AB}({\hat{a}}_{A}^{\dagger }{\hat{a}}_{A})({\hat{a}}_{B}^{\dagger }{\hat{a}}_{B})+{K}_{BC}({\hat{a}}_{B}^{\dagger }{\hat{a}}_{B})({\hat{a}}_{C}^{\dagger }{\hat{a}}_{C})\). With the assumption KAB = KBC for simplicity, the three CV-qudit state at a quarter of the revival time is written in

$$|{\psi }^{ideal}({\tau }_{r}\mathrm{/4)}{\rangle }_{ABC}=\exp (i\frac{{\tau }_{r}}{4}{\hat{H}}_{ABC}^{tot})|\alpha {\rangle }_{A}|\alpha {\rangle }_{B}|\alpha {\rangle }_{C}=12\mathop{\sum }\limits_{k\mathrm{=0}}^{3}\,|{\tilde{k}}_{4}{\rangle }_{A}|{k}_{4}{\rangle }_{B}|{\tilde{k}}_{4}{\rangle }_{C}\mathrm{.}$$

It could be crucial to match the strength values of two cross-Kerr interactions between neighbouring cavities (KAB = KBC) to create the target state in Eq. (7). Otherwise, the cavity state becomes maximally entangled in A and B at a certain time but it does not in B and C. In ref.29, a slight modification of the circuit-QED architecture has been investigated with additional superconducting qubits to control self- and cross-Kerr interactions independently. This modified architecture might thus be beneficial for building a multi-partite entangled state in many cavities at once toward practical MBQC.

Three single-qudit gates in cavity states

For logical MBQC, three specific single CV-qudit operations are required in each cavity such as (1) coherent-state projection \({\hat{P}}^{Coh}\), (2) parity measurement \({\hat{P}}^{Par}\), and (3) SNAP phase gates. Note that all the gates have already been demonstrated in a qubit-cavity architecture experimentally. In a dispersive regime of the JC Hamiltonian, which is defined by much smaller coupling strength than the difference between cavity and qubit frequencies, it is feasible to perform the projection measurement on Fock states in a cavity-transmon coupled system (see the details in Section 4.2).

To describe the operations, we define an arbitrary CV-qudit state |Ψ4A given in cavity A by

$$|{\Psi }_{4}{\rangle }_{A}=a{\mathrm{|0}}_{4}{\rangle }_{A}+b{\mathrm{|1}}_{4}{\rangle }_{A}+c{\mathrm{|2}}_{4}{\rangle }_{A}+d{\mathrm{|3}}_{4}{\rangle }_{A}\mathrm{.}$$

First, the projection set of a coherent-state is given by \({\hat{P}}^{Coh}(\alpha )=\{|{\tilde{0}}_{4}\rangle \langle {\tilde{0}}_{4}|,\,\,1-|{\tilde{0}}_{4}\rangle \langle {\tilde{0}}_{4}|\}\) and is viable in a microwave cavity coupled with a superconducting qubit and a readout resonator24. For example, \({\hat{P}}^{Coh}(\alpha )|{\Psi }_{4}{\rangle }_{A}\approx |{\tilde{0}}_{4}\rangle =|\alpha \rangle \) for \(|{\tilde{0}}_{4}\rangle \langle {\tilde{0}}_{4}|\) and the definitions and details are presented in Section 4.2.

Second, a QND parity measurement of cavity states has been successfully demonstrated with the assistance of an ancillary superconducting qubit in ref.51. The cavity state is projected on the even- or odd-photon subspace such as \({\hat{P}}^{Par}(even,\,odd)={\mathrm{\{|0}}_{4}\rangle \langle {0}_{4}|+{\mathrm{|2}}_{4}\rangle \langle {2}_{4}{\mathrm{|,|1}}_{4}\rangle \langle {1}_{4}|+{\mathrm{|3}}_{4}\rangle \langle {3}_{4}|\}\) and its parity is imprinted in the state of an ancillary readout qubit. For example, the state |Ψ4A is collapsed by the parity measurement into \({\hat{P}}^{Par}(even)(|{\Psi }_{4}{\rangle }_{A}|g\rangle )\propto a{\mathrm{|0}}_{4}{\rangle }_{A}+c{\mathrm{|2}}_{4}{\rangle }_{A}\) with the outcome of the qubit state in |e〉 or \({\hat{P}}^{Par}(odd)(|{\Psi }_{4}{\rangle }_{A}|g\rangle )\propto b{\mathrm{|1}}_{4}{\rangle }_{A}+d{\mathrm{|3}}_{4}{\rangle }_{A}\) with |g〉. Therefore, the cavity state is projected in either the even- or odd-photon subspace through the parity measurement performed by the readout qubit. (see details in Section 4.3).

Finally, the SNAP gate is essential for performing photon-phase operations for CV-qudits and originally designed for the correction of phase distortion induced by self-Kerr effects32. The injection of a group of microwaves into a cavity induces a sum of the phase-rotation gates on each photon-Fock state |m〉 given by

$$\hat{S}=\sum _{m}\,\exp (i{\Phi }_{m})|m\rangle \langle m\mathrm{|.}$$

In our scheme, four groups of microwaves are applied due to d = 4 to obtain the same phase rotations on each |k4〉 (k = 0, 1, 2, 3) and the grouped phase gate is acheived on each |k4〉 independently. For example, if we apply the SNAP operation with four-group phase gates, e.g., Φ4m = ϕ0, Φ4m+1 = ϕ1, Φ4m+2 = ϕ2, and Φ4m+3 = ϕ3 on |Ψ4〉, the phase-operated qudit is given in

$$\hat{S}({\varphi }_{0},{\varphi }_{1},{\varphi }_{2},{\varphi }_{3})|{\Psi }_{4}\rangle =a{e}^{i{\varphi }_{0}}{\mathrm{|0}}_{4}\rangle +b{e}^{i{\varphi }_{1}}{\mathrm{|1}}_{4}\rangle +c{e}^{i{\varphi }_{2}}{\mathrm{|2}}_{4}\rangle +d{e}^{i{\varphi }_{3}}{\mathrm{|3}}_{4}\rangle \mathrm{.}$$

In particular, we utilise two specific SNAP gates for logical phase gates. The first is a parity-conditional phase gate \({\hat{S}}^{p1}(\varphi )=S(\varphi ,-\varphi ,\varphi ,-\,\varphi )\) applied to only selected photon states with ϕ0 = ϕ2 = ϕ and ϕ1 = ϕ3 = −ϕ. For example, \({\hat{S}}^{p1}(\varphi )\,(|\alpha \rangle \pm |\,-\,\alpha \rangle )={e}^{\pm i\varphi }(|\alpha \rangle \pm |\,-\,\alpha \rangle )\). The other gate is given by \({\hat{S}}^{p2}(\varphi )=\hat{S}\mathrm{(0,0,}\varphi ,\pi +\varphi )\), which is applied to only selected Fock states with ϕ0 = ϕ1 = 0, ϕ2 = ϕ, and ϕ3 = π = ϕ. Simple examples are \({\hat{S}}^{p2}(\varphi )\,(|\alpha \rangle +|\,-\,\alpha \rangle )={\mathrm{(|0}}_{4}\rangle +{e}^{i\varphi }{\mathrm{|2}}_{4}\rangle )\) and \({\hat{S}}^{p2}(\varphi )\,(|\alpha \rangle -|\,-\,\alpha \rangle )={\mathrm{(|1}}_{4}\rangle -{e}^{i\varphi }{\mathrm{|3}}_{4}\rangle )\). The details of the operations are represented in Section 4.4.

Logical CV qubit under the presence of photon-loss

The logical qubits for even photon states are defined in

$${\mathrm{|0}}_{e}^{L}\rangle =\frac{1}{\sqrt{2}}{\mathrm{(|0}}_{4}\rangle +{\mathrm{|2}}_{4}\rangle )={N}_{\alpha }^{+}(|\alpha \rangle +|\,-\,\alpha \rangle )=|SC{S}_{\alpha }^{+}\rangle ,$$
$${\mathrm{|1}}_{e}^{L}\rangle =\frac{1}{\sqrt{2}}{\mathrm{(|0}}_{4}\rangle -{\mathrm{|2}}_{4}\rangle )={N}_{\alpha }^{+}(|i\alpha \rangle +|\,-i\alpha \rangle )=|SC{S}_{i\alpha }^{+}\rangle ,$$

where Schrödinger cat states are given with \({N}_{\alpha }^{\pm }=\mathrm{1/}\sqrt{\mathrm{2(1}+{e}^{-\mathrm{2|}\alpha {|}^{2}})}\) in

$$|SC{S}_{\alpha }^{\pm }\rangle ={N}_{\alpha }^{\pm }(|\alpha \rangle \pm |\,-\,\alpha \rangle )\mathrm{.}$$

Note that \(|{+}_{e}^{L}\rangle \equiv {\mathrm{|0}}_{4}\rangle \) and \(|{-}_{e}^{L}\rangle \equiv {\mathrm{|2}}_{4}\rangle \). Similarly, for the odd-photon subspace, \({\mathrm{|0}}_{o}^{L}\rangle =|SC{S}_{\alpha }^{-}\rangle \) and \({\mathrm{|1}}_{o}^{L}\rangle =-\,i|SC{S}_{i\alpha }^{-}\rangle \). The two types of logical qubits span only either even- or odd-photon states and a photon-loss error can be monitored and corrected by the real-time parity measurement on the final state51.

For example, let us assume that a logical qubit is encoded in \(|{\Psi }_{e}^{L}\rangle ={a}_{0}{\mathrm{|0}}_{e}^{L}\rangle +{a}_{1}{\mathrm{|1}}_{e}^{L}\rangle \), which implies that the information of an arbitrary single qubit can be written in even photon subspace as a logical state. By real-time parity measurements, the cavity state is monitored through a superconducting qubit coupled with a readout resonator. Before cavity photon-loss, the parity measurement always results in the even state \(|{\Psi }_{e}^{L}\rangle \). If the parity changes from even to odd, the updated logical state is equivalent to \(\hat{a}|{\Psi }_{e}^{L}\rangle \propto |{\Psi }_{o}^{L}\rangle ={a}_{0}{\mathrm{|0}}_{o}^{L}\rangle -{a}_{1}{\mathrm{|1}}_{o}^{L}\rangle \). Thus, the parity change tells us that the quantum information is preserved against photon-loss but the relative phase is altered.

Logical single-qubit gates in a three-qudit cluster state

The essence of MBQC is to create a designed multipartite entangled state initially and to apply sequential measurements on individual qubits will operate one- and two-qubit gates for universal quantum computing2,3. We now propose a specific protocol to perform a modified MBQC protocol from a three CV-qudit entangled state |3CS4ABC given in Eq. (7) and its original MBQC from a three-qubit cluster state is described in Section 4.5. The CV-qudit measurement schemes are all experimentally viable for logical MBQC using the photon-loss error-correcting code27,28.

The first step is to determine the photon parity in the cavity state of the final outcome using the parity measurement on B from Eq. (7). Although any alternative implementation of building |ψideal(τr/4)〉ABC is applicable for our initial CV-qudit states (e.g., a scheme in ref.44), we simply assume that |ψideal(τr/4)〉ABC is initially prepared by a cross-Kerr interaction among the cavities. Then, after the decoupling of all the Kerr-interactions (see Fig. 1), the middle cavity state is projected by the parity measurement such as \({\hat{P}}_{B}^{par}|{\psi }^{ideal}({\tau }_{r}\mathrm{/4)}{\rangle }_{ABC}\) and is given in the even or odd parity state on B such as

$$\mathrm{|3}C{S}_{4}^{e}{\rangle }_{ABC}=\frac{1}{\sqrt{2}}{(|{\tilde{0}}_{4}\rangle }_{A}{\mathrm{|0}}_{4}{\rangle }_{B}|{\tilde{0}}_{4}{\rangle }_{C}+|{\tilde{2}}_{4}{\rangle }_{A}{\mathrm{|2}}_{4}{\rangle }_{B}|{\tilde{2}}_{4}{\rangle }_{C}),\,(\mathrm{for}\,{\rm{even}})$$
$$\mathrm{|3}C{S}_{4}^{o}{\rangle }_{ABC}=\frac{1}{\sqrt{2}}{(|{\tilde{1}}_{4}\rangle }_{A}{\mathrm{|1}}_{4}{\rangle }_{B}|{\tilde{1}}_{4}{\rangle }_{C}+|{\tilde{3}}_{4}{\rangle }_{A}{\mathrm{|3}}_{4}{\rangle }_{B}|{\tilde{3}}_{4}{\rangle }_{C}\mathrm{).}\,(\mathrm{for}\,{\rm{odd}})$$

Note that this is the only initialisation operation on B to choose the parity of the outcome state, and we do not touch the cavity state in B afterwards. Without loss of generality, we will assume that the state is subjected in \(\mathrm{|3}C{S}_{4}^{e}{\rangle }_{ABC}\), however, the odd parity case is identical except the definition of logical qubits given in \({\mathrm{|0}}_{o}^{L}\rangle =|SC{S}_{\alpha }^{-}\rangle \) and \({\mathrm{|1}}_{o}^{L}\rangle =-\,i|SC{S}_{i\alpha }^{-}\rangle \).

We now consider the cavity operations in A and C with two parameters (θ1 and θ2), which make desired single-qubit gates on B. Because of the technical limitations of cavity measurements in real experiment, it is not feasible to directly perform a single-cavity measurement in |±θ〉 〈±θ|. However, we theoretically suggest an alternative measurement scheme consisting of a logical single-qubit phase operation and a cavity measurement along the logical Z-axis because this alternative is equivalent to the measurement in |±θ〉〈±θ| RZ(−θ)|±〉〈±|(RZ(−θ)). To implement the logical phase gate, SNAP gates are used for encoding the desired operations on logical qubits. More precisely, two SNAP gates, \({\hat{S}}^{p1}({\theta }_{1}\mathrm{/2)}\) on qubit A and \({\hat{S}}^{p1}(\,-\,{\theta }_{1}\mathrm{/2)}\) on C, are applied for mimicking a single-qubit phase gate with θ1. Note that \({\hat{S}}^{p1}\) is a parity-conditional phase gate as shown in Section 4.4 and the phase information is embeded in the three CV-qudit state

$$\begin{array}{rcl}{|Ou{t}_{2}({\theta }_{1})\rangle }_{ABC} & = & {({\hat{S}}_{A}^{p1}(\frac{{\theta }_{1}}{2}){\hat{S}}_{C}^{p1}(-\frac{{\theta }_{1}}{2})\mathrm{|3}C{S}_{4}^{e}\rangle }_{ABC},\\ & = & \mathrm{12(}{({\mathrm{|0}}_{e}^{L}\rangle }_{A}{\mathrm{|0}}_{e}^{L}{\rangle }_{C}+{\mathrm{|0}}_{o}^{L}{\rangle }_{A}{\mathrm{|0}}_{o}^{L}{\rangle }_{C}){\mathrm{|0}}_{e}^{L}{\rangle }_{B}+{e}^{i{\theta }_{1}}{({\mathrm{|0}}_{e}^{L}\rangle }_{A}{\mathrm{|0}}_{o}^{L}{\rangle }_{C}+{\mathrm{|0}}_{o}^{L}{\rangle }_{A}{\mathrm{|0}}_{e}^{L}{\rangle }_{C}){\mathrm{|1}}_{e}^{L}{\rangle }_{B}\mathrm{).}\end{array}$$

Because the SNAP gates of θ1 are QND operations, the total cavity state is not collapsed into a single cavity state yet.

In the next step, phase θ2 is imprinted by \({\hat{S}}^{p2}({\theta }_{2})\) on C in |Out2ABC such as

$$\begin{array}{rcl}|Ou{t}_{3}({\theta }_{1},{\theta }_{2}){\rangle }_{ABC} & = & {\hat{S}}_{C}^{p2}({\theta }_{2})|Ou{t}_{2}({\theta }_{1}){\rangle }_{ABC},\\ & = & \frac{1}{2\sqrt{2}}{[{[{\mathrm{|0}}_{e}^{L}\rangle }_{A}{(|{+}_{e}^{L}\rangle }_{C}+{e}^{i{\theta }_{2}}|{-}_{e}^{L}\rangle }_{C})+{\mathrm{|0}}_{o}^{L}{\rangle }_{A}{(|{+}_{o}^{L}\rangle }_{C}-{e}^{i{\theta }_{2}}|{-}_{o}^{L}{\rangle }_{C})]{\mathrm{|0}}_{e}^{L}{\rangle }_{B},\\ & & +\,{e}^{i{\theta }_{1}}{[{\mathrm{|0}}_{e}^{L}\rangle }_{A}{(|{+}_{o}^{L}\rangle }_{C}-{e}^{i{\theta }_{2}}|\,{-}_{o}^{L}{\rangle }_{C})+{\mathrm{|0}}_{o}^{L}{\rangle }_{A}{(|{+}_{e}^{L}\rangle }_{C}+{e}^{i{\theta }_{2}}|\,{-}_{e}^{L}{\rangle }_{C})]{\mathrm{|1}}_{e}^{L}{\rangle }_{B}\mathrm{].}\end{array}$$

Although we showed a preferred sequence of SNAP gates performed by \({\hat{S}}^{p1}\) on A and C first and \({\hat{S}}^{p2}\) on C second, one can choose an alternative sequence depending on each cavity (e.g., \({\hat{S}}^{p1}\) on A first and \({\hat{S}}^{p2}{\hat{S}}^{p1}\) on C second).

Finally, we are able to gain the designed logical state in B from |Out3(θ1, θ2)〉ABC given by two cavity measurements (parity and coherent-state measurements) on A and C. When we perform the parity measurement on A, the resultant state is equal to \(|Ou{t}_{4}({\theta }_{1},{\theta }_{2}){\rangle }_{BC}\propto {\hat{P}}_{A}^{Par}|Ou{t}_{3}{\rangle }_{ABC}\). The state for the even parity is given in

$$|Ou{t}_{4}^{e}{\rangle }_{BC}=\frac{1}{2}{[(|{+}_{e}^{L}{\rangle }_{C}+{e}^{i{\theta }_{2}}|{-}_{e}^{L}\rangle }_{C}{\mathrm{)|0}}_{e}^{L}{\rangle }_{B}+{e}^{i{\theta }_{1}}{(|{+}_{o}^{L}\rangle }_{C}-{e}^{i{\theta }_{2}}|\,{-}_{o}^{L}{\rangle }_{C}{\mathrm{)|1}}_{e}^{L}{\rangle }_{B}],$$

while the odd one is

$$|Ou{t}_{4}^{o}{\rangle }_{BC}=\frac{1}{2}{[(|{+}_{o}^{L}{\rangle }_{C}-{e}^{i{\theta }_{2}}|{-}_{o}^{L}\rangle }_{C}{\mathrm{)|0}}_{e}^{L}{\rangle }_{B}+{e}^{i{\theta }_{1}}{(|{+}_{e}^{L}\rangle }_{C}+{e}^{i{\theta }_{2}}|\,{-}_{e}^{L}{\rangle }_{C}{\mathrm{)|1}}_{e}^{L}{\rangle }_{B}\mathrm{].}$$

Then, if we project the qubit C by the coherent state-measurement \(\{|\alpha \rangle ,|i\alpha \rangle ,|\,-\,\alpha \rangle ,|\,-\,i\alpha \rangle \}\) as shown in Section 4.2, the successful detection gives the logical qubit in

$$|Ou{t}_{5}^{\alpha ,e}{\rangle }_{B}={\sqrt{2}}_{C}{\langle \alpha |Ou{t}_{4}^{e}\rangle }_{BC}={e}^{\frac{i}{2}({\theta }_{1}+{\theta }_{2})}{ {\mathcal R} }^{z}({\theta }_{1}) {\mathcal H} { {\mathcal R} }^{z}({\theta }_{2})|\,{+}_{e}^{L}{\rangle }_{B},$$
$$|Ou{t}_{5}^{-\alpha ,e}{\rangle }_{B}={e}^{\frac{i}{2}({\theta }_{1}+{\theta }_{2})}{\mathscr{Z}}{ {\mathcal R} }^{z}({\theta }_{1}) {\mathcal H} { {\mathcal R} }^{z}({\theta }_{2})|\,{+}_{e}^{L}{\rangle }_{B},$$
$$|Ou{t}_{5}^{i\alpha ,e}{\rangle }_{B}={e}^{\frac{i}{2}({\theta }_{1}+{\theta }_{2}+\pi \mathrm{2)}}{ {\mathcal R} }^{z}(\frac{\pi }{2}){\mathscr{Z}}{\mathscr{X}}{ {\mathcal R} }^{z}(-\,{\theta }_{1}) {\mathcal H} { {\mathcal R} }^{z}({\theta }_{2})|\,{+}_{e}^{L}{\rangle }_{B},$$
$$|Ou{t}_{5}^{-i\alpha ,e}{\rangle }_{B}={e}^{\frac{i}{2}({\theta }_{1}+{\theta }_{2}+\pi \mathrm{2)}}{ {\mathcal R} }^{z}(\frac{\pi }{2}){\mathscr{X}}{ {\mathcal R} }^{z}(-{\theta }_{1}) {\mathcal H} { {\mathcal R} }^{z}({\theta }_{2})|\,{+}_{e}^{L}{\rangle }_{B},$$


$$|Ou{t}_{5}^{\alpha ,o}{\rangle }_{B}={e}^{\frac{i}{2}({\theta }_{1}+{\theta }_{2})}{\mathscr{X}}{ {\mathcal R} }^{z}(\,-\,{\theta }_{1}) {\mathcal H} { {\mathcal R} }^{z}({\theta }_{2})|\,{+}_{e}^{L}{\rangle }_{B},$$
$$|Ou{t}_{5}^{-\alpha ,o}{\rangle }_{B}={e}^{\frac{i}{2}({\theta }_{1}+{\theta }_{2})}{\mathscr{X}}{\mathscr{Z}}{ {\mathcal R} }^{z}(\,-\,{\theta }_{1}) {\mathcal H} { {\mathcal R} }^{z}({\theta }_{2})|\,{+}_{e}^{L}{\rangle }_{B},$$
$$|Ou{t}_{5}^{i\alpha ,o}{\rangle }_{B}={e}^{\frac{i}{2}({\theta }_{1}+{\theta }_{2}-\pi \mathrm{2)}}{ {\mathcal R} }^{z}(\frac{\pi }{2}){ {\mathcal R} }^{z}({\theta }_{1}) {\mathcal H} { {\mathcal R} }^{z}({\theta }_{2})|\,{+}_{e}^{L}{\rangle }_{B},$$
$$|Ou{t}_{5}^{-i\alpha ,o}{\rangle }_{B}={e}^{\frac{i}{2}({\theta }_{1}+{\theta }_{2}+3\pi \mathrm{2)}}{ {\mathcal R} }^{z}(\frac{\pi }{2}){\mathscr{Z}}{ {\mathcal R} }^{z}({\theta }_{1}) {\mathcal H} { {\mathcal R} }^{z}({\theta }_{2})|\,{+}_{e}^{L}{\rangle }_{B},$$

where \({ {\mathcal R} }^{z}\) and \( {\mathcal H} \) are a logical rotation gate on z-axis and a logical Hadamard gate defined by logical qubits in |0L〉 and |1L〉. Note that a repeat-until-success method can be used for approximated orthogonal projection of the cavity states on the measurement set of {|α〉〈α|, |〉〈|, |−α〉〈−α|, |−〉〈−|} for large α ≥ 2.

The details of logical gates with respect to each measurement outcomes are presented in Table 1, which shows one-to-one correspondence with the orginal MBQC operations with three qubits in Table 2. Note that logical Pauli operators \(Z\equiv {({\hat{X}}_{4})}^{2}\) and \(X\equiv {\hat{Z}}_{4}\) can be defined by CV-qudit Pauli gates in Section 2.2. Therefore, it is shown that the specific logical operation of mMBQC is performed by the sequential operations and measurements in the cavities of A and C.

Table 1 Table for measurement outcomes in A and C and the performed logical single-qubit gates (\({f}_{12}={f}_{12}\,{e}^{i\frac{\pi }{4}}{R}^{z}(\frac{\pi }{2})\) and \({f}_{12}={f}_{12}\,{e}^{-i\frac{\pi }{4}}\,{R}^{z}(\frac{\pi }{2})\)).
Table 2 Table for outcomes and performed gates in Section 4.5 \(({f}_{12}={e}^{\frac{i}{2}({\theta }_{1}+{\theta }_{2})})\).

Implementation of a two CV-qudit state in the JC Hamiltonian

We here mainly examine how to build two-qudit entangled states in the model of the JC generalised Hamiltonian (\({\hat{H}}_{ABM}^{JC}\)), which describes the nonlinear effects given from the contribution of the intermediary transmon qubit (upto the third level). From the JC Hamiltonian in Eq. (1) with two coherent states, the total state in the two cavities with the qubit evolves in time and the state of two cavities are given by

$$|{\psi }^{JC}(t){\rangle }_{ABM}=\exp (i\,{\hat{H}}_{ABM}^{JC}\,t)|\alpha {\rangle }_{A}|\alpha {\rangle }_{B}|g{\rangle }_{M},$$
$${\rho }_{AB}^{JC}(t)=T{r}_{M}{(|{\psi }^{JC}(t)\rangle }_{ABM}\langle {\psi }^{JC}(t\mathrm{)|).}$$

In Fig. 2, we numerically illustrate the dynamics of cavity states evolved by the JC Hamiltonian \({\hat{H}}_{ABM}^{JC}\) to create the two CV-qudit cluster state such as \(12{\sum }_{k\mathrm{=0}}^{3}|{k}_{4}{\rangle }_{A}|{\tilde{k}}_{4}{\rangle }_{B}\). The realistic parameters are chosen in ωA = 5.5 GHz, ωB = 8.5 GHz, ωM = 4.0 GHz, λAM = 0.12 GHz, λBM = 0.15 GHz and KM = −0.6 GHz. In the top of Fig. 2, the revival peaks appear at around t ≈ 160 μs with α = 2.0 as given in the values of |〈aA〉| (blue) and |〈aB〉| (orange). Note that |〈a(t)〉| = 0 implies that the cavity states are the evenly distributed coherent states in phase space while \(|\langle {a}_{M}^{\dagger }{a}_{M}\rangle |\approx 0\) does that the transmon qubit is almost nearly in |gM such that \(|{\psi }^{JC}(t){\rangle }_{ABM}{\langle {\psi }^{JC}(t)|\approx {\rho }_{AB}^{JC}(t)\otimes |g\rangle }_{M}\langle g|\).

Figure 2
figure 2

(Top) |〈aA〉|, |〈aB〉| and \(|\langle {a}_{M}^{\dagger }{a}_{M}\rangle |\) are depicted in blue, orange and green lines, respectively. The cavity state evolves from the initial state |αA|αB (α = 2.0) under the generalised JC Hamiltonian in Eq. (1). The parameters of the Hamiltonian are ωA = 5.5 GHz, ωB = 8.5 GHz, ωM = 4.0 GHz, λAM = 0.12 GHz, λBM = 0.15 GHz and KM = −0.6 GHz. While |〈aB〉| shows the revival of mode B at τr ≈ 160 μs, \(|\langle {a}_{M}^{\dagger }{a}_{M}\rangle \) is nearly 0 and shows that the superconducting qubit is the ground state |gM mostly as predicted in the adiabatic method. (Bottom) In (a), a mixture of four coherent states is given by \(t{r}_{B}({\rho }_{AB}^{JC}({t}_{0}))\) at t0 = 39.45 μs (≈τr/4) while the Wigner plot in (b) indicates that the evolved state \({\rho }_{A}^{JC}=t{r}_{B}({\rho }_{AB}^{JC}({t}_{0})|\alpha {\rangle }_{B}\langle \alpha |)\) is also very close to the state |04A with F ≈ 0.978. From (c) to (f), we project the state on the Fock states from |0〉A〈0| to |3〉A〈3| and the Wigner plots of \({\rho }_{B}^{JC,k}\) are shown as coherent states in \(|{\tilde{k}}_{4}\rangle \) (k = 0, 1, 2, 3).

What we would like to find is that the state \({\rho }_{AB}^{JC}({t}_{0})\approx |{\psi }^{ideal}({\tau }_{r}\mathrm{/4)}{\rangle }_{AB}\langle {\psi }^{ideal}({\tau }_{r}\mathrm{/4)|}\) at certain time t0 (see the details in Eq. (35)). To compare \({\rho }_{AB}^{JC}({t}_{0})\) with the ideal two-qudit state (given in Eq. (35)), one may obtain the fidelity between the two states, however, this value might not represent the characteristics of the time-evolved state \({\rho }_{AB}^{JC}({t}_{0})\) because the distortion of the cavity state from the self-Kerr effects suppress the fidelity very low. In the spirit of MBQC, one of the simple verifications of the measured states is to compare between the projected cavity states of \({\rho }_{AB}^{JC}\) and of |ψiealAB. In Fig. 2(a), the state in A is given by \(t{r}_{B}({\rho }_{AB}^{JC}({t}_{0}))\), in which we expect to obtain the mixture of four coherent states at t0 = 39.45 μs. From (b) to (f), we plot the Wigner functions of the cavity state in mode A (B) at t0 given by the projection of the certain states in mode B (A) such as

$${\rho }_{A}^{JC}\propto t{r}_{B}({({1}_{A}\otimes |\alpha \rangle }_{B}\langle \alpha |){\rho }_{AB}^{JC}({t}_{0}))\approx {\mathrm{|0}}_{4}{\rangle }_{A}\langle {0}_{4}|,$$
$${\rho }_{B}^{JC,k}\propto t{r}_{A}((|k{\rangle }_{A}\langle k|\otimes {1}_{B}){\rho }_{AB}^{JC}({t}_{0}))\approx |{\tilde{k}}_{4}{\rangle }_{B}{\langle {\tilde{k}}_{4}|=|\alpha {e}^{ik\pi \mathrm{/2}}\rangle }_{B}\langle \alpha {e}^{ik\pi \mathrm{/2}}|,$$

for k = 0, 1, 2, 3. In the bottom of Fig. 2, we show that the maximum fidelity \(F=|{}_{A}\,{\langle {0}_{4}|{\rho }_{A}^{JC}{\mathrm{|0}}_{4}\rangle }_{A}|\) is approximately 0.978 at t0 ≈ 40 μs in (b) and some levels of self-Kerr distortions occur during the time evolution from (c) to (f). We neglect decoherence processes in the cavities since the state-of-the-art lifetime of a 3D cavity is above 1.2 ms and the decoherence is expected to be not dominant until the period t0 ≈ 40 μs. Apparently, this period of creating multi-partite microwave entangled state could not grow up much with increasing the number of cavities.

Conclusion and Remarks

In summary, we introduce a new-type of CV logical MBQC in three microwave cavities coupled with superconducting qubits in a circuit-QED system. After the CV-qudits are defined, three specific circuit-QED gates are introduced to realise logical gate operations for the protocol of logical MBQC. We deliver the method of a logical single-qubit gate in photon-loss correcting codes from the three CV-qudit entangled state. Finally, the implementation of the two CV-qudit state and measured cavity states are numerically investigated under the JC Hamiltonian in a two-cavity system coupled with a superconducting qubit. The results show that the entangled CV-qudit states can be efficiently built with high fidelity via the cross-Kerr effect induced by the intermediary superconducting qubit between cavities.

Although the main goal of this paper is demonstrating the feasibility of the scheme in superconducting circuits, the improvement of the fidelity is necessary for wider range of quantum computing applications. For example, it has been known that a high-fidelity operation with a few percentage errors is only acceptable with specific quantum codes for full fault-tolerant quantum computation52. Some applications for noisy intermediate-scale quantum computation, e.g., digital quantum simulation, are open with the level of fidelity because it requires only to calculate the expectation values of quantum operators. In addition, there is an important technique called the error-mitigation scheme, which could provide ideal expectation values (without errors) by using an extrapolation method53. Since we only optimized the evolution time for two-qubit gate fidelity, all parameters (e.g., cavity frequencies and interaction strengths) can be tuned to achieve higher fidelity than we demonstrated (0.977). These higher fidelity issues and a full analysis of the associated parameter optimizations will be addressed in our future work.


How to build two CV-qudit states

When an initial state |ψintAB is prepared in cavities A and B, the time-evolved state at time t is given by

$$|\psi (t){\rangle }_{AB}=\exp (i{\hat{H}}_{AB}\,t)|{\psi }^{int}{\rangle }_{AB},$$

where the cross-Kerr Hamiltonian is \({\hat{H}}_{AB}={K}_{AB}({\hat{a}}_{A}^{\dagger }{\hat{a}}_{A})({\hat{a}}_{B}^{\dagger }{\hat{a}}_{B})\) and KAB is the strength of cross-Kerr interaction. The initial state is fully revived at \(t={\tau }_{r}=2\pi /{K}_{AB}\), and the evolved state is in general written in an entangled (inseparable) state between two modes at t ≠ τr. For t = τr/d, it is given by

$$|{\psi }^{ideal}({\tau }_{r}/d)\rangle =\exp (i\frac{2\pi }{d}({\hat{a}}_{A}^{\dagger }{\hat{a}}_{A})({\hat{a}}_{B}^{\dagger }{\hat{a}}_{B}))|{\psi }^{int}{\rangle }_{AB}\mathrm{.}$$

For example, for t = τr/2 with |ψintAB = |αA|αB, the state evolves such as

$$|{\psi }^{ideal}({\tau }_{r}\mathrm{/2)}{\rangle }_{AB}=\frac{1}{\sqrt{2}}{(|SC{S}_{\alpha }^{+}\rangle }_{A}|\alpha {\rangle }_{B}+|SC{S}_{\alpha }^{-}{\rangle }_{A}|\,-\,\alpha {\rangle }_{B}).$$

This state is known as an entangled coherent state49,50, which is also of excellence for quantum metrology and other QI processing methods54,55,56 and has been recently demonstrated in a deterministic method in circuit-QED57 and probabilistically in quantum optics58,59. In fact, the entangled coherent state can be used as a simplest resource state for MBQC with no error-correction because CV quantum teleportation, which is the building block for MBQC, has been demonstrated in quantum optics60,61,62,63 and investigated in circuit-QED64. The similar method of implementing the states has been suggested with the assumption of the cross-Kerr interaction in a circuit-QED system65.

For d = 4, the desired evolution time is the half period of |ψideal(τr/2)〉AB. The evolved state at t = τr/4 is written by

$$\begin{array}{rcl}|{\psi }^{ideal}({\tau }_{r}\mathrm{/4)}{\rangle }_{AB} & = & \frac{1}{2}{{\mathrm{(|0}}_{4}\rangle }_{A}|\alpha {\rangle }_{B}+{\mathrm{|1}}_{4}{\rangle }_{A}|i\alpha {\rangle }_{B}+{\mathrm{|2}}_{4}{\rangle }_{A}|\,-\,\alpha {\rangle }_{B}+{\mathrm{|3}}_{4}{\rangle }_{A}|\,-\,i\alpha {\rangle }_{B}),\\ & = & \frac{1}{2}\mathop{\sum }\limits_{k\mathrm{=0}}^{3}\,|{k}_{4}{\rangle }_{A}|{\tilde{k}}_{4}{\rangle }_{B}\mathrm{.}\end{array}$$

This state |ψideal(τr/4)〉AB is a CV version of a two-qudit cluster state. Alternatively, the equivalent CV-qudit state has been very recently realised for qudit quantum teleportation44.

Fock- and coherent-state projections on a cavity state

One of the important techniques in circuit-QED is based on a conditional qubit-rotation depending on a chosen Fock state |mA and the projection measurement set is given by \({\hat{P}}^{Foc}(m)=\{|m\rangle \langle m|,11-|m\rangle \langle m|\}\)15. For example, let us assume that a coherent state |α〉 is prepared in cavity A with the ground state of superconducting qubit J |gJ such as \(|\alpha {\rangle }_{A}|g{\rangle }_{J}={\sum }_{m}\,{c}_{m}|m{\rangle }_{A}|g{\rangle }_{J}\) for cm = 〈m|α〉. A conditional qubit-rotation gate is effectively performed on photon state |m〉 represented by

$${\hat{R}}_{A\,J}^{y}(m,\varphi )=\sum _{n\ne m}\,{e}^{i{\eta }_{n}}|n{\rangle }_{A}{\langle n|\otimes {1}_{J}+|m\rangle }_{A}\langle m|\otimes {\hat{R}}_{J}^{y}(\varphi ),$$

where \({\hat{R}}^{y}(\varphi )=\,\cos \,\frac{\varphi }{2}\,1\,1-i\,\sin \,\frac{\varphi }{2}Y=(\begin{array}{cc}\cos \,\frac{\varphi }{2} & -\,\sin \,\frac{\varphi }{2}\\ \sin \,\frac{\varphi }{2} & \cos \,\frac{\varphi }{2}\end{array})\).

For ϕ = π, the state becomes \({\hat{R}}_{A\,J}^{y}(m,\pi )\,|\alpha {\rangle }_{A}|g{\rangle }_{J}={\sum }_{n\ne m}\,{c}_{n}{e}^{i{\eta }_{n}}|n{\rangle }_{A}|g{\rangle }_{J}+{c}_{m}|m{\rangle }_{A}|e{\rangle }_{J}\) where \({e}^{i{\eta }_{n}}\) is an undesired operation in \({\hat{R}}_{A\,J}^{y}(m,\pi )\) due to self-Kerr interaction but does not influence our result because we only use the outcome state |e〉 in a heralded way45. Then, when the outcome is measured in |eJ, the cavity state is also projected in |MA and the operator of this Fock-state projection on the m-th photon is given by

$${\hat{P}}_{A}^{Foc}(m)={({1}_{A}\otimes |e\rangle }_{J}\langle e|)\,{\hat{R}}_{A\,J}^{y}(m,\pi \mathrm{).}$$

In the unsuccessful case of measurement in |g〉, the cavity state is projected by the operator \((\,11{}_{A}-|m{\rangle }_{A}\langle m|)\) and we can perform the repeat-until-success protocol \({\hat{P}}_{A}^{Foc}(p)\) for \(p\ne m\).

A coherent-state projection can be also performed by adding displacement operation \({\hat{D}}^{-\alpha }={e}^{{\alpha }^{\ast }a-\alpha {a}^{\dagger }}\) on cavity states45. the coherent-state projection on |α〉 is given in

$${\hat{P}}_{A}^{Coh}(\alpha )={\hat{P}}_{A}^{Foc}(0)({\hat{D}}_{A}^{-\alpha }\otimes {1}_{J})={({1}_{A}\otimes |e\rangle }_{J}\langle e|){\hat{R}}_{A\,J}^{y}(0,\pi )({\hat{D}}_{A}^{-\alpha }\otimes {1}_{J})\mathrm{.}$$

Parity measurement on a cavity state

When we first perform the operation \({\hat{R}}_{J}^{y}(\pi \mathrm{/2)}\) on the initial transmon state |gJ, a conditional cavity-rotation gate \({\hat{C}}^{p}(\phi )\) is given by

$${\hat{C}}_{A\,J}^{p}(\phi )[\frac{1}{\sqrt{2}}|\alpha {\rangle }_{A}{(|g\rangle }_{J}+|e{\rangle }_{J})]=\frac{1}{\sqrt{2}}{(|\alpha \rangle }_{A}|g{\rangle }_{J}+|\alpha \,{e}^{i\phi }{\rangle }_{A}|e{\rangle }_{J}),$$

and the operated state with φ = π is represented by

$${\hat{C}}_{A\,J}^{p}(\pi ){\hat{R}}_{J}^{y}(\pi \mathrm{/2)}\,|{\Psi }_{4}{\rangle }_{A}|g{\rangle }_{J}\propto |{\Psi }_{4}{\rangle }_{A}|g{\rangle }_{J}+\,{(a{\mathrm{|0}}_{4}\rangle }_{A}-b{\mathrm{|1}}_{4}{\rangle }_{A}+c{\mathrm{|2}}_{4}{\rangle }_{A}-d{\mathrm{|3}}_{4}{\rangle }_{A})|e{\rangle }_{J}\mathrm{.}$$

Finally, if we apply an additional \({\hat{R}}_{J}^{y}(\pi \mathrm{/2)}\) and measure the superconducting qubit in \({\{|g\rangle }_{J}{\langle g|,|e\rangle }_{J}\langle e|\}\), the cavity state is projected on the even- or odd-photon subspace such as parity measurement in \({\mathrm{\{|0}}_{4}\rangle \langle {0}_{4}|+{\mathrm{|2}}_{4}\rangle \langle {2}_{4}{\mathrm{|,|1}}_{4}\rangle \langle {1}_{4}|+{\mathrm{|3}}_{4}\rangle \langle {3}_{4}\mathrm{|\}.}\) For example, if the superconducting qubit is measured in |e〉 (or |g〉), the total state is projected in even (odd) photon numbers and the parity measurement is represented by

$${\hat{P}}^{Par}(even/odd)=|e/g{\rangle }_{J}\langle e/g|{\hat{R}}_{J}^{y}(\pi \mathrm{/2)}{\hat{C}}_{A\,J}^{p}(\pi ){\hat{R}}_{J}^{y}(\pi /\mathrm{2).}$$

SNAP gate for a logical single-qudit phase gate

The original motivation of SNAP gate was to cancel out the self-Kerr effect in each cavity independently because self-Kerr effects dominantly influence the shape of the cavity state in a physical setup if the evolution time is not short. This unique circuit-QED technique works in a dispersively coupled cavity-transmon system32 and has been demonstrated to minimize phase distortions acquired during the self-Kerr interaction period. The dispersive energy shifts of the cavity system allow a phase gate in individual Fock states to be addressed by driven microwaves.

For \({\hat{S}}^{p1}\), the outcome state from |Ψ4〉 is given by a grouped phase gate dependent on photon parities such as

$${\hat{S}}^{p1}(\varphi )|{\Psi }_{4}\rangle ={e}^{i\varphi }(a{\mathrm{|0}}_{4}\rangle +c{\mathrm{|2}}_{4}\rangle )+{e}^{-i\varphi }(b{\mathrm{|1}}_{4}\rangle +d{\mathrm{|3}}_{4}\rangle ),$$

while that for \({\hat{S}}^{p2}\)

$${\hat{S}}^{p2}(\varphi )|{\Psi }_{4}\rangle =a{\mathrm{|0}}_{4}\rangle +b{\mathrm{|1}}_{4}\rangle +{e}^{i\varphi }c{\mathrm{|2}}_{4}\rangle -d{e}^{i\varphi }{\mathrm{|3}}_{4}\rangle \mathrm{.}$$

MBQC in a three-qubit cluster state

We here describe the original MBQC protocol in a three-qubit cluster state. If three qubits are initially prepared in |+〉 in A, B, and C, two CZ gates between A and B as well as B and C, which construct a three-qubit cluster state given in

$$\mathrm{|3}CS{\rangle }_{ABC}=\frac{1}{\sqrt{2}}{\mathrm{(|0}\rangle }_{A}|\,+{\rangle }_{B}\mathrm{|0}{\rangle }_{C}+\mathrm{|1}{\rangle }_{A}|\,-{\rangle }_{B}\mathrm{|1}{\rangle }_{C}\mathrm{).}$$

In the frame of MBQC, qubits are sequentially measured in the basis vectors of \(|\pm \theta \rangle =\mathrm{(|0}\rangle \pm {e}^{-i\theta }\mathrm{|1}\rangle )/\sqrt{2}\). For example, if |±θ1〉 is measured in qubit A in Eq. (44), the resultant state is given by

$$|Ou{t}^{\pm }{\rangle }_{BC}={\sqrt{2}}_{A}{\langle \pm {\theta }_{1}\mathrm{|3}CS\rangle }_{ABC}=\frac{1}{2}{[\mathrm{|0}\rangle }_{B}{\mathrm{(|0}\rangle }_{C}\pm {e}^{i{\theta }_{1}}\mathrm{|1}{\rangle }_{C})+\mathrm{|1}{\rangle }_{B}{\mathrm{(|0}\rangle }_{C}\mp {e}^{i{\theta }_{1}}\mathrm{|1}{\rangle }_{C})]\mathrm{.}$$

In the case that the outcome is |±θ1B, the final outcome state is equal to

$$|Ou{t}^{{+}_{1}{+}_{2}}({\theta }_{1},{\theta }_{2}){\rangle }_{C}={\sqrt{2}}_{B}{\langle +{\theta }_{2}|Ou{t}^{+}({\theta }_{1})\rangle }_{BC}={e}^{\frac{i}{2}({\theta }_{1}+{\theta }_{2})}{R}^{z}({\theta }_{1})H{R}^{z}({\theta }_{2})|\,+\,{\rangle }_{C}\mathrm{.}$$

As shown in Table 2, this protocol is equivalent to two single-qubit rotations and two sequential projective measurements on A and B. Thus, this procedure of MBQC is equivalent to the operation of two single-qubit gates with phases θ1 and θ2.