Preparing Dicke states in a ensemble using phase estimation

Yang Wang QuTech, Delft University of Technology, P.O. Box 5046, 2600 GA Delft, The Netherlands

Barbara M. Terhal QuTech, Delft University of Technology, P.O. Box 5046, 2600 GA Delft, The Netherlands and JARA Institute for , Forschungszentrum Juelich, D-52425 Juelich, Germany (Dated: September 13, 2021) We present a Dicke state preparation scheme which uses global control of N spin : our scheme is based on the standard phase estimation algorithm, which estimates the eigenvalue of a unitary operator. The scheme prepares a Dicke state non-deterministically by collectively coupling

the spins to an ancilla via a ZZ-interaction, using dlog2 Ne + 1 ancilla qubit measurements. The preparation of such Dicke states can be useful if the spins in the ensemble are used for magnetic sensing: we discuss a possible realization using an ensemble of electronic spins located at diamond nitrogen-vacancy centers coupled to a single superconducting flux qubit. We also analyze the effect of noise and limitations in our scheme.

I. INTRODUCTION preparing Dicke states which are based on the full ad- dressability of the qubits [25, 26]. To address this issue, A promising application of the emerging quantum tech- some work has been dedicated to schemes which require nology is quantum-enhanced sensing, sometimes referred only a global control of the spin ensemble, such as using to as quantum metrology [1,2]. Using entangled states, steady state evolution [27], repeated energy transfer [7], continuous weak measurements [28], and the use of ge- one can, in principle, improve the measurement√ sensi- tivity from the standard quantum limit (1/ N) to the ometric phase gates [29]. Unfortunately, these methods Heisenberg limit (1/N)[1,3,4], where N is the number are still demanding currently when N is large, as they of- of probes or repetitions. However, preserving this quan- ten need complicated measurement-based feedback, high tum advantage is difficult in the presence of decoherence fidelity control and long preparation times. For example, [5]. For instance, a single-qubit Pauli Z-error can to- the optimized scheme in Ref. [7] uses O(N) rounds of ini- tally dephase a N-qubit GHZ-state, which would obtain tialization and evolution of an ancilla qubit. Our goal is Heisenberg-limited sensitivity in the noiseless case [6]. to improve the scaling with N so that one could possibly N-qubit Dicke states form a class of entangled states handle a larger error rate on the ancilla qubit. which are interesting for metrology [6–10]. Compared to In this paper, we present a Dicke state preparation other states used in quantum sensing, Dicke states have scheme that uses standard phase estimation [30], which been argued to be more robust to various noise sources prepares an eigenstate of a unitary operator by estimat- such as spin dephasing, spin damping, and spin number ing its eigenvalue. This algorithm is based on executing fluctuations [9]. Recent work has demonstrated a scheme projective measurements on the spin ensemble using an to use Dicke states for detecting the magnetic field in- ancilla qubit, and it will prepare a random Dicke state. duced by a single spin [7]. Another distinctive feature The scheme requires a ZZ-coupling between each spin of the use of Dicke states is that the optimal sensitivity in the ensemble to a single ancilla qubit. In SectionIII can be obtained through only global control on the set we detail how this coupling could be realized between an of spins [9, 10]. This is relevant for realizing practical ensemble of NV electronic spins and a superconducting quantum sensing using entangled states, as precise indi- flux qubit as ancilla. vidual spin qubit control can be difficult. Furthermore, Our scheme is efficient with respect to the number of arXiv:2104.14310v4 [quant-ph] 10 Sep 2021 superpositions of Dicke states can be used for quantum operations. It uses only dlog2 Ne + 1 rounds of phase error correction [11, 12]. estimation for preparing a random N-spin Dicke state. Dicke state preparation has been experimentally re- Each round of phase estimation measures a global opera- alized using photons [13, 14] and trapped-ion qubits tor of the spins, i.e., it applies an ancilla-qubit controlled 1 PN [15, 16], and there also exist many theoretical prepara- global Jz = 2 i=1 Zi rotation followed by ancilla qubit tion proposals suitable for a few qubits, see Ref. [17– readout. The total time for performing the controlled 20] for example. However, it remains a challenge for rotations is upper-bounded by a constant and the prepa- large spin ensembles like N > O(100) diamond Nitrogen- ration time√ thus scales as O(log2 N). With a probabil- Vacancy centers (negatively-charged NV [21]), each host- ity ∼ O(1/ N), the prepared Dicke state would obtain ing an electronic spin S = 1. Since these NV center spins Heisenberg-limited sensitivity using only global control. are rather isolated from each other, it is costly to per- Besides the efficiency, our scheme also has some noise- form entangling gates between the electronic spins [22– resilience: phase estimation can be realized with inte- 24]. This limitation excludes quantum algorithms for grated dynamical decoupling, which provides robustness 2 to the dephasing of the ancilla qubit as well as the de- The variance of θ can be calculated by the error propa- phasing of the spins in the ensemble. Furthermore, by gation formula repeating the projective measurements and performing a 2 simple majority vote, the effects of ancilla qubit decay 2 (∆M(θ)) (∆θ) = 2 , (2) and flipped measurements (due to ancilla qubit dephas- |∂θ hM(θ)i| ing or imperfect measurement) can be mitigated. This paper is organized as follows. In Sec.IA, we where the expectation value is with respect to the ini- briefly review Dicke states and Heisenberg-limited sens- tial state |N, mzi and M(θ) is the Heisenberg-evolved ing. In Sec.II we present the idea of using phase esti- operator. If we were to measure M = αJx + βJz, then mation to prepare Dicke states. In Sec.III we discuss hM(θ)i = hJzi (β cos(θ) + α sin(θ)) the Hamiltonian and a possible experimental setup with (3) multiple NV centers coupled to a flux qubit. In Sec.IV ≈ mz(β + θα), we numerically consider the performance of the scheme given the dominant noise sources. Finally, we discuss the for small θ (note that hN, mz| Jx |N, mzi = 0). We mea- results in Sec.V. sure Jx by choosing β = 0, α = 1, its expectation value hJx(θ)i has an optimal dependence on θ when mz is large. 2 However, the variance (∆Jx(θ)) will be large in a rotated A. Dicke states Dicke state, precluding any Heisenberg gains. 2 The proposal is instead to measure M = Jz , so that For simplicity, we assume even spin number N the variance is given by (see details in Ref. [10]): throughout this paper (odd spin-number N can be 2 2 2 2 2 treated similarly). The N-spin (or qubit) Dicke (∆θ) = [(∆Jx ) f(θ) + 4hJx i − 3hJy i state |N, m i with m ∈ {− N ,..., N } is a uniform, 2 2 2 2 2 2 z z 2 2 − 2hJz i × (1 + hJx i) + 6hJzJx Jzi] / [4(hJx i − hJz i) ] permutation-symmetric, superposition of N-bit strings (4) |xi where all bit-strings have N/2 + mz spins in |0i, 2 2 i.e., their Hamming weight is N/2 − mz. For example, (∆Jz ) 2 1 with f(θ) = 2 2 2 + tan (θ). The minimal vari- |N = 4, m = 0i = √ (|0011i+|0101i+|0110i+|1001i+ (∆Jx) tan (θ) z 6 ance is obtained when tan2(θ) = p(∆J 2)2/(∆J 2)2. For |1010i + |1100i). A Dicke state |N, mzi is an eigenstate z x of the collective spin operator Dicke state |N, mzi the minimal variance (obtained at θ ≈ 0) is N 1 X Jz = Zi, (1) 2 4 2 2 2 2mz + 2 64mz − 16mz i=1 (∆θmin) = 2 2 + 2 2 2 . N + 2N − 12mz (N + 2N − 12mz) with eigenvalue mz. Here Zi is the Pauli Z operator on (5) 1 PN the spin labeled i. In addition, we have Jx = 2 i=1 Xi 1 PN Note that the sensitivity can surpass the standard quan- and Jy = 2 i=1 Yi. √ To use such states for metrology, one imagines that tum limit when mz ∼ O( N) and is Heisenberg-limited 2 the prepared quantum state is transformed by e−iθJy when mz ∼ O(1). In addition, when mz = 0, (∆θmin) = 2 and the goal is to estimate the rotation angle θ which N(N+2) saturates the quantum Cram´er-Raobound [6]. 2 is assumed to be small. A standard metrological method The expectation value hJz i can in principle be obtained (for NV centers, limited by T2 and optical measurement by measuring Jz, squaring its outcome and gathering suf- accuracy) is Ramsey spectroscopy [31] using a single ficient statistics by repeating the measurements. We are qubit state repeatedly (or, equivalently, using a prod- thus especially interested in Dicke states close to |N, 0i, uct state of multiple qubits). In this context, the Ram- i.e., |N, mzi with mz ∼ O(1). Other than this motiva- sey method corresponds to preparing a simple prod- tion, we do not focus on aspects of using a (noisy) Dicke i π J uct state e 2 y |00 ... 0i and letting it thus evolve to state for metrology in this paper. −i(θ− π )J 1 i(θ− π ) ⊗N e 2 y |00 ... 0i = ( √ (|+i +e 2 |−i ) . The 2 Y Y rotation angle θ can then be estimated by measuring each spin in Z-basis. The measurements give the expectation II. PHASE ESTIMATION PREPARATION FOR N DICKE STATES value hJz(θ)i = 2 sin(θ), which is most sensitive to small perturbations of θ around θ = 0 [1]. The sensitivity of a product state is limited by the standard quantum limit, In this section, we will show how to prepare a Dicke i.e., the variance in θ scales as (∆θ)2 ∼ 1/N. It has been state using a phase estimation algorithm. argued that Dicke states for mz = O(1) can reach the Phase estimation of a unitary operator is the process Heisenberg-limited sensitivity (i.e., (∆θ)2 ∼ 1/N 2), as of measuring its eigenvalue and simultaneously projecting follows. the input state to the corresponding eigenstate. This idea In general, one will measure some operator M on the has for example been proposed to prepare Gottesman- final state exp(−iθJy) |N, mzi to estimate the value of θ. Kitaev-Preskill states in a bosonic system, realized by 3

product state K−j spins: |ψj−1i / U 2  ⊗N N/2 |0i + |1i X p ancilla qubit: |0i H • Rz(ϑ) H |ψ0i = √ = p(mz) |N, mzi , 2 mz =−N/2 FIG. 1. The jth round phase estimation for the unitary (8) K operator U = ei2πJz /2 in Eq. (7). This circuit projec- where p(mz) is a binomial distribution with average tively measures the eigenvalues of the unitary operator Uj = √ 1−j hmzi = 0 and standard deviation N/2 (i.e., p(mz) = eiπ2 (Jz −Aj−1) on the input state |ψ i in Eq. (10). Be- j−1 N /2N ). This distribution reaches its maximum fore the measurement, the ancilla qubit is rotated around the mz +N/2 1−j Pj l−1 p Z-axis by the angle ϑ = πAj−12 , with Aj = l=1 2 bl. at mz = 0 and p(mz = 0) ≈ 2/(πN) (using Stirling’s Here b = 0, 1 is the measurement outcome of the previous l approximation). Dicke states |N, mzi with m√z ∼ O(1) measurement of Ul. can thus be obtained with a probability O(1/ N). To prepare these states,√ one would thus need to repeat the preparation O( N) times on average. determining the eigenvalues of two unitary operators ap- Among many other variants [33, 35], we choose stan- proximately [32, 33]. dard or ‘textbook’ phase estimation: standard phase es- For preparing Dicke states, we will start from a prod- timation uses only K measurements to determine the uct state, e.g. Eq. (8), where all spins in the ensemble eigenvalue of Jz by determining the first K bits in Eq. (6). are in the same state. Such a product state is clearly al- Furthermore, these measurements can be executed in a ready permutation-symmetric but not yet an eigenstate sequential manner, where only one ancilla qubit is re- of Jz. Since the Dicke state |N, mzi is the unique N- quired. The ancilla qubit is used as the control to apply K−j qubit permutation-symmetric eigenstate of the operator controlled-U 2 gates with j = 1, 2 ...,K starting at Jz with eigenvalue mz, we can then prepare a Dicke state 2K−1 j = 1, for which U = exp(iπJz). via phase estimation. This is realized by measuring the The circuit of the jth round phase estimation is shown eigenvalues of a unitary operator U whose eigenvalues in Fig.1, where the ancilla qubit is measured in a basis are in 1-1 correspondence to the eigenvalues mz. Note determined by previous measurement outcomes mi = 0, 1 that it is important to start the phase estimation scheme with i = 1, 2, . . . j−1. Before readout, the ancilla qubit is in the permutation-symmetric subspace, as Jz has eigen- rotated around the Z-axis by the angle ϑ = πA 21−j, states outside of this permutation-symmetric subspace on j−1 where A = Pj 2l−1b (and A = 0). The jth round which we do not want to project. j l=1 l 0 phase estimation is described by the projector Since the eigenvalue mz ∈ [−N/2,N/2], the integer K m + 2 with K = dlog Ne + 1 is positive. To find the bj z 2 1 + (−1) Uj unitary operator for phase estimation, we write down the P(bj) = , 2 (9) binary representation 1−j iπ2 (Jz −Aj−1) Uj = e , K+1 X m + 2K = b 2l−1. (6) We note that P(bj = 0)P(bj = 1) = 0 as Uj has eigenval- z l ues ±1 on the space of states with given value for A . l=1 j−1 After j rounds of phase estimation, the spins in the en- semble are projected into a superposition of Dicke states, Note that the value of mz can be unambiguously deter- i.e., mined using the first K of K + 1 bits (i.e. bl = 0, 1 with l = 1, 2,...K). Then the unitary operator for phase es- 1 timation is |ψji = p P(bj) ··· P(b2)P(b1) |ψ0i Nj (10) i2π(J +2K )/2K i2πJ /2K q U = e z = e z . (7) 1 X j j = p(2 n + Aj) |N, 2 n + Aji , pN j n∈Z iφ(mz ) This gives U |N, mzi = e |N, mzi, where φ(mz) = PK l−K where N is the normalization factor. Since |2jn + A | ≤ π l=1 bl2 is indeed an 1-1 function of the first K bits j j in Eq. (6). Therefore, the preparation of a Dicke state is N/2, either n = 0 or n = −1 when j = K. The eigenvalue transformed to the task of performing phase estimation of Jz is therefore unambiguously determined, i.e., for j = for this unitary operator U. K: Using phase estimation, one cannot prepare a specific ( j−1 |N,Aji Aj < 2 , Dicke state |N, mzi deterministically, as there is in gen- |ψ i = (11) j j j−1 eral no easy operation that could transform |N, mzi to |N,Aj − 2 i Aj > 2 . 0 |N, mz 6= mzi [34]. However, we can easily maximize the √ probability of obtaining a Dicke state whose sensitivity As the standard deviation of p(mz) is N/2, the√ equality is Heisenberg-limited. This requires starting from the in Eq. (11) approximately holds when 2j ∼ O( N). This 4 means that in fact determining only the first dK/2e bits In this system, we assume the ability to (i) implement in Eq. (6) can produce the target state with high fidelity, single-qubit rotations and projective measurements on that is, the number of required ancilla qubit measure- the ancilla qubit, (ii) implement global rotations of the ments can be further reduced in practice. spins (generated by Jx,Jy and Jz), (iii) initialize the an- K−j The controlled-U 2 gate is realized through the cilla qubit and the spins in |0i. Hamiltonian in Eq. (13) below. The coupling strength γ The phase estimation scheme involves qubit-controlled between the spins and the ancilla qubit determines how rotations around Jz, which are realized through the in- fast the gate is performed. Due to the exponentially de- teraction HI . The evolution operator of HI is creasing rotation angles, the total evolution time T of γ −iHI t −i tJz iγtJz  these controlled rotations is bounded, i.e., e = e 2 |0i h0| ⊗ I + |1i h1| ⊗ e , (14) K X π 1 2π γ T = t = (2 − ) < , −i tJz j γ 2K γ where the unconditional rotation e 2 can be ne- j=1 (12) glected. Since the free Hamiltonian H0 commutes with π t = . HI , we can also neglect the effect of H0. j 2j−1γ Note that the preparation scheme requires initializing all qubits in |+i state, which can consume a considerable A. Sketch of experimental implementation amount of time by itself, see SectionIIIA for the exper- imental setup with NV electronic spins. An important comment on the use of standard phase One possible experimental setup of the proposed pro- estimation in Fig.1 is the following. Any gate will be im- tocol is an ensemble of NV centers coupled to a super- plemented with some constant (small) error in practice, conducting flux qubit. Each NV center hosts a single hence it is impossible to realize the rotation U in Eq. (7) (electronic) S = 1 spin. Sensing a magnetic field or spin when K (and thus N) is too large. This error limits the by means of this electronic spin has been of high interest maximum spin number N that we can handle, as the ro- in the last decade, see e.g., Ref. [31, 36] and references tation angle 2π/2K scales as O(1/N). For example, for therein. Sensing using an ensemble of NV centers, with- N = 500, we have K = 9 and 2π/2K ≈ 0.012, see also a out preparing them in a particular entangled state, has further discussion in SectionIVB. been used at ambient temperatures in, e.g., Ref. [37, 38]. One can also prepare a specific Dicke state by perform- In addition, proposals exist to use the 13C nuclear spins ing post-selection on the measurement outcomes, prepar- which surround a NV center to enhance the sensing per- ing |N, mz 6= 0i in this way would require less operations formance [39, 40]. Direct magnetic sensing using nuclear than |N, mz = 0i (see the details in AppendixA). In ad- spins however would be inefficient, as their gyromagnetic dition, the idea of phase estimation can be used to pre- ratio is about a factor 1000 less than that of the electronic pare specific superpositions of Dicke states, which are spin. potentially useful for metrology under noise [12] (see the The proposal in Ref. [41] envisions coupling a flux details in AppendixB). qubit to NV center electronic spins for the transfer and storage of quantum information. This has been exper- imentally realized in Ref. [42], where a flux qubit was III. SYSTEM HAMILTONIAN AND coupled to O(107) NV centers to resonantly transfer a EXPERIMENTAL REALIZATION flux qubit excitation to a collective spin excitation and back [43]. In Ref. [7] the preparation of Dicke states us- In this section, we will sketch an experimental real- ing a coupled flux qubit was considered for sensing, us- ization using a superconducting flux qubit coupled to an ing this energy-transferring flip-flop interaction (of the ensemble of NV centers. form σ+J− + σ−J+ where σ± acts on flux qubit and We consider a hybrid system where a set of N two- 1 J± = 2 (Jx + iJy) on the ensemble). The basic idea for level spins is collectively coupled to an ancilla qubit. To the Dicke state preparation in Ref. [7] is then to repeat implement our scheme, we need the system Hamiltonian an excitation transfer from the flux qubit to the spins: (i) to be of the following form the flux qubit is first flipped to |1i, (ii) the hybrid sys- H = H + H , tem evolves for some chosen time during which the ancilla 0 coupl qubit goes back to |0i and the spins in |N, m = ji evolve 1 γ (13) z H0 = ω0Jz − ωZ, Hcoupl = Z ⊗ Jz to |N, mz = j − 1i. Repeating this process O(N) times, 2 2 one obtains the state |N, mz = 0i from an arbitrary Dicke state, say the product state |N, m = N/2i = |00 ... 0i. with Jz in Eq. (1). Here, ~ = 1 and γ is the coupling z strength between the ancilla qubit and the spins, ω is the In earlier work [44], the preparation of other sensing angular frequency of the ancilla qubit. The spins in the states, such as spin-cat and spin-squeezed states, was ensemble are assumed to have the same energy splitting, considered using a flux qubit coupled to a collection of denoted by angular frequency ω0. NV-center electronic spins. 5

1. ZZ Coupling between and NV center GHz). Here we neglect components of the magnetic field Electronic Spins which are not aligned with the NV-axis. ext With Wz 6= 0, the states |Sz = m = ±1i are made The coupling between the flux qubit and the NV cen- non-degenerate and we imagine, as is fairly standard, ter is magnetic, i.e. the two persistent current states of using the lowest two energy eigenstates |Sz = m = 0i the flux qubit generate opposite magnetic fields which and |Sz = m = −1i as the qubit. The externally applied enter the Zeeman term in the NV center electronic spin magnetic field (O(100) Gauss) [21] which splits off the Hamiltonian. As in Ref. [41, 42] one can imagine that m = ±1 level should lie in the plane of the flux qubit the flux qubit is sitting on a diamond substrate with im- loop, avoiding any stray effects on the flux qubit itself. planted NV centers, and say the loop of the flux qubit is For a collection of N NV centers, we thus restrict our- about 1µm × 1µm. If the NV-centers are in a cubic vol- selves to the electronic {|m = 0i , |m = −1i} qubit sub- ume 1×10−18 m3 below the loop, a NV-center density of space per NV center, and use the collective spin operators 21 −3 10 m [45] would lead to already having about 1000 Jx,Jy,Jz acting on these qubits. NV centers in this cube. An additional magnetic field in the y-direction or x- The Hamiltonian of a general flux qubit itself is given direction, assuming it is uniformly experienced by all NV by centers oriented along the z-axis, would induce additional Zeeman terms in the NV center Hamiltonian. This leads λ  Hflux = Xf − Zf , (15) to global rotations, e.g. exp(−iθJy), which we want to 2 2 sense. where the Z-basis is given by two persistent current By applying microwave (O(1)GHz) pulses with a fre- states (|0i , |1i), –eigenbasis states of flux–, inducing op- quency which is resonant with the NV-center electronic posite magnetic fields [46–48]. Here we include a label spins, rotations generated by the collective spin oper- f to denote that these are Pauli operators on the flux ators Jx,Jy can be performed [50, 51]. To obtain the qubit. The Pauli Xf term is due to the kinetic charg- initial state |ψ0i in Eq. (8), we first initialize all NV- ing energy. The case  = 0 corresponds to a symmetric center electronic spins in |0i through resonant optical double-well potential in flux. Since the required interac- excitations (the initialization duration is of the order of tion in Eq. (13) is Zf ⊗ Jz, we could envision that the O(100) µs [52] and is executed simultaneously for all NV- current states are flux-qubit eigenstates. This implies an center electronic spins), then one performs the global ro- i π J asymmetric double-well flux potential with  > 0 and tation e 2 y [50]. In addition, the NV-center electronic   |λ| (requiring a large shunting capacitance). This spins can be collectively measured optically to measure is unlike some of the previous work mentioned above in Jz, but the limited photon collection efficiency limits the which one works at  = 0. readout contrast [31, 53, 54]. Recent experiments demonstrate a long coherence The Hamiltonian of a single NV-center and a flux qubit time of the flux qubit at the flux sweet spot  = 0. is The energy relaxation time T1 is about 40µs and the dephasing time T2 is about 10 µs with dynamical H = Hflux + HNV + Hcoupl. (17) decoupling [49]. Single-qubit gates with duration about 2ns and fidelity about 99.92% are also realized [49]. The coupling term Hcoupl models the NV-electronic spin However, tuning a flux qubit away from  = 0 decreases experiencing a magnetic field due to the different persis- the dephasing time substantially. This is due to flux tent current flux qubit states: it can be written in the noise, i.e., the flux qubit becomes much more sensitive form to fluctuations of , which can be somewhat improved by ~ ~ dynamical decoupling [47]. For this reason we discuss an Hcoupl = −γeBflux · S (18) alternative way of using the flux qubit at  = 0 and the ~ flip-flop interaction to realize a Dicke state preparation with spin S = 1 operators S = (Sx,Sy,Sz) and gyromag- in AppendixC. netic ratio γe (∼ 2.8MHz/Gauss). Let’s call the axis per- pendicular to the flux qubit loopr ˆ, so that B~ flux ≈ BrZˆ f , There are four types of NV centers, each aligned with a where Zf is the flux qubit Pauli Z operator and B is the different NV-axis of the carbon lattice (i.e. the direction magnetic field strength at the NV center. Here we as- from the vacancy to the nitrogen) [38], and one does not sume that the NV centers are centrally placed below the control the orientation of these NV-axes. We choose one flux qubit, so that magnetic field components in direc- type of NV center and call its NV-axis the z-axis so that tions other thanr ˆ are negligible. its associated electronic spin (S = 1) has Hamiltonian Since the coupling is much weaker than the electronic [50] spin qubit frequency, we neglect the change of the pre- cession axis induced by this coupling term. The coupling 2 ext HNV = ∆Sz + Wz Sz, (16) is thus approximated as ext where Wz represents the effect of an externally applied γ H ≈ Z ⊗ S . (19) magnetic field and ∆ is the zero-field splitting (∆ ≈ 2.88 coupl 2 f z 6

mation individually, i.e. during a circuit as in Fig.1, a γt γt i J iπJy i J iπJy electronic spins / e 2 z e e 2 z e O(10) kHz coupling γ requires an interaction time much longer than the flux qubit coherence time in particular flux qubit • X • X for small j. As an alternative, it may be possible to use the three FIG. 2. The controlled-eiγtJz gate with integrated dynamical levels (S = 1) of the NV-center electronic spins to ap- −i γt J decoupling, up to the unconditional rotation e 2 z . Echo ply controlled rotations adiabatically while operating the pulses are simultaneously applied to the NV-center electronic flux qubit in a more phase-coherent regime with T2 = spins and the flux qubit. The pulses are at a frequency reso- O(10)µs. In this scenario we work at  = 0 for the flux nant with those NV-center electronic spins which should re- qubit in Eq. (15) and adiabatically change the flux qubit main coupled to the flux qubit, while the coupling to the other frequency through flux-control while staying at  = 0. NV-centers is echoed away. Remember that the states |m = 0iNV and |m = −1iNV form the NV-center qubit subspace and |m = +1iNV is a third level. Ref. [41] estimates that the coupling strength can be If we apply a Hadamard transformation to make the about 12kHz, depending on the strength of the magnetic flux qubit Hamiltonian diagonal in Zf , the coupling term field B and the proximity to the NV-center. We assume will read Hcoupl = −γeBXf ⊗S~·rˆ. Neglecting non-secular that we can use an orientationr ˆ, so that the (projected) terms, one is left with an interaction which removes a coupling strength γ/2 = −γeBrz is also of the order of flux-qubit excitation while exciting the NV center elec- O(10)kHz. tronic state m = 0 to m = ±1 and vice-versa. We imag- The four types of NV centers are simultaneously cou- ine adiabatically flux-tuning the flux qubit frequency to pled to the flux qubit, each having a different coupling the avoided crossing between |1iflux ⊗ |m = 0iNV and strength as their NV-axes are different and having a dif- |0iflux ⊗ |m = +1iNV and back so as to get an effec- ferent resonance frequency [38]. In principle all types of tive ZZ-interaction in the |m = 0iNV and |m = −1iNV NV centers could be used for sensing different compo- and flux-qubit subspace. This way of obtaining a ZZ- nents of the magnetic field [37]. However, since we have interaction using a third level is commonly done for su- only a single controlling flux-qubit to create an entangled perconducting qubits [57, 58]. Here we would state, it is preferred to dynamically decouple the interac- need to generate this interaction between a single an- tion with the other NV centers away. cilla qubit and N NV electonic qubits, each with a third For example, to cancel the coupling to 3 of the 4 NV level. Note that this idea is different from flux-tuning the center types, one could perform phase estimation with frequency of the flux qubit to be resonant with the NV- integrated dynamical decoupling. The circuit in Fig.2 center electronic spin qubit frequency to activate the flip- realizes the controlled-eiγtJz gate up to the unconditional flop interaction [7, 42]. We discuss the details about adi- −i γt J iπJ rotation e 2 z . The echo pulse e y is implemented us- abatically applying controlled rotations in AppendixC. ing resonant microwaves with NV centers whose NV axis In this alternative scenario, one is also limited by the is the z-axis. These other NV centers are thus decoupled strength of the magnetic coupling. The coupling can from the flux qubit. only be enhanced by increasing the proximity of the NV- The integrated echo pulses also provide resilience to centers to the flux-qubit loop and having a higher cur- the dephasing of the flux qubit and NV-center electronic rent associated with the flux qubit states (leading to a spins. Note that we can split the controlled rotations to stronger magnetic field), but the Josephson critical cur- controlled-eiγtJz /n with n = 4, 6, 8,..., so that we obtain rent density puts limits on this. a further suppression of the dephasing. For simplicity, we will consider n = 2 in numerics in SectionIV. Typical value The coherence time of NV-center electronic spins is not NV electronic spin T1 > 1h a limiting factor for realizing our preparation scheme. NV electronic spin T2 > O(50) ms NV electronic spin initialization time O(100) µs The energy relaxation time T1 of NV-center electronic spins exceeds 8 hours at 25mK [55]. For a NV ensemble Flux qubit T1 O(50) µs with a NV-density about 1021 m−3, the dephasing time Flux qubit T2 < O(1) µs Flux qubit single-qubit gate time O(1) ns T (with dynamical decoupling) can be about 50ms at 77 2 Magnetic coupling γ O(10) kHz K[45]. Because the dephasing of a NV electronic spin mainly comes from its surrounding spin bath environ- TABLE I. Parameters that are relevant for realizing the ment [56], we may expect a longer dephasing time at the preparation scheme using the sketched experimental setup, operating temperature of the flux qubit (tens of mK). where an ensemble of NV electronic spins is collectively cou- The weak point of this sketched proposal is the pled to a single superconducting flux qubit. The main chal- strength of the coupling γ versus the (short) dephasing lenge is the weak magnetic coupling γ versus the short de- phasing time T of the flux qubit. time of the flux qubit T2 < O(1)µs if it is operated away 2 from its flux sweet spot. Even though the flux qubit only needs to stay coherent during each round of phase esti- For realizing the preparation scheme using the sketched 7 experimental setup, relevant parameters with their typi- where ρin and ρout are the input and output states of the cal values are listed in TableI. controlled gate. Now we consider implementing the controlled-eiγtJz gate with integrated echo pulses as in Fig.2. If the an- IV. PREPARATION WITH NOISE cilla qubit does not decay, the circuit applies the Kraus operator In this section, we look at the performance of the phase iπJy iπJy estimation scheme for stronger coupling strength γ than (X⊗ e ) M0(t/2) (X ⊗ e ) M0(t/2)

p 1 γt what has been stated in the previous section, and some − κt −i Jz iγtJz  = e 2 e 2 |0i h0| ⊗ I + |1i h1| ⊗ e . limited decoherence of the flux qubit. The spins in the ensemble are assumed to be perfect, as their coherence (25) time is not a limiting factor for our scheme. This is the desired gate up to the unconditional rota- −i γt J − 1 κt tion e 2 z , which happens with the probability e 2 . A. Limited coherence time of the flux qubit Otherwise, the ancilla qubit decays and an unconditional rotation around Jz is applied to the spins. In phase esti- mation, no projector is implemented and the ancilla qubit The flux qubit has energy relaxation time T1 and lim- 1 1 1 readout gives the outcome 0, 1 with equal probability. ited pure dephasing time Tφ with = + .A T2 2T1 Tφ The flux qubit decay probability during the controlled- simple model for the effect of Tφ is that of a phase flip eiγtJz gate (with integrated echo pulses) is given by channel. That is, during the controlled-eiγtJz gate, the flux qubit obtains a Pauli Z error with an error rate [30] − t 2T1 PT1 (t) = 1 − e . (26) 1 − e−t/Tφ PTφ (t) = . (20) 2 B. Inaccurate control of the flux qubit Such Pauli Z error can flip the ancilla qubit readout in the phase estimation circuit. Fortunately, we can sup- Each time we perform the controlled-eiγtJz gate, there press this error to some extent by repeating each circuit may be a random small deviation δt of the evolution time in Fig.1 and taking a majority vote of the answers. t which becomes important when t is small. This means Flux qubit decay to zero temperature with rate κ = we actually perform the controlled-βeiγtJz gate with β = iδθJ 1/T1 can be described by a Lindblad master equation e z and δθ = γδt. Preparing an N-spin Dicke state means determining dρ the eigenvalue of the unitary rotation U in Eq. (7), whose = −i[H, ρ] + κD[σ− ⊗ I]ρ. (21) dt rotation angle 2π/2K scales as O(1/N). As we have dis- cussed, determining the first dK/2e bits in Eq. (6) pro- Here σ = |0i h1| is the annihilation operator on the an- − duces the target state with high fidelity. That is, we only cilla qubit, ρ is the density matrix of the total system, need to determine the eigenvalue of a unitary rotation and D[c] is defined as D[c]ρ = cρc† − 1 {c†c, ρ}. The √ 2 whose rotation angle scales as O(1/ N). This scaling Kraus operators for a short time dt are characterizes how much timing inaccuracy our scheme 1 − κdt iγdtJz can tolerate and thus how large N can be. δM0 = |0i h0| ⊗ I + e 2 |1i h1| ⊗ e , √ (22) δM1 = κdt |0i h1| ⊗ I. C. Numerical Simulations Here the free evolution e−iH0dt and the unconditional −i γ tJ rotation e 2 z in Eq. (14) are omitted. Note that the In the presence of inaccurate control, ancilla qubit de- Kraus operator δM1 does not commute with HI . phasing, or ancilla qubit decay, the spins in the ensemble For a finite evolution time t, the action of the stay in the subspace which is symmetric under spin per- iγtJ controlled-e z gate is given by a continuous set of mutations. They can be treated as a large pseudo-spin Kraus operators of size J = N/2. We therefore limit ourselves to a state

1 vector in a N + 1-dimensional space rather than the full − κt iγtJz M0(t) = |0i h0| ⊗ I + |1i h1| ⊗ e 2 e , size 2N . The simulation is based on the QuTip Python √ 0 (23) 0 −κt0 iγt Jz 0 package [59, 60], and the code can be found in [61]. M1(t ) = κe |0i h1| ⊗ e for t < t. The preparation starts from the product state |ψ0i in The controlled rotation in the presence of ancilla qubit Eq. (8), and determines the eigenvalue mz of Jz using decay is then described by the standard phase estimation. Each round of phase estima- tion is repeated multiple times, and a simple majority Z t † 0 0 † 0 vote is performed. The fidelity of the prepared state, ρout = M0(t)ρinM0 (t) + dt M1(t )ρinM1 (t ). (24) 0 with respect to the predicted state |N, mzi, is used as a 8

0.5 = 0.1 MHz 1.0 = 1 MHz 0.4 = 2 MHz 0.9 = 3 MHz 0.3 = 5 MHz 0.8 = 10 MHz 0.2 0.7 = 2 MHz 0.1 = 3 MHz Readout error rate 0.6

Fidelity lower bound = 5 MHz 0.0 0.5 = 10 MHz 1 3 5 7 9 11 13 15 17 19 1 3 5 7 9 11 13 15 Phase estimation round j Repeat number M

FIG. 4. (Color online) Lower bound on the output fidelity FIG. 3. (Color online) The flux qubit readout error rate in- for the preparation scheme with limited flux qubit coherence duced by flux qubit dephasing. Here we fix the pure dephasing time but strong coupling. There are K = 20 rounds of phase time of the flux qubit as Tφ = 2µs. In the jth round phase estimation, each is repeated M times with majority voting. 1−j estimation, the evolution time is tj = π2 /γ which leads to The fidelity lower bound P is the probability that all rounds the readout error rate PTφ (tj ) in Eq. (20). of phase estimation succeed, so that the prepared state has fidelity 100%. Here we set T1 = 50µs and Tφ = 2µs. measure of how good the preparation is. We compute F = hN, mz| ρ |N, mzi where ρ is the density matrix pre- that δt is distributed according to the normal distri- 2 pared by the noisy, imperfect protocol. bution N (0, σ ). Considering that single-qubit rotation on a flux qubit has a duration about 2ns [49], we set Here we assume that T1 = 50 µs and Tφ = 2 µs for a σ = 0.5, 1, 3, 6, 10ns. Additionally, we fix γ = 5MHz and flux qubit far away from flux-sweet spot. To ensure PTφ is reasonably small in the first few rounds of phase esti- N = 500 spins. In the simulation, we perform 6 rounds mation, we need the coupling strength to be a few MHz, of phase estimation, and each round is repeated M times say, γ = 5MHz, as shown in Fig.3. The corresponding with majority voting (here Tφ,T1 = ∞). Note that in the noiseless case, 6 rounds of phase estimation gives an flux qubit decay probability PT1 (t) would then only be about 0.6% in the first (longest) round of phase estima- output fidelity F ≈ 99.65% for N = 500. As shown in Fig.5, our scheme is resilient to inaccurate tion. Hence the effect of pure dephasing Tφ dominates. Suppose each round of phase estimation is repeated M flux qubit control. Even with σ = 10ns and γ = 5MHz, times with majority voting. We say that the jth round the output fidelity still surpasses 90% when we repeat phase estimation succeeds when: (i) There is at least each projective measurement only M = 5 times. Consid- one measurement, during which the flux qubit does not ering that γ = 5MHz is much larger than an estimated 12kHz, the expected effect of inaccurate timing in flux decay, i.e., the projector P(mj) in Eq. (9) is implemented at least once. (ii) Majority voting of the M measurement qubit control would thus be much smaller in practice. outcomes yields the correct answer m . Hence, we would not expect this timing inaccuracy to be j a main experimental challenge in the near future. Instead of a full simulation, we numerically calculate the probability that all rounds of phase estimation suc- ceed, i.e., the prepared state has fidelity 100%. This QK V. CONCLUSION probability is calculated as P = j=1 Pj, with Pj the success rate of the jth round phase estimation. Clearly, the probability P sets a lower bound of the output fidelity To summarize, we have presented the idea of us- F . The lower bound P is plotted in Fig.4, where we set ing phase estimation to prepare highly entangled Dicke K = 20 and use a coupling strength γ much beyond cur- states. Phase estimation can be realized through a rent estimates. Note that 20 rounds of phase estimation global control, and only requires O(log2 N) ancilla qubit 6 correspond to about 10 spins. We find that P quickly ap- measurements. Dicke states |N, mzi with mz ∼ O(1) proaches unity as the repeat number M grows, basically are especially interesting for metrology as they can give because PTφ (tj) and PT1 (tj) both decrease exponentially Heisenberg-limited sensitivity via global control. Phase as j grows. estimation√ can prepare such Dicke states√ with a proba- To model inaccurate timing control of the flux qubit, bility O(1/ N), implying the need for O( N) attempts we run a pure state simulation. Each time we ap- on average. ply a controlled-rotation in the preparation, there is With numerical simulations, we show that our scheme a randomly sampled time deviation δt. We assume has some robustness to noise on the ancilla qubit. How- 9

difference is that the proposal in Ref. [7] requires the flux 1.00 qubit to operate at  = 0, leading to the flip-flop inter- action [41, 42]. Note that our phase estimation scheme 0.95 (starting from√ the product state) prepares a Dicke state 0.90 |N, mz < O( N)i with a probability approaching unity. If we could tune the flux qubit to the  = 0 point af- = 0 ns 0.85 ter phase estimation (or use the scheme in AppendixC), = 0.5 ns Fidelity then we can perform the scheme in Ref. [7] to obtain 0.80 = 1 ns √ = 3 ns |N, mz = 0i, which uses another O( N) flux qubit flips. 0.75 = 6 ns = 10 ns 0.70 ACKNOWLEDGEMENTS 1 2 3 4 5 6 7 Repeat number M This work is part of the project QCDA (with project number 680.91.033) of the research programme Quan- FIG. 5. (Color online) The output fidelity of the prepara- tERA which is (partly) financed by the Dutch Research tion scheme with inaccurate control of the flux qubit. Here Council (NWO). We would like to thank Lingling Lao, we fix the spin number N = 500, and the coupling strength Mohamed Abobeih, Daniel Weigand, Alessandro Ciani γ = 5MHz. There are only 6 rounds of phase estimation, each and Boris Varbanov for useful discussions. is repeated M times with majority voting. When a controlled- rotation is applied, there is a time deviation δt, which is sam- pled according to normal distribution N (0, σ2). The error bar is the 95% confidence interval. Appendix A: Optimizing the preparation of a specific Dicke state ever, our scheme is still demanding for a spin ensemble Standard phase estimation can also prepare a specific coupled to a flux qubit as it requires a larger coupling Dicke state |N, mz = mi when post-selection is used. To strength or a longer flux qubit coherence time than what maximize the success rate, we rotate each spin initialized seems currently feasible. in |+i around the Y -axis by an angle 2χ. The value of One aspect of our analysis is that we assume a uni- 1 2 m+N/2 χ is chosen so that p = 2 [cos(χ) − sin(χ)] = N = form coupling strength γ of the ancilla qubit to the m 1 + . The preparation of |N, mz = mi then starts from spin ensemble, while in practice not all NV centers will N 2 be equidistant. Thus each spin in the ensemble will ⊗N √ p e−i2χJy |+i = ( p |0i + 1 − p |1i)⊗N have a slightly different coupling strength γi = γ + δγi. N/2 The deviation δγi results in local over-rotations lead- X q K ˜ ing to U = exp(i2πHz/2 ) instead of Eq. (7), where = P (mz) |N, mzi , 1 P δγi mz =−N/2 Hz = Jz + 2 i γ Zi. Phase estimation will estimate  N  the eigenvalues of Hz to a precision set by K and ap- mz +N/2 N/2−mz P˜(mz) = p (1 − p) . proximately project the state onto an eigenstate of Hz. mz + N/2 Product states |xi with the same Hamming weight are no (A1) longer degenerate with respect to Hz, which implies that a perfect eigenstate projection would lead to preparing a Here, the distribution P˜(mz) reaches its maximum at product state. For small enough N, when this eigenvalue- N mz = m, as it is most likely that we draw pN = m + 2 PN δγi breaking contribution is small, i.e. i=1 | 2γ |  1, one 1s in this Bernoulli process, corresponding to mz = m. q may expect that the projected eigenstates of Hz, start- N 2−4m2 Standard deviation of the distribution is 4N . Note ing from the state |ψ0i in Eq. (8), are still (weighted) superpositions of bitstrings and thus entangled. In addi- that P˜(m) upper bounds the probability of obtaining tion, imperfect state initialization can break permutation |N, mi. symmetry. It may be of interest to numerically simulate The target state is obtained by measuring the operator 1−l the sensing ability of the states that one projects onto us- eiπ2 (Jz −m) with l integer via phase estimation as before ing Hz. However, such numerical simulations are much i.e., more challenging as we have to consider matrices of size N N K 1−l 2 × 2 . iπ2 (Jz −m) 1 Y 1 + e ⊗N |N, mi = e−i2χJy |+i . To prepare |N, mz = 0i more efficiently, we can com- q 2 bine our scheme with the proposal in Ref. [7] (see Sec P˜(m) l=1 IIIA), as both can be realized using the same experi- (A2) mental setup, i.e., a spin ensemble (e.g., diamond NV The K = dlog2 Ne+1 measurements are realized through centers) coupled to a superconducting flux qubit. The the circuit in Fig.1. The equality in Eq. (A2) approxi- 10 mately holds when the number of measurements K sat- multiple times with post-selection, which can effectively q 3 9 K N 2−4m2 project out Dicke states |N, m i with m 6= ± , ± . isfies that 2 ∼ O( ). z z 2 2 4N However, the obtained superposition is not necessarily the target state |ϕ3,3,1i, as the amplitudes are carefully chosen. To fix this problem, we will start from the initial Appendix B: Quantum code: superposition of Dicke state |ϕ i which satisfies states 3,3,1 9 9 3 3 h9, |ϕ i = h9, − |ϕ i, h9, |ϕ i = h9, − |ϕ i , In Ref. [11, 62], a so-called permutation-invariant code 2 3,3,1 2 3,3,1 2 3,3,1 2 3,3,1 is proposed for . The logical 3 √ 9 h9, |ϕ i = 3 h9, |ϕ i . code words of this code are specific superpositions of 2 3,3,1 2 3,3,1 Dicke states, namely (B4) s 1 X n N For a superposition of Dicke states, we observe that a |0Li = √ |N = gnu, mz = gj − i . rotation eiθJy changes the distribution of m , which can 2n−1 j 2 z 0≤j≤n be seen from Eq. (A1). The desired initial state |ϕ i j even 3,3,1 s can be approximately constructed as 1 X n N |1Li = √ |N = gnu, mz = gj − i . 1 e−iθJy + eiθJy 2n−1 j 2 ⊗9 0≤j≤n |ϕ3,3,1i = √ |+i , θ = 0.57056 j odd N 2 (B1) (B5) with N the normalization factor. Here the value of The code can correct arbitrary t-qubit Pauli errors with θ is obtained numerically. The application of the op- g, n > 2t + 1, where g, n are both integers. The ratio- erator (e−iθJy + eiθJy )/2 can be realized by measuring nal number u ≥ 1 is a scaling parameter which controls ei2θJy with post-selection, followed by the unitary rota- −iθJy the total qubit number N = gnu [11, 62]. Note that tion e . The target state |ϕ3,3,1i is then approxi- the construction of such permutation-invariant codes has mately obtained: been generalized in Ref.[63], where the logical states are M " i 2π J # −iθJ iθJ encoded into multiple qudits. 1 1 − e 3 z e y + e y |ϕ i ≈ √ |+i⊗9 . In Ref. [12], it was suggested to use the logical state 3,3,1 P 2 2 |0 i+|1 i succ |+ i = L √ L as a probe state in metrology. It L 2 is claimed that the suggested probe state can give (B6) Heisenberg-limited sensitivity, even in the presence of a non-trivial number of errors [12]. For simplicity, we write In the noiseless case, setting the number of times you apply the measurement to M = 5, gives a fidelity about |+Li with parameters g, n, u as 99.9%. The probability for obtaining the targeted state s |ϕ3,3,1i is Psucc ≈ 19.2%. 1 X n N |ϕg,n,ui = √ |N = gnu, mz = gj − i . The preparation described here can be easily general- n j 2 2 0≤j≤n ized for preparing |ϕg,n,ui with arbitrary g, n, u. The (B2) corresponding initial state |ϕg,n,ui now satisfies (j = 0, 1, . . . , n) Here we show how this probe state |ϕg,n,ui can be pre- N s pared using phase estimation. Note that the preparation hN = gnu, mz = gj − |ϕ i n 2 g,n,u = . (B7) of this code has been studied in Ref. [29, 64, 65]. hN = gnu, m = − N |ϕ i j We first look at the simplest 9-qubit code with g = z 2 g,n,u n = 3 and u = 1, which corrects an arbitrary single-qubit Note that |ϕg,n,ui can be constructed in the same way Pauli error. The corresponding probe state is as the 9-qubit case in Eq. (B5), but now we need mul- √ √ tiple projectors in the form Q (e−iθlJy + eiθlJy )/2 with |9, − 9 i + 3 |9, − 3 i + 3 |9, 3 i + |9, 9 i l 2 2 2 2 different angles θ . These angles can also be obtained |ϕ3,3,1i = √ . l 8 numerically. (B3) Similarly, we find that |ϕg,n,ui is a simultaneous +1 One can find that |ϕ3,3,1i is an eigenstate of the operator eigenstate of the operators i 2π J e 3 z with eigenvalue −1. The basic idea is to project i 2aπ (J + gnu ) a permutation-invariant state into an −1 eigenstate of S (a) = e g z 2 (B8) 2π g,n,u i Jz e 3 , i.e., a superposition of |N = 9, mzi with mz = 3 9 ± 2 , ± 2 . That is to say, we can prepare the target state with a integer. Measuring these operators multiple times by determining the eigenvalue of the unitary operator with post-selection, qubits in the initial state |ϕ i can 2π g,n,u i Jz e 3 . This can be realized by measuring the operator be effectively projected into the target state |ϕg,n,ui. 11

Appendix C: Adiabatic controlled rotation With an external magnetic field of O(100) Gauss along ext the NV axis (W > 0), the frequency difference ω2 − Here we explain how to apply controlled global rota- ω1 can be as large as O(1)GHz [66]. To implement the tions to a NV ensemble by adiabatically tuning the flux controlled rotation, we will start from ω1 < ω(t) < ω2, qubit frequency and using the third level of the electronic adiabatically tuning ω(t) up to ω2 and then tuning it spin at each NV center. Starting from an appropriate back. Such adiabatic control can be done by applying a product state, such controlled-rotation can also be used flux through the loop which sets the tunnel barrier of the to prepare a highly entangled Dicke state via phase esti- flux qubit, see, e.g., Ref. [67]. If one moves away from the mation. sweet-spot point of this controlling loop, some additional For a collection of N identical NV electronic spins flux noise can be incurred. which are coupled to a flux qubit, the Hamiltonian can We can set ω(t) to stay far away from ω1 during the be written in the form adiabatic path so that we are not activating any flip-flop interactions inside the computational space. Hence, we Hsys = H0 + Hcoupl, further neglect the off-resonant flip-flop terms between N N |1i ⊗ |0i and |0i ⊗ |1i and obtain an approximate ω(t) X X f i f i H = − Z + ∆ S2 + W ext S , interaction Hamiltonian 0 f zi zi 2 (C1) N i=1 i=1 X h i N H˜ =g |0i h1| ⊗ |2i h0| + |1i h0| ⊗ |0i h2| . X coupl f i f i Hcoupl = −γeBXf ⊗ S~i · r,ˆ i=1 i (C5) For each Dicke state |N, m i (except when m = −N/2 where S~ = (S ,S ,S ) is the spin S = 1 operator for z z i xi yi zi and all spins are in state |1i), we can define a two- the NV-electronic spin labeled i, Z and X are the Pauli f f dimensional subspace spanned by orthogonal states to operators of the flux qubit. As we will adiabatically tune which the dynamics is confined: the flux qubit frequency ω(t), it is a function of time t. Here the flux qubit is operating at  = 0 in Eq. (15) and |φ0(mz)i = |1if ⊗ |N, mzi , the Xf -basis is given by two different persistent current ˜ Hcoupl |φ0(mz)i (C6) states, inducing opposite magnetic fields [46–48]. |φ1(mz)i = q . ˜ † ˜ For simplicity, we relabel the three qubit states of the hφ0(mz)| HcouplHcoupl |φ0(mz)i NV electronic spin as Note that the states |φ1(mz)i differ from |φ0(mz)i in that |S = 1, mz = +1i = |2i , one of the NV center qubits in |0i has been flipped to |2i, while the flux qubit has been flipped from |1i to |0i. We |S = 1, mz = 0i = |0i , (C2) assume that we start from√ a product state where the |S = 1, mz = −1i = |1i . probability of |mz| < O( N) approaches unity for large N, we can neglect the zero effect of the interaction on so that state |2i is outside the computational sub- the state |N, m = − N i. space. Here we assume thatr ˆ, the direction orthog- z 2 In the subspace spanned by {|φ (m )i , |φ (m )i}, we onal to the flux loop, is along thex ˆ-direction of the 0 z 1 z write the system Hamiltonian as NV-centers. This means that the NV-axis lies in the plane of the flux qubit loop, so that the coupling term H˜sys = H0 + H˜coupl equals H = −γ BX ⊗PN S . Using the definition ! coupl e f i xi √ ( N − m )ω + ω(t) G(m ) Sˆ = (|2i h0| + |0i h2| + |1i h0| + |0i h1|)/ 2, the coupling = 2 z 1 2 z x G(m )( N − m )ω + ω − ω(t) Hamiltonian can be written as (here we only keep the z 2 z 1 2 2 flip-flop terms) (C7)

N with effective coupling strength X q Hcoupl ≈g |0i h1|f ⊗ (|2i h0|i + |1i h0|i) + h.c., (C3) † G(mz) = hφ0(mz)| H˜ H˜coupl |φ0(mz)i i=1 coupl r (C8) √ N N where g = −γ B/ 2. The free Hamiltonian H can be = g ( + 1) − mz(mz − 1). e 0 2 2 written as Note that for√ the product state |0 ... 0i with mz = N/2, ω(t) ω(t) G(N/2) = g N. The eigenvalues of H˜sys in this subspace H0 = − |0i h0| + |1i h1| 2 f 2 f are N N s X X (C4) ω ω − ω(t)2 N  + ω1 |1i h1|i + ω2 |2i h2|i , 2 2 2 E(t) = ± G(mz) + + − mz ω1. i=1 i=1 2 2 2 ext ext ω1 = ∆ − W , ω2 = ∆ + W . (C9) 12

iϕ(δt) On the adiabatic trajectory lasting for time T , the follow- see that the state |φ0(mz)i → e |φ0(mz)i where ing phases can be neglected (or trivially compensated): (i) NV centers qubits in the state |1i which together pick ϕ(δt) = −G(mz)δt R T N  ! up a total phase exp(−i dt − mz ω1); (ii) the 2 p t=0 2 mz − mz N(N + 2) (C10) phase 1 ω T obtained by the flux qubit being in |1i ; (iii) ≈ gδt − . 2 2 f pN(N + 2) 2 R T ω(t) the phase exp(i t=0 2 dt) obtained by the flux qubit being in |0if . Here we have assumed that |mz|  N to Taylor ex- pand G(mz) and neglected√ higher order terms. The mz- N(N+2) independent phase −gδt can be further com- The coupling strength G(m ) is minimum when m = 2 z z pensated by a single-qubit rotation of the flux qubit after N/2, and scales as O(N) for mz = O(1). Thus, initially when we don’t want any interaction, we need to choose the adiabatic trajectory. √ Thus in the limit of large spin number N, the adiabatic |ω2 − ω|  G(mz) for all |mz| ≤ O( N), that is, ω2 and ω should be sufficiently detuned. With this weak procedure approximately applies the unitary coupling the states |φ0(mz)i , |φ1(mz)i are approximate igδt  eigenstates ( besides states such as |0i |N, m i which do V (δt) = |0i h0| ⊗ I + |1i h1| ⊗ exp (J 2 − J ) . f z f f N z z not couple). (C11) Now we will start the preparation from a product state ⊗N e−i2χJy |+i with an appropriate value of χ as in The gap on the adiabatic trajectory in the mz-labeled r 2 Eq. (A1). Here we consider a specific example: we choose  ω2−ω(t)  2 −i2χJy ⊗N subspace is ∆(mz) = 2 G(mz) + 2 which is the value of χ so that the product state e |+i is a superposition of Dicke states, which are localized around minimized at the avoided crossing ω(t) = ω2. As we √ |N, mz = 2 Ni. When N is large, the probability for seek√ to apply this interaction on a state for which |mz| ∼ √ 0 ≤ m ≤ 4 N approaches unity. For this product state, O( N) and N is large, ∆(mz) ≈ gN/2 at the avoided z crossing. We thus assume the path is fully adiabatic. One we can make an approximation that the eigenvalues of Jz 2 could possibly choose a trajectory such as in Ref. [57]. and Jz − Jz are in 1-1 correspondence. We can use this form of controlled rotation in Eq. (C11) to√ perform phase estimation and then prepare |N, mz ∼ O( N)i. If we assume that a negligible phase is picked up during However, this adiabatic form of applying a controlled a relatively-fast trajectory, followed by a waiting time δt rotation makes it hard to get a strong interaction, as the at the avoided crossing and a fast switch back, we can rotation angle scales as O(1/N).

[1] C. L. Degen, F. Reinhard, and P. Cappellaro, Quantum squeezed states, New Journal of Physics 16, 103037 sensing, Reviews of modern physics 89, 035002 (2017). (2014). [2] G. T´oth and I. Apellaniz, Quantum metrology from [10] I. Apellaniz, B. L¨ucke, J. Peise, C. Klempt, and G. T´oth, a quantum information science perspective, Journal of Detecting metrologically useful entanglement in the Physics A: Mathematical and Theoretical 47, 424006 vicinity of Dicke states, New Journal of Physics 17, (2014). 083027 (2015). [3] V. Giovannetti, S. Lloyd, and L. Maccone, Quantum- [11] Y. Ouyang, Permutation-invariant quantum codes, Phys- enhanced measurements: beating the standard quantum ical Review A 90, 062317 (2014). limit, Science 306, 1330 (2004). [12] Y. Ouyang, N. Shettell, and D. Markham, Robust quan- [4] V. Giovannetti, S. Lloyd, and L. Maccone, Advances in tum metrology with explicit symmetric states, arXiv quantum metrology, Nature photonics 5, 222 (2011). preprint arXiv:1908.02378 (2019). [5] R. Demkowicz-Dobrza´nski,J. Kolody´nski,and M. Gut¸˘a, [13] N. Kiesel, C. Schmid, G. T´oth,E. Solano, and H. We- The elusive Heisenberg limit in quantum-enhanced infurter, Experimental observation of four-photon entan- metrology, Nature Communications 3, 1 (2012). gled Dicke state with high fidelity, Phys. Rev. Lett. 98, [6] G. T´oth,Multipartite entanglement and high-precision 063604 (2007). metrology, Physical Review A 85, 022322 (2012). [14] W. Wieczorek, R. Krischek, N. Kiesel, P. Michelberger, [7] H. Hakoshima and Y. Matsuzaki, Efficient detection of G. T´oth,and H. Weinfurter, Experimental entanglement inhomogeneous magnetic fields from a single spin with of a six-photon symmetric Dicke state, Phys. Rev. Lett. Dicke states, Phys. Rev. A 102, 042610 (2020). 103, 020504 (2009). [8] L. Pezze, A. Smerzi, M. K. Oberthaler, R. Schmied, [15] A. Noguchi, K. Toyoda, and S. Urabe, Generation of and P. Treutlein, Quantum metrology with nonclassical Dicke states with phonon-mediated multilevel stimulated states of atomic ensembles, Reviews of Modern Physics raman adiabatic passage, Phys. Rev. Lett. 109, 260502 90, 035005 (2018). (2012). [9] Z. Zhang and L. Duan, Quantum metrology with Dicke [16] D. B. Hume, C. W. Chou, T. Rosenband, and D. J. 13

Wineland, Preparation of Dicke states in an ion chain, mamoto, M. Koashi, and N. Imoto, Universal gates for Phys. Rev. A 80, 052302 (2009). transforming multipartite entangled Dicke states, New [17] C. Wu, C. Guo, Y. Wang, G. Wang, X.-L. Feng, and J.- Journal of Physics 16, 023005 (2014). L. Chen, Generation of Dicke states in the ultrastrong- [35] T. E. O’Brien, B. Tarasinski, and B. M. Terhal, Quantum coupling regime of circuit QED systems, Phys. Rev. A phase estimation of multiple eigenvalues for small-scale 95, 013845 (2017). (noisy) experiments, New Journal of Physics 21, 023022 [18] L.-M. Duan and H. J. Kimble, Efficient engineering of (2019). multiatom entanglement through single-photon detec- [36] F. Casola, T. van der Sar, and A. Yacoby, Probing tions, Phys. Rev. Lett. 90, 253601 (2003). condensed matter physics with magnetometry based on [19] L. Lamata, C. E. L´opez, B. P. Lanyon, T. Bastin, J. C. nitrogen-vacancy centres in diamond, Nature Reviews Retamal, and E. Solano, Deterministic generation of ar- Materials 3, 1 (2018). bitrary symmetric states and entanglement classes, Phys. [37] J. F. Barry, M. J. Turner, J. M. Schloss, D. R. Glenn, Rev. A 87, 032325 (2013). Y. Song, M. D. Lukin, H. Park, and R. L. Walsworth, [20] R. Ionicioiu, A. E. Popescu, W. J. Munro, and T. P. Optical magnetic detection of single-neuron action po- Spiller, Generalized parity measurements, Phys. Rev. A tentials using quantum defects in diamond, Proceedings 78, 052326 (2008). of the National Academy of Sciences 113, 14133 (2016). [21] M. Abobeih, From atomic-scale imaging to quantum [38] S. Kitazawa, Y. Matsuzaki, S. Saijo, K. Kakuyanagi, fault-tolerance with spins in diamond, Ph.D. thesis, TU S. Saito, and J. Ishi-Hayase, Vector-magnetic-field sens- Delft, the Netherlands (2021). ing via multifrequency control of nitrogen-vacancy cen- [22] F. Dolde, V. Bergholm, Y. Wang, I. Jakobi, B. Nayde- ters in diamond, Physical Review A 96, 042115 (2017). nov, S. Pezzagna, J. Meijer, F. Jelezko, P. Neumann, [39] V. Vorobyov, S. Zaiser, N. Abt, J. Meinel, D. Dasari, T. Schulte-Herbr¨uggen, et al., High-fidelity spin entan- P. Neumann, and J. Wrachtrup, Quantum Fourier trans- glement using optimal control, Nature Communications form for nanoscale quantum sensing, npj Quantum Infor- 5, 1 (2014). mation 7, 1 (2021). [23] F. Dolde, I. Jakobi, B. Naydenov, N. Zhao, S. Pezzagna, [40] T. Unden, P. Balasubramanian, D. Louzon, Y. Vinkler, C. Trautmann, J. Meijer, P. Neumann, F. Jelezko, and M. B. Plenio, M. Markham, D. Twitchen, A. Stacey, J. Wrachtrup, Room-temperature entanglement between I. Lovchinsky, A. O. Sushkov, et al., Quantum metrology single defect spins in diamond, Nature Physics 9, 139 enhanced by repetitive quantum error correction, Physi- (2013). cal review letters 116, 230502 (2016). [24] P. Neumann, R. Kolesov, B. Naydenov, J. Beck, [41] D. Marcos, M. Wubs, J. Taylor, R. Aguado, M. D. Lukin, F. Rempp, M. Steiner, V. Jacques, G. Balasubramanian, and A. S. Sørensen, Coupling nitrogen-vacancy centers in M. Markham, D. Twitchen, et al., Quantum register diamond to superconducting flux qubits, Physical review based on coupled electron spins in a room-temperature letters 105, 210501 (2010). solid, Nature Physics 6, 249 (2010). [42] X. Zhu, S. Saito, A. Kemp, K. Kakuyanagi, S. I. Kari- [25] A. B¨artschi and S. Eidenbenz, Deterministic prepara- moto, H. Nakano, W. J. Munro, Y. Tokura, M. S. Everitt, tion of Dicke states, in International Symposium on Fun- K. Nemoto, M. Kasu, N. Mizuochi, and K. Semba, Coher- damentals of Computation Theory (Springer, 2019) pp. ent coupling of a superconducting flux qubit to an elec- 126–139. tron spin ensemble in diamond, Nature 478, 221 (2011), [26] C. S. Mukherjee, S. Maitra, V. Gaurav, and D. Roy, 1111.5399. Preparing Dicke states on a quantum computer, IEEE [43] In [42] no external magnetic field was applied on the NV- Transactions on Quantum Engineering (2020). electronic spins so that the states |mz = ±1i are (nearly) [27] S. J. Masson and S. Parkins, Extreme spin squeezing in degenerate and the excitation is to the level |mz = ±1i the steady state of a generalized Dicke model, Phys. Rev. and back. A 99, 023822 (2019). [44] T. Tanaka, P. Knott, Y. Matsuzaki, S. Dooley, H. Ya- [28] J. K. Stockton, R. van Handel, and H. Mabuchi, De- maguchi, W. J. Munro, and S. Saito, Proposed robust terministic Dicke-state preparation with continuous mea- entanglement-based magnetic field sensor beyond the surement and control, Phys. Rev. A 70, 022106 (2004). standard quantum limit, Phys. Rev. Lett. 115, 170801 [29] M. T. Johnsson, N. R. Mukty, D. Burgarth, T. Volz, and (2015). G. K. Brennen, Geometric pathway to scalable quantum [45] N. Bar-Gill, L. M. Pham, A. Jarmola, D. Budker, and sensing, Phys. Rev. Lett. 125, 190403 (2020). R. L. Walsworth, Solid-state electronic spin coherence [30] M. A. Nielsen and I. Chuang, Quantum computation and time approaching one second, Nature Communications quantum information (2002). 4, 1 (2013). [31] J. F. Barry, J. M. Schloss, E. Bauch, M. J. Turner, C. A. [46] T. P. Orlando, J. E. Mooij, L. Tian, C. H. van der Wal, Hart, L. M. Pham, and R. L. Walsworth, Sensitivity op- L. S. Levitov, S. Lloyd, and J. J. Mazo, Superconducting timization for NV-diamond magnetometry, Reviews of persistent-current qubit, Phys. Rev. B 60, 15398 (1999). Modern Physics 92, 015004 (2020). [47] J. Bylander, S. Gustavsson, F. Yan, F. Yoshihara, [32] K. Duivenvoorden, B. M. Terhal, and D. Weigand, Single- K. Harrabi, G. Fitch, D. G. Cory, Y. Nakamura, J.-S. mode displacement sensor, Physical Review A 95, 012305 Tsai, and W. D. Oliver, Noise spectroscopy through dy- (2017). namical decoupling with a superconducting flux qubit, [33] B. Terhal and D. Weigand, Encoding a qubit into a cavity Nature Physics 7, 565 (2011). mode in circuit QED using phase estimation, Physical [48] J. Clarke and F. K. Wilhelm, Superconducting quantum Review A 93, 012315 (2016). bits, Nature 453, 1031 (2008). [34] T. Kobayashi, R. Ikuta, S¸. K. Ozdemir,¨ M. Tame, T. Ya- [49] M. Yurtalan, J. Shi, G. Flatt, and A. Lupascu, Char- acterization of multi-level dynamics and decoherence in 14

a high-anharmonicity capacitively shunted flux circuit, terference in weakly anharmonic superconducting qubits, arXiv preprint arXiv:2008.00593 (2020). Phys. Rev. Lett. 123, 120502 (2019). [50] J. Cramer, Quantum error correction with spins in dia- [59] J. R. Johansson, P. D. Nation, and F. Nori, Qutip: An mond, Ph.D. thesis, TU Delft, the Netherlands (2016). open-source Python framework for the dynamics of open [51] C. Bradley, J. Randall, M. Abobeih, R. Berrevoets, quantum systems, Computer Physics Communications M. Degen, M. Bakker, M. Markham, D. Twitchen, and 183, 1760 (2012). T. Taminiau, A ten-qubit solid-state spin register with [60] R. Johansson, P. Nation, and F. Nori, QuTiP 2: A quantum memory up to one minute, Physical Review X Python framework for the dynamics of open quantum 9, 031045 (2019). systems, Computer Physics Communications 184, 1234 [52] L. Robledo, L. Childress, H. Bernien, B. Hensen, P. F. A. (2013). Alkemade, and R. Hanson, High-fidelity projective read- [61] Y. Wang, software supplementary, https://github.com/ out of a solid-state spin quantum register, Nature 477, YWang92/DickeStatePreparation.git. 574 (2011). [62] Y. Ouyang and J. Fitzsimons, Permutation-invariant [53] J. Taylor, P. Cappellaro, L. Childress, L. Jiang, D. Bud- codes encoding more than one qubit, Phys. Rev. A 93, ker, P. Hemmer, A. Yacoby, R. Walsworth, and M. Lukin, 042340 (2016). High-sensitivity diamond magnetometer with nanoscale [63] Y. Ouyang, Permutation-invariant qudit codes from resolution, Nature Physics 4, 810 (2008). polynomials, Linear algebra and its applications 532, [54] L. Xu, H. Yuan, N. Zhang, J. Zhang, G. Bian, P. Fan, 10.1016/j.laa.2017.06.031 (2016). M. Li, C. Zhang, Y. Zhai, and J. Fang, High-efficiency flu- [64] C. Wu, Y. Wang, C. Guo, Y. Ouyang, G. Wang, and orescence collection for nv-center ensembles in diamond, X.-L. Feng, Initializing a permutation-invariant quan- Optics express 27, 10787 (2019). tum error-correction code, Physical Review A 99, 012335 [55] T. Astner, J. Gugler, A. Angerer, S. Wald, S. Putz, N. J. (2019). Mauser, M. Trupke, H. Sumiya, S. Onoda, J. Isoya, et al., [65] Y. Ouyang, Permutation-invariant quantum cod- Solid-state electron spin lifetime limited by phononic vac- ing for quantum deletion channels, arXiv preprint uum modes, Nature materials 17, 313 (2018). arXiv:2102.02494 (2021). [56] G. De Lange, Z. Wang, D. Riste, V. Dobrovitski, and [66] M. H. Abobeih, J. Randall, C. E. Bradley, H. P. R. Hanson, Universal dynamical decoupling of a single Bartling, M. A. Bakker, M. J. Degen, M. Markham, D. J. solid-state spin from a spin bath, Science 330, 60 (2010). Twitchen, and T. H. Taminiau, Atomic-scale imaging of [57] J. M. Martinis and M. R. Geller, Fast adiabatic qubit a 27-nuclear-spin cluster using a quantum sensor, Nature gates using only σz control, Phys. Rev. A 90, 022307 576, 411 (2019). (2014). [67] R. Harris, J. Johansson, A. J. Berkley, M. W. Johnson, [58] M. A. Rol, F. Battistel, F. K. Malinowski, C. C. Bultink, T. Lanting, S. Han, P. Bunyk, E. Ladizinsky, T. Oh, B. M. Tarasinski, R. Vollmer, N. Haider, N. Muthusub- I. Perminov, E. Tolkacheva, S. Uchaikin, E. M. Chapple, ramanian, A. Bruno, B. M. Terhal, and L. DiCarlo, Fast, C. Enderud, C. Rich, M. Thom, J. Wang, B. Wilson, high-fidelity conditional-phase gate exploiting leakage in- and G. Rose, Experimental demonstration of a robust and scalable flux qubit, Phys. Rev. B 81, 134510 (2010).