www.nature.com/npjqi

ARTICLE OPEN Spectral quantum

Jonas Helsen 1, Francesco Battistel1 and Barbara M. Terhal1,2

We introduce spectral quantum tomography, a simple method to extract the eigenvalues of a noisy few- gate, represented by a -preserving superoperator, in a SPAM-resistant fashion, using low resources in terms of gate sequence length. The eigenvalues provide detailed gate information, supplementary to known gate-quality measures such as the gate fidelity, and can be used as a gate diagnostic tool. We apply our method to one- and two-qubit gates on two different superconducting systems available in the cloud, namely the QuTech Quantum Infinity and the IBM Quantum Experience. We discuss how cross-talk, leakage and non-Markovian errors affect the eigenvalue data. npj (2019) 5:74 ; https://doi.org/10.1038/s41534-019-0189-0

INTRODUCTION of the form λ = exp(−γ)exp(iϕ), contain information about the A central challenge on the path towards large-scale quantum quality of the implemented gate. Intuitively, the parameter γ computing is the engineering of high-quality quantum gates. To captures how much the noisy gate deviates from unitarity due to achieve this goal, many methods that accurately and reliably entanglement with an environment, while the angle ϕ can be characterize quantum gates have been developed. Some of these compared to the angles of the targeted gate U. Hence ϕ methods are scalable, meaning that they require an effort which gives information about how much one over- or under-rotates. scales polynomially in the number of on which the gates The spectrum of S can also be related to familiar gate-quality 1–8 act. Scalable protocols, such as randomized benchmarking, measures such as the average gate fidelity and the unitarity. necessarily give a partial characterization of the gate quality, for Moreover, in the case of a noisy process modeled by a Lindblad fi example, an average gate delity. Other protocols such as robust equation, the spectrum can be easily related to the more familiar tomography9 or gate-set tomography10,11 trade scalability for a notions of relaxation and dephasing times. more detailed characterization of the gate. A desirable feature of The main advantage of spectral quantum tomography is its all the above protocols is that they are resistant to state- simplicity, requiring only the (repeated) application of a single preparation and measurement (SPAM) errors. The price of using noisy gate , as opposed to the application of a large set of gates SPAM-resistant (scalable) methods is that these protocols have S significant experimental complexity and/or require assumptions as in randomized benchmarking, gate-set tomography, and robust on the underlying hardware to properly interpret their results. tomography. Naturally, simplicity and low cost come with some In this work, we present spectral quantum tomography, a drawback, namely, the method does not give information about simple non-scalable method that extracts spectral information the eigenvectors of the noisy gate, such as the axis around which from noisy gates in a SPAM-resistant manner. To process the one is rotating. However, information about the eigenvectors is tomographic data and obtain the spectrum of the noisy gate, we intrinsically hard to extract in a SPAM-resistant fashion since SPAM rely on the -pencil technique, a well-known classical signal errors can lead to additional .16 Another feature of processing method. This technique has been advocated in ref. 8 in spectral quantum tomography is that it can be used to extract the context of randomized benchmarking and has also been used signatures of non-Markovianity, namely, the phenomenon where 12 in ref. for processing data in the algorithm of quantum phase the noisy gate S depends on the context in which it is applied estimation. It has also been used, under the phrase “linear systems (e.g., time of application, whether any gates have been applied fi ” 13 identi cation, in ref. to predict the time evolution of quantum before it). As we show in this paper, our method can be used to systems. While the matrix pencil technique leads to explicitly detect various types of non-Markovian effects, such as coherent useful estimates of eigenvalues and their amplitudes, we note that revivals, parameter drifts, and Gaussian-distributed time-corre- the same underlying idea is used in the method of “delayed lated noise. It is also possible to distinguish non-Markovian effects vectors,” which has been proposed in ref. 14 to assess the dimensionality of a quantum system from its dynamics. This from qubit leakage. For these reasons, we believe that spectral “delayed vectors” approach has been applied to assess leakage in quantum tomography adds a useful new tool to the gate- superconducting devices in ref. 15 characterization toolkit. The method could also have future The spectral information of a noisy gate S, which approximates applications in assessing the performance of logical gates in a some target unitary U, is given by the eigenvalues of the so-called manner that is free of logical state preparation and measurement Pauli transfer matrix representing S. These eigenvalues, which are errors, see the “Discussion” section.

1QuTech, Delft University of Technology, P. O. Box 5046, 2600 GA Delft, the Netherlands and 2JARA Institute for Quantum Information, Forschungszentrum Juelich, 52425 Juelich, Germany Correspondence: Jonas Helsen ([email protected]) Received: 10 April 2019 Accepted: 1 August 2019

Published in partnership with The University of New South Wales J. Helsen et al. 2 P P RESULTS Ψ Ψ 1 N y Uy that jihj¼ d μ¼0 Pμ Pμ and UPμU ¼ κ Tμκ Pκ, we can write Eigenvalues of trace-preserving completely positive (TPCP) maps X ÂÃhi 1 y 1 Uy S ; U Tr UPμU Pμ 1 Tr T T : Take a unitary gate U on a d-dimensional space with F entðS Þ¼ 2 Sð Þ ¼ 2 þ ϕ d μ d ψ i j ψ ρ ρ y U j ¼ e j . The corresponding TPCP map SUð Þ¼U U has one trace-full eigenvector, namely, I with eigenvalue 1, as Thus, for the (entanglement) fidelity of a noisy gate S withÀÁ respectP 2 − 2 − = ; 1 λ well as d 1 traceless eigenvectors. In particular, there are d d to the identity channel U I, one has F entðS IÞ¼ 2 1 þ i , ψ 〉〈ψ ≠ d i traceless eigenvectors of the form | j l| for j l with eigenvalues implying a direct relation to the spectrum {λ }ofT S. A more ϕ − ϕ − ψ 〉 i exp(i( j l)) and d 1 traceless eigenvectors of the form | 1 S fi 〈ψ − ψ 〉〈ψ = … interesting relation is how the eigenvalues of T bound the delity 1| | j j| for j 2, , d with eigenvalue 1. with respect to a targeted gate U. In section “Upper bound on the For general TPCP maps, it is convenient to use the Pauli transfer fi ” n entanglement delity with the targeted gate, we prove that the matrix formalism. For an n-qubit system (d = 2 ), consider fi μ = … + entanglement delity can be upper bounded as the normalized set of Paulip matricesffiffiffiffiffi Pμ for 0, , N with N 2 0vffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiP 13 n 2 n u 2 1 = 4 = d , where P0 ¼ I= 2 and the normalization is chosen u λ 6 Bt j jj C7 such that Tr[PμPν] = δμν. For a TPCP map S acting on n qubits, the 1 j F ðS; UÞ 61 þðd2 À 1ÞB 1 À þ ξ C7; (3) Pauli transfer matrix is then defined as ent 2 4 @ 2 maxA5 Âà d d À 1 Sμν ¼ Tr PμSðPνÞ ; μ; ν ¼ 0; ¼ ; N: (1) P 17 ξ 1 λidealλà λideal U The form of the Pauli transfer matrix S is where max ¼ 2 j j with the eigenvalues of T  d À1 j j j j 10 withP U the targeted unitary, ordered such that the sum S$S ¼ ; (2) j λidealλÃj is maximal. s TS j j j This upper bound is not particularly tight, but for the case of a S where T is a real N × N matrix and s is a N-dimensional column single qubit we can make a much stronger numerical statement, vector. The 1 and 0s in the top row of the Pauli transfer matrix are see section “Upper bound on the entanglement fidelity with the due to the fact that S is trace-preserving. For a unital S that obeys targeted gate”. S(I) = I, the vector s = 0. Another measure of gate quality, namely, the unitarity or the A few properties are known of the eigenvalue–eigenvector pairs coherence of a channel5 on a d-dimensional system, is defined as of S, i.e., the pairs ðλ; vÞ with Sv = λv: Z hi 1234567890():,; d 0 y 0 S uðSÞ ¼ dϕ Tr ½ŠS ðÞjiϕ hjϕ S ðÞjiϕ hjϕ ; (4) ● The eigenvalues of S, and thus the eigenvalues of T are 1, d À 1 since the solutions of the equation det(S − λI) = 0 are the pffiffiffi 0 ρ : ρ ρ = solutions of the equation (1 − λ)det(T S − λI) = 0. where S ð Þ ¼Sð ÞÀTr½Sð ފI d. A more convenient but fi ● The eigenvalues of S, and thus the eigenvalues of T S, come in equivalent de nition is – S Âà X complex conjugate pairs. This is true because T is a real 1 Sy S 1 S 2 uðSÞ ¼ Tr T T ¼ σiðT Þ ; (5) matrix. d2 À 1 d2 À 1 ● The eigenvalues of T S (or S for that matter) have modulus <1, i 18 S i.e. |λ| ≤ 1 (see, e.g., Proposition 6.1 in ref. ). where {σi} are the singular values of the matrix T . The unitarity S S −1 captures how close the channel is to a unitary gate. A lower bound If T is diagonalizable as a matrix, it holds that T = VDV 16 where D is a and V a similarity transformation. on the unitarity is given by Proposition 2 in ref. : Generically, TS will be diagonalizable, in which case there are N dP2À1 1 þ jjλ 2 À d eigenvalue–eigenvector pairs for T. A sufficient condition for i (6) diagonizability is, for example, that all the eigenvalues of T S are uðSÞ  i¼1 ; distinct. In section “Single-qubit case with non-diagonalizable dðd À 1Þ ” S S matrix T, we give examples and discuss what it means if T is not where {λi} are the eigenvalues of T . For a single qubit, an upper diagonalizable. bound on the unitarity can also be given in terms of a non-convex For some simple single-qubit channels, we can explicitly optimization problem, see section “Upper bound on the compute the spectrum. For instance, for a single-qubit depolariz- entanglement fidelity with the targeted gate”. ing channel with depolarizing probability p, the eigenvalues of the The unitality of a TPCP map is defined as 1 − ||s||2 with s in Eq. submatrix T S of the Pauli transfer matrix are {1 − p,1− p,1− p}. (2). Specifically, for single-qubit channels, one can derive the 16 For a single-qubitffiffiffiffiffiffiffiffiffiffiffi amplitude-dampingffiffiffiffiffiffiffiffiffiffiffi channel with damping rate bound p p 11 p, they are f 1 À p; 1 À p; 1 À pg. 2 2 2 2 jjjjs  1 À jjλ1 Àjjλ2 Àjjλ3 þ2λ1λ2λ3: (7) Relation to gate-quality measures. The eigenvalues of the Pauli transfer matrix of a noisy gate S can be related to several other Relation to relaxation and dephasing times. We consider the known measures of gate quality, such as the average gate fidelity eigenvalues of a superoperator induced by a simple Lindblad FðS; UÞ, the gate unitarity uðSÞ and, for a single qubit (n = 1), the equation modeling relaxation and decoherence of a driven qubit, gate unitality. as an example. We have a Lindblad equation with time- R The average gate fidelity is defined as FðS; UÞ¼ independent Lindbladian L: ϕϕ y ϕ ϕ ϕ fi d hjU SðÞjihjUji. This delity relates directly to the ρ_ ¼LðρÞ: (8) entanglement fidelity F ðS; UÞ via F¼F entdþ1,19 where the ent dþ1 ρ tL ρ entanglement fidelity is defined as The formal solution of Eq. (8) is given by ðtÞ¼e ð ðt ¼ 0ÞÞ, ÂÃwhere etL is a TPCP map for every t. We are interested in the total y τL F entðS; UÞ¼Tr I UjiΨ hjΨ I U ðI SÞðÞjiΨ hjΨ ; evolution after a certain gate time τ and set Sτ ¼ e . We assume P d a simple model in which a qubit evolves according to a where ji¼Ψ p1ffiffi jii; i is a maximally entangled state. Using d i¼1 Hamiltonian H = (hxX + hyY + hzZ)/2 and is subject to relaxation

npj Quantum Information (2019) 74 Published in partnership with The University of New South Wales J. Helsen et al. 3 and pure dephasing processes, according to the Lindbladian: We model state-preparation errors as a perfect preparation step followed by an unknown TPCP map . Similarly, measurement 1 1 1 N prep LðρÞ¼Ài½H; ρŠþ ðσÀρσþ À fσþσÀ; ρgÞ þ ðZρZ À ρÞ: errors are modeled by a perfect measurement preceded by an T 2 2Tϕ 1 unknown TPCP map N meas. We assume that, when we apply the fi Γ = targeted gate k times, an accurate model of the resulting noisy We de ne the relaxation, respectively, dephasing rates 1 1/T1 k L dynamics is S . The spectral tomography method can be applied and Γ2 = 1/T2 = 1/(2T1) + 1/Tϕ. The Pauli transfer matrix L of L then takes the form without this assumption but the interpretation of its results is 0 1 more difficult, see section “Leakage and non-Markovian noise” for 00 0 0 a discussion. The method works by constructing the following B C signal function, for k = 0, 1, …, K for some fixed K: B 0 ÀΓ2 hz hy C LL B C: (9) ¼ @ Γ A XN Âà 0 Àhz À 2 hx k gðkÞ¼ Tr PμN S N ðPμÞ : (11) Γ Γ meas prep 1 Àhy Àhx À 1 μ¼1 L We will denote the eigenvalues of L by Ωj for j ∈ {0, …, 3} and the Gathering the data to estimate g(k) requires (1) picking a traceless eigenvalues of Sτ by λj for j ∈ {0, …, 3}. As expected, Ω0 = 0 n-qubit Pauli Pμ, (2) preparing an n-qubit input state in one of the 0 n implying that λ0 = e = 1 is an eigenvalue of Sτ. The other three 2 states corresponding to this chosen Pauli, (3) applying the eigenvalues of LL can be found from the 3 × 3 submatrix in the gate k times and measuring in the same chosen Pauli basis, and lower-right corner. Here we consider some simple cases. (4) repeating (1–3) over different Paulis, basis states, and Case 1: h = h = h = 0. In this case, for j = 1, 2, 3 the three experiments to get good . As in standard process x y z 21 eigenvalues of L and Sτ are clearly tomography, one takes linear combinations of the estimated probabilities for the outcomes to construct an estimator of a Pauli Ω Γ ; Γ ; Γ ; j 2fÀ 2 À 2 À 1g on a Pauli input. This gives an estimate of g(k) for a fixed ÀΓ2τ ÀΓ2τ ÀΓ1τ ∈ … λj 2fe ; e ; e g; k. Repeating this process for k {0, , K}, we reconstruct the entire signal function. In section “Resources to relaxation and thus relating directly to the relaxation and dephasing rates. dephasing times,” we discuss the cost of doing these experiments = = Case 2: hx hy 0. In this case, we have as compared to randomized benchmarking. Let us now examine how g(k) depends on the eigenvalues of Ωj 2fÀΓ2 þ ihz; ÀΓ2 À ihz; ÀΓ1g; Γ τ τ Γ τ τ Γ τ the matrix T. When there are no SPAM errors, that is, N meas and λ 2feÀ 2 eihz ; eÀ 2 eÀihz ; eÀ 1 g; j N prep are identity channels, we have N N where we have separated the decaying part of the λj (correspond- X X NO SPAM k k λk; ing to the real part of the Ωj) and their phases (corresponding to g ðkÞ¼ ðT Þμμ ¼ Tr½T Š¼ j (12) the imaginary part). If we work in the rotating frame of the qubit, μ¼1 j¼1 h can be understood as an over-rotation along the z axis, which z where {λj} are the eigenvalues of T. The last step in this equality would appear in the spectrum as an extra phase imparted to two follows directly when T is diagonalizable, but it can alternatively of the eigenvalues. Again we see that the decaying part of the be proved using the so-called Schur triangular form of T (we give eigenvalues directly relates to the relaxation and dephasing rates. this proof in section “Single-qubit case with non-diagonalizable = = Case 3: hy hz 0. This case shows that over-rotations can also matrix T”). modify the decay strength of the eigenvalues. We analyze the When N meas and N prep are not identity channels, we have L eigenvalues as a function of hx. From L in Eq. (9), we see that Ω = −Γ ÂÃÂÃXN 1(hx) 2 for all hx. For the other eigenvalues, we have k k λk; qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi gðkÞ¼Tr TmeasT Tprep ¼ Tr ASPAMD ¼ Aj j (13) 1 j¼1 Ω Γ Γ Γ Γ 2 2 : 2;3ðhxÞ¼À ð 1 þ 2 ± ð 1 À 2Þ À 4hx Þ (10) 2 where Tmeas and Tprep are, respectively, the T-submatrices of the Γ Γ = cr λ λ Pauli transfer matrix of N meas and N prep. Here we assume that T = We see that if jhxj < j 1 À 2j 2  hx , only the moduli of 2 and 3 −1 −1 VDV is diagonalizable and the matrix ASPAM = V TprepTmeasV are affected as compared to Case 1, in other words, λ2 and λ3 only decay with no extra phases. On the contrary, the phases of these captures the SPAM errors. One may expect that ASPAM is close to eigenvalues become non-zero when the driving is sufficiently the in the typical case of low SPAM errors, in cr particular one may expect that Aj ≠ 0 for all j so that all eigenvalues strong: jhxj>hx . It implies that, if we look at the dynamics induced by the Lindblad equation, real oscillations, not only decay, will be of T are present in the signal g(k). τ In principle, one could take more tomographic data and present as a function of . Hence, these two scenarios represent, k cr consider a full matrix-valued signal cμνðkÞ¼Tr½PμN meas S  respectively, the overdamped (jhxj hx ), similar to the dynamics of a vacuum-damped 20 experiments and there is no clear advantage in terms of the ability qubit-oscillator system, see, e.g., ref. At jh j¼hcr, the system is x x to determine the spectrum. critically damped and LL does not have four linearly independent eigenvectors, meaning that the Pauli transfer matrix of τ is not S Signal analysis or matrix-pencil method for extracting eigenvalues. diagonalizable. In this case, the dynamics also has a linear In this section, we review the classical signal-processingP method dependence on t besides the exponential decay with t, see the N k that reconstructs, from the (noisy) signal gðkÞ¼ A λ for k = discussion in section “Single-qubit case with non-diagonalizable j¼1 j j 0, …, K, an estimate for the eigenvalues λ and the amplitudes A . matrix T”. j j Note that we have gðkÞ2R due to Eq. (11). Not surprisingly, this signal-processing method has been employed and reinvented in a Spectral tomography variety of scientific fields. We implement the so-called ESPRIT In this section, we describe the spectral tomography method, analysis described in ref. 22 but see also ref. 23. In the context of which estimates the eigenvalues of S, where S is a TPCP spectral tomography, we know that the signal g(k) will in principle implementation of a targeted unitary gate. contain N eigenvalues (which are possibly degenerate). However,

Published in partnership with The University of New South Wales npj Quantum Information (2019) 74 J. Helsen et al. 4

Fig. 1 Preliminary study of the numerical accuracy of the matrix-pencil method as a function of L, K and Nsamples. (Left) We use the matrix- = pencil method with different Ls and Ks to estimate the eigenvaluesP of a random single-qubit channel, for Nsamples 1000. On the vertical axis, Δ2 1 N¼3 λ λest 2 we give the variance in the estimate of the eigenvalues: ¼ 3 ð j¼1 j j À j j Þ. We see that, as long as the matrix-pencil parameter L is chosen away from 0 or K, the accuracy of the reconstructed signal is nearly independent of L. Furthermore, we see that higher K’s can achieve a lower Δ2. (Right) We generate a random single-qubit channel and set L = K/2. We plot Δ2 as a function of K for two different values of Nsamples = 1000 and Nsamples = 5000, showing how a larger Nsamples suppresses the total variance. We see that for constant Nsamples the accuracy of the method increases rapidly at first when K is increased, but it increases more slowly if K is already large. This can be explained by the fact that the signal decreases exponentially in K and so data points for large K have much lower signal-to-noise ratio. For both figures, random channels were generated using QuTip’s randompffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi TPCP map functionality, and measurement noise was approximated by additive Gaussian noise with standard deviation equal to 1= Nsamples

we can vary the number of eigenvalues we use to fit the signal to for all j ∈ {1, …, N}: fi 0 1 0 1 see whether a different choice than N gives a signi cantly better 1 1 fit. This is relevant in particular when the implemented gate B C B C B λ C B λ C contains leakage or non-Markovian dynamics, see section B j C B j C TB C λ B C: “Leakage and non-Markovian noise”. B . C ¼ jB . C (15) We require at least K ≥ 2N − 2 in order to determine the @ . A @ . A λM λM eigenvalues accurately. This implies that, for a single-qubit gate j j with N = 3, we need at least K = 4, and for a two-qubit gate with À1 = N = 15, we need at least K = 28. However, the signal g(k) has Furthermore, if G0 exists, which is the case when (G0) M, T À1 sampling noise due to a bounded N and in practice it is this matrix will be uniquely given as G1G0 . Hence, in this case samples T À1 good to choose K larger than strictly necessary to make the there is a unique matrix , obtained by constructing G1G0 from λ reconstruction more robust against noise. We study the effect of the data, which is guaranteed to have { j} as eigenvalues. When K varying K in Fig. 1 (left panel). the pencil parameter L> 2, one needs to ensure that there are at The method goes as follows and relies on picking a so-called least N rows of the matrix Y: if not, T would be of dimension

npj Quantum Information (2019) 74 Published in partnership with The University of New South Wales J. Helsen et al. 5

Fig. 2 (Left) Spectral footprints for single-qubit Rx(π/4) gates on the ibmqx4 (IBMQ) and the Quantum Infinity (QI) chips at K = 50, L = 30, and Nsamples = 8192. The modulus of the eigenvalues is plotted in the radial direction, and in particular, it decreases from the center to the outside and it is equal to 1 on the (most inner) black circumference. The angular coordinate corresponds to the phase of the eigenvalues. (Right) Precise value of the deviation of the phases of the three eigenvalues from the ideal ones

An additional processing step is the determination of the available in the cloud: the two-qubit Quantum Infinity provided by (complex) amplitudes {Aj}. Viewing g(k) as a set of K + 1 inner the DiCarlo at QuTech (for internal QuTech use) and the products between the vector (A1, …, AN) and the linearly- ibmqx4 (IBM Q5 Tenerife) available at https://quantumexperience. λk ; λk ; ¼ ; λk ng.bluemix.net/qx/editor. The results of this experiment are shown independent vectors ð 1 2 NÞ, it is clear that, given perfect knowledge of g(k), the {A } are uniquely determined when K + 1 ≥ in Fig. 2 (left panel) in a polar plot, which we refer to as the j “ ” N. Since g(k) is known with sampling noise, the {Aj} can be found spectral footprint of the gate. For clarity, in Fig. 2 (right panel) we have also plotted the phase deviation from ideal for the byP solving theP least-squares minimization problem min jgðkÞÀ A ðλestÞkj2. The optimal values in this mini- implemented gates. Aj k j j j On the two-qubit (q and q ) Quantum Infinity chip, we perform est λest 0 1 mization Aj and j together form the reconstructed signal the single-qubit gate experiment on q twice to study cross-talk: in est 0 g (k) and the error is given by one case, the undriven qubit q1 on the chip is in state |0〉, in the ! other case q is in state |1〉. Since the residual off-resonant qubit 1=2 1 1 XK coupling, mediated through a common resonator, is non-zero, we ϵrms ¼ jgðkÞÀgestðkÞj2 : (16) N K 1 N observe a small difference between these two scenarios, see Fig. 2. þ k¼0 For the Quantum Infinity chip, when q1 is |0〉 we estimate λest : : ; : : ; : λest j 2f0 691 þ 0 719i 0 691 À 0 719i 0 997g, while j 2 f0:687 þ 0:7239i; 0:687 À 0:724i; 0:998g when q1 is |1〉. Using Resources. It is interesting to consider the amount of experi- fi “ ments that must be done to perform spectral quantum the single-qubit delity bound given in section Upper bound on fi the entanglement fidelity with the targeted gate”, we can tomography. One must estimate the function g(k)de ned in Eq. fi π (13). This reconstruction process requires running 2n × N ×(K + 1) compute that the delity with respect to the targeted gate Rx( / 4) can be no more than 0.999 regardless of the state of q1. We can different experiments and repeating each experiment Nsamples + also compute upper and lower bounds on the unitarity (see times. For a single-qubit gate, we need 6(K 1). Note that, while “ the number of experiments scales exponentially with qubit sections Eigenvalues of Trace-Preserving Completely Positive (TPCP) maps” and “Upper bound on the entanglement fidelity number (not surprising for a tomographic protocol), the number ” ≤ ≤ of experiments needed for performing spectral tomography on with the targeted gate ) which yields 0.994 u 0.996 regardless single- and two-qubit gates is comparable to the number of of the state of q1. Regarding the ibmqx4 chip, the data are taken when all other experiments that must be performed in randomized benchmark- 〉 λest ing on one or two qubits (which provides only average gate qubits are in state |0 . The reconstructed eigenvalues j 2 f0:735 þ 0:671i; 0:735 À 0:671i; 0:996g turn out to be lower in information). In randomized benchmarking, one must sample M fi random sequences for each sequence length k ∈ [0 : K], yielding magnitude. From these numbers, we can conclude that the delity M ×(K + 1) experiments. This M is independent of the number of to the target gate is no higher than 0.998 and the unitarity lies 24 ≈ 25,26 between 0.988 and 0.991. qubits. In experiments, M is often chosen between M 40 at fi the low end and M ≈ 150 at the higher end.27 Values of K reported For all these numbers, a two-way 95% con dence interval (for both real and imaginary parts) deviates by <0.005 from the in randomized benchmarking experiments are also comparable to fi (or even higher than, see ref. 25 where K ≈ 300 is considered) the quoted values. The con dence intervals are obtained through a Wild resampling bootstrap with Gaussian kernel.28 values of K used for single- and two-qubit spectral tomography fi (section “Spectral tomography on two superconducting chips”). We have considered whether the data can be better tted with >N = 3 eigenvalues. For each experiment, we fit the data using N eigenvalues with N ∈ {4, …, 15} and we test whether there is a Spectral tomography on two superconducting chips significant increase in goodness-of-fit using a standard F-test We have executed the spectral tomography method on a single- [ref. 29, section 2.1.5]. For no experiment and value of N does the qubit π/4 rotation around the x axis: Rx(π/4) = exp(−iπX/8). For this resultant p value drop <0.05, leading us to conclude that π= gate, the ideal matrix TRx ð 4Þ should have eigenvalues 1, exp(iπ/4), increasing the number of eigenvalues does not significantly and exp(−iπ/4). We execute this gate on two different systems increase the accuracy of the fit.

Published in partnership with The University of New South Wales npj Quantum Information (2019) 74 J. Helsen et al. 6 We have also executed a two-qubit CNOT gate on ibmqx4 (Fig. 3). The T matrix of the ideal CNOT gate has 15 eigenvalues and a very degenerate spectrum: 6 eigenvalues are equal to −1 and 9 eigenvalues are equal to 1, but our data, taking K = 50, show that a best fit is obtained using 4 instead of 2 eigenvalues. Using an F- test shows that the goodness-of-fit is significantly improved using 4 eigenvalues rather than 2 or 3, whereas adding more eigenvalues beyond 4 does not significantly improve the goodness-of-fit(p > 0.05). We have not tried using larger K (which may lead to a resolution of more eigenvalues) since this would break the requirement that our experiments are executed as a single job performed in a short amount of time on the IBM λest ∈ Quantum Experience. The eigenvalues are j f0:939 þ 0:059i; 0:938 À 0:059i; À0:961 þ 0:067i; À0:961 À 0:067ig , all with a 95% confidence interval <±3 × 10−3 for both real and imaginary parts. It is important to note that these 4 eigenvalues, coming in 2 complex–conjugate pairs, cannot be the spectrum of a two-qubit TPCP map S, for the following reasons. As observed in section “Eigenvalues of Trace-Preserving Completely Positive (TPCP) maps,” the submatrix T S of the Pauli transfer matrix of S is a real matrix of odd (42 − 1 = 15) dimension. Since any complex eigenvalues of a real matrix come in conjugate pairs, T S must have at least one real eigenvalue. Moreover, the data cannot be

explained by allowing for leakage, as any eigenvalues associated Fig. 3 Spectral footprint of the CNOT gate for K = 50 and Nsamples = with a small amount of leakage must have small associated 8192. Even though the CNOT gate has only two (degenerate) amplitude, as we discuss in section “Leakage and non-Markovian eigenvalues, we find that the spectrum of the noisy gate can be best noise”. This is not the case for the eigenvalues plotted in Fig. 3 as described using four distinct eigenvalues. The fact that none of all their amplitudes have comparable magnitude Aest ∈ {3.34 − them are real suggests that the data cannot be due to the repeated + + − “ execution of the same noisy gate. In section “Frame mismatch 1.70i, 3.34 1.70i, 1.57 0.91i, 1.57 0.91i}. In section Frame ” mismatch accumulation,” we propose a simple model based on a accumulation, we propose a simple coherent non-Markovian model that offers a possible mechanism for the absence of real eigenvalues frame mismatch accumulation that qualitatively reproduces these eigenvalues. This model is not stochastic but coherent, and it GM violates the assumption that the applied CNOT gate can be fully traceless (normalized) Gell–Mann matrices σμ for μ = 1, …,8, modeled as a TPCP map. A possible physical mechanism together with the normalized identity σGM ¼ p1ffiffi I . For a single 0 3 3 producing a frame mismatch accumulation can be a drift in an qutrit, we can consider the “Pauli” transfer matrix in this GM GM GM GM experimental parameter. Gell–Mann basis, i.e., Sμν ¼ Tr½σμ Sðσν ފ and its submatrix T . We do not compute bounds on the fidelity or unitarity of the For a single qutrit, the signal gNO SPAM (k) in Eq. (12) then equals GM k CNOT gate since the bounds in section “Relation to gate-quality Trcomp[(T ) ] where Trcomp[A] represents the trace over a 3 × measures” do not apply when the evolution is non-Markovian. 3 submatrix of A, corresponding to the Gell–Mann matrices, which act like X, Y, and Z in the two-dimensional computational space. In GM Leakage and non-Markovian noise other words, we can see the matrix T as being composed of blocks: In this section, we consider how spectral tomography behaves  T T under error models that violate the assumptions that go into GM comp seep ; Eq. (13). T ¼ (17) Tleak Tbeyond Three common mechanisms for gate inaccuracy are (1) cross- where the upper-left block is the submatrix whose trace we take in talk, meaning the gate depends on or affects the state of other NO SPAM GM “spectator” qubits; (2) leakage, meaning that the dynamics of the g (k). In the absence of other noise sources, T gate acts outside of the computational qubit subspace and (3) corresponds to the evolution of a unitary gate and (assuming it GM = non-Markovian dynamics, meaning that the assumption that k is diagonalizable) it can be diagonalized by a rotation V as T −1 λ applications of the noisy gate are equal to Sk for some TPCP map VDV , where D is a diagonal matrix with all the eigenvalues { j}. If S is incorrect. Characterizing gates with respect to these features we assume that leakage is low, meaning that Tleak and Tseep have ϵ ϵ is important for assessing their use in multi-gate/multi-qubit small norm of Oð Þ, then at lowest order in the diagonalizing ≈ ⊕ devices for the purpose of or plainly transformation V will be block-diagonal,hiÀÁ i.e., V Vcomp ÂÃVbeyond. 4,30 NO SPAM GM k k À1 reliable . This means that g ðkÞ = Trcomp T = Trcomp VD V P One can see that all three scenarios are due to the dynamics 3 λk ϵ  j¼1 j þ Oð Þ. Thus, at lowest order, the signal will have large taking place in a larger than the targeted GM computational qubit space. In the case of leakage, the larger amplitude on three relevant eigenvalues of the spectrum of T space is an extension of the computational space, while in the and these eigenvalues could have been perturbatively shifted other cases the larger space is the product of the from their ideal location by low leakage. If the leakage is stronger, computational space with the state space of spectator qubits we can more generally write (1), as explored in section “Spectral tomography on two super- X8 ” NO SPAM;LEAK ~ λk; ~ σ À1Π σ : conducting chips, or other quantum or classical degrees of g ðkÞ¼ Aj j Aj ¼ j V compV j (18) freedom in the environment (3). j¼1 Here |σ 〉 is a vector notation for one of the eight Gell–Mann Leakage. Let us consider how gate leakage affects the signal g(k), j matrices σj and Πcomp is the projector onto the basis spanned by making the analysis for one or two qutrits. One can choose an the three Gell–Mann matrices, which are the Paulis in the operator basis for the qutrit space such as the basis of the 8 computational space. From this expression, we see that the effect

npj Quantum Information (2019) 74 Published in partnership with The University of New South Wales J. Helsen et al. 7 non-Markovian noise makes gate-parameters temporally corre- lated. In order to numerically study the effect of non-Markovian noise, we consider a toy example in which a perfect CZ gate is followed by a rotation around the x axis on one qubit. For a series of k repetitions of a perfect CZ gate, we assume that each one is followed by the same rotation Rx(ϕ) acting always on the same ϕ qubit. We assume that the angle is Gaussian-distributedp withffiffiffiffiffiffi 2 2 mean 0 and standard deviation σ: PσðϕÞ¼expðÀϕ =2σ Þ= 2πσ. The time evolution for k repetitions is then given by þ1Z k y k SkðρÞ¼ dϕPσðϕÞðRxðϕÞCZÞ ρðCZRxðϕÞ Þ : (19) À1 k Note that Sk ≠ ðS1Þ since this noise is correlated across multiple repetitions of the gate. Furthermore, we assume perfect state preparation and measurement. In this case, one can represent the noisy gate by some unitary Utotal acting on the two qubits and on a classical state in a Gaussian stochastic mixture of angles ϕ. The continuous nature of this classical environment state leads to a lack of a hard cut-off on the number of eigenvalues in g(k). We apply the matrix-pencil method to the corresponding signal gNO SPAM(k) and we use an F-test to determine the optimal number of eigenvalues for each σ (Fig. 4). For σ = 22.9° and K = 50, we find Fig. 4 Spectral footprint of a simulated CZ gate affected by non- eigenvalues with modulus clearly >1. Those are unphysical but not Markovian noise quantified by σ, see Eq. (19). For each σ, we use an excluded by the matrix-pencil method. We expect that such |λest| F-test (p value 0.01) to find the number of eigenvalues that best fit > 1 disappear when considering a longer signal, since g(k) does the simulated gNO SPAM(k) with K = 50. We find, respectively 7, 12, σ = not increase exponentially in k. In other words, this is a sign that and 11 eigenvalues for 5.7°, 22.9°, and 40.1° (here we show only the signal contains more spectral content than can be resolved the eigenvalues with modulus >0.9). We observe eigenvalues with σ fi from the time scale set by K. Indeed, for σ = 22.9° we have made modulus >1 if is suf ciently large. These results are qualitatively = fi stable if we add a small amount of sampling noise the same analysis for larger KsuptoK 200 and we nd that those eigenvalues get closer and closer to 1. If instead we fix K = 50 and consider different σs, we find that for a low σ (e.g., 5.7°) of leakage is the contribution of more eigenvalues to the signal g unphysical eigenvalues are not present (Fig. 4), whereas for σ > (k). For low leakage, we may expect three dominant eigenvalues 22.9° (e.g. 40.1°) they get again closer and closer to 1. This latter ~ fi with relatively large amplitude Aj and ve eigenvalues with small fact can be understood by noting that increasing σ is analogous to amplitude. enlarging the time scale set by K, as the characteristic time scale of For a gate on two qutrits, identical remarks apply, except that dephasing gets shorter for a fixed K. Based on these observations, an additional basis transformation is required from the orthogonal we conclude that there is a certain intermediate time scale at Gell–Mann basis to the computational qubit Pauli basis in order to which eigenvalues >1 are extrapolated from the data in the GM keep the same division of T as in Eq. (17). If we have two qutrits, presence of sufficiently strong non-Markovian noise of the kind the 80-dimensional traceless subspace is spanned by the matrices described in this section. Section “Frame mismatch accumulation” GM GM σμ σν for μ, ν = 0, …, 8 except μ = ν = 0. The issue is related discusses a model with a different kind of time correlation leading σGM σGM to a spectral footprint which is incompatible with that of a TPCP to terms such as 0 ν≠0 since the normalization of the qutrit map. identity σGM ¼ p1ffiffi I is different from the normalization of the 0 3 3 1ffiffi qubit identity (P0 ¼ p I2). This suggests that for two qutrits it is Non-Markovianity: coherent revivals. In order to better under- 2 est better to write TGM in a basis that includes the Pauli matrices in the stand the occurrence of eigenvalue estimates |λ | > 1, we apply computational subspace (Pμ ⊗ Pν for μ, ν = 0, …, 3 except μ = ν = the matrix-pencil method on a signal (of a somewhat different 0) as a sub-basis. For two qutrits, the signal may then contain up physical origin), which has a revival over the time period set by K. to 80 eigenvalues of which all but 15 are expected to have small It is well known that, in the exchange of energy between a two- amplitude in case of low leakage. level atom with a bosonic mode, the Rabi oscillations of the two- level atom are subject to temporal revivals. These revivals are due Non-Markovianity: time-correlated noise. Non-Markovian behavior to the fact that the bosonic driving field is not purely classical but of a gate can be due to temporal correlations in the classical or rather gets entangled with the state of the qubit via the quantum environment of the driven qubit(s). Abstractly, we can Jaynes–Cummings interaction. In particular, for a coherent driving include the environment in the gate action so that the evolution field with coherent amplitude α with average photon number 2 for each gate application is a unitary given by some U acting n ¼jαj , the probability for the atom to be excited equals (see total 20 on system and environment. We can expand the Pauli transfer section 3.4.3 in ref. ): X1 matrix of Utotal in a Pauli basis for system and environment and 1 1 pffiffiffiffiffiffiffiffiffiffiffi view T as a sub-block of T , similar as in the case of leakage. PeðtÞ¼ þ pαðnÞcosðΩt n þ 1Þ; (20) comp total 2 2 Diagonalizing Ttotal and taking the trace over the computational n¼0 space will result in an expression such as Eq. (18). For example, an 2 jαj2n with pαðnÞ¼expðÀjαj Þ . We consider n ¼ 5 and sample the additional spectator or environment qubit can lead to a signal g(k) n! 1 Ωδ of a single-qubit gate having contributions from 15 eigenvalues. damped oscillatory function PeðtÞÀ2 at regular intervals k t fi with Ωδt = 0.05 and k = 0, …, K = 900. The signal function gðtÞ¼ Choosing a suf ciently large K may allow one to resolve these pffiffiffiffiffiffiffiffiffiffiffi 1 λ : eigenvalues, even those with small amplitude. PeðtÞÀ2 contains eigenvalues equal to n ¼ expð ± i0 05 n þ 1Þ 30 A more malicious, but physically reasonable, form of classical with amplitudes according to the Poisson distribution pα(n) with

Published in partnership with The University of New South Wales npj Quantum Information (2019) 74 J. Helsen et al. 8 The effective upshot of leakage and non-Markovian noise is that the signal will have more spectral content than what can be resolved given a chosen sequence length K, leading to unphysical features in the spectrum such as an eigenvalue estimate >1, or the absence of a real eigenvalue. Even though we have seen in our examples that a physical spectrum can be regained by going to larger K, depending on the noise model, this convergence may be very slow requiring much data-taking time. Hence, these unphysical features are useful markers for deviations from our model of repeated TPCP qubit maps Sk. We view it as an open question how well one can reliably distinguish different sources of deviations. An interesting application of the spectral tomography method could be the assessment of logical gates on encoded quantum information in a SPAM-resistant fashion. In this logical scenario (for, say, a single logical qubit), one first prepares the eigenstates of the logical Pauli operators X; Y, and Z. One then applies a unit of error-correction k = 0, …, K times: a single unit could be, say, the repeated error correction for L rounds of a distance-L surface code. Or a unit is the application of a fault-tolerant logical gate, e.g., by means of code-deformed error correction or a transversal logical gate followed by a unit of error correction. After k units, one measures the logical Pauli operators fault-tolerantly and repeats experiments to obtain the logical signal gðkÞ. Studying the spectral features of such logical channel will give information about the efficacy of the quantum error correction unit and/or the applied logical gate while departures from the code space or a need to time-correlate syndrome data beyond the given QEC unit can show up as leakage and non-Markovian errors.

METHODS Single-qubit case with non- T In general, a matrix T can be brought to by a similarity −1 transformation, i.e., T = VJV with J = ⊕i Ji where each Jordan block Ji is of the form 0 1 λi 1 B C B .. C B λi . C Fig. 5 Study of the reviving signal given in Eq. (20)fork ⋅ Ωδt = k ⋅ J ¼ B C; (21) i B .. C 0.05, n ¼ 5, and K = 900. We find that the reviving signal is well @ . 1 A fi reconstructed by a t with 15 eigenvalues, some of which are λ distinctly separated as can be seen in the spectral footprint. Some of i the eigenvalues are estimated to be >1. This is another example in see, e.g., Theorem 3.1.11 in ref. 31. T is diagonalizable when each Jordan which the matrix-pencil method gives unphysical eigenvalues in the block is fully diagonal. presence of non-Markovian behavior (revivals here, time-correlated An example of a non-diagonalizable Lindblad superoperator on a single parameters in Fig. 4) qubit has been constructed in ref. 32. Using this, one can easily get a single- qubit superoperator S for which the traceless block of the Pauli transfer mean photon number n. matrix is a non-diagonalizable matrix T as follows. Let SðρÞ¼ expðLϵÞðρÞρ þ ϵLðρÞþOðϵ2Þ with LðρÞ¼Ài½yZ ; ρŠþ We observe that the matrix-pencil method finds eigenvalues >1, = 2 D½ð2xÞ1 2σ ŠðρÞþD½y1=2XŠðρÞ with D½AŠðρÞ¼AρAy À 1 fAyA; ρg and real see Fig. 5, which contribute significantly (p < 0.01 via F-test) to the À 2 parameters x, y ≥ 0. This implies that S has the 4 × 4 Pauli transfer matrix reconstructed signal. We can understand this feature of eigenva- 0 1 lues >1 as a way in which the matrix-pencil method handles 10 0 0 B C revivals: the signal has more spectral content than what can be B 01À ϵx Àϵy 0 C S ¼ B C þ Oðϵ2Þ: resolved from the window of time given by K, in particular there is @ 0 ϵy 1 À ϵðx þ 2yÞ 0 A no hard cut-off on the number of eigenvalues that contribute. We 2ϵx 001À 2ϵðx þ yÞ have observed that an analysis of the signal over a longer period of time, that is, a larger K up to K = 5000, gives eigenvalues whose Taking some small ϵ and x ≠ 0, one can check that the submatrix T does norm converges to at most 1. not have 3 eigenvectors and it has a pair of degenerate eigenvalues, so T is not diagonalizable. When we take x = 0, S is unital, that is, S(I) = I, and the submatrix T is not diagonalizable either. DISCUSSION Even though a matrix T is not always diagonalizable, there still exists the so-called Schur triangular form for any matrix T.31 This form says that We have introduced spectral quantum tomography, a simple T ¼ WðD þ EÞWy, with W a , D a diagonal matrix with the method that uses tomographic data of the repeated application of eigenvalues of T, and E a strictly upper-triangular “nilpotent” matrix with a noisy quantum gate to reconstruct the spectrum of this non-zero entries only above the diagonal. Since the N × N matrix E is quantum gate in a manner resistant to SPAM errors. We have strictly upper-triangular, one has Tr[DiEj] = 0 for all j ≠ 0. If we use this form experimentally validated our method on one- and two-qubit gates in Eq. (12), one obtains for any k hi and have also numerically investigated its behavior in the Âà Âà gNO SPAMðkÞ¼Tr T k ¼ Tr ðD þ EÞk ¼ Tr Dk ; (22) presence of temporally correlated non-trivial error models.

npj Quantum Information (2019) 74 Published in partnership with The University of New South Wales J. Helsen et al. 9

l1 l2 l3 lm since any product of the form D E D ¼ E with some non-zero li > 0 is a matrix with zeros on the diagonal. In case of SPAM errors and non- diagonalizable T, we consider

y k gðkÞ¼Tr½W TprepTmeasWðD þ EÞ Š; (23) y where W TprepTmeasW is not the identity matrix due SPAM errors, implying that g(k) can depend on E and have a non-exponential dependence on k. Thus, in the special case of a non-diagonalizable matrix T, the signal g(k) would not have the dependence on the eigenvalues as in Eq. (13). In particular, we can examine the physically interesting non- diagonalizable Case 3 in section “Relation to relaxation and dephasing Γ Γ ” = = cr 1 À 2 times in this , taking hy hz 0 and a critical hx ¼ 2 . The dynamics of the Lindblad equation after time t induces a superoperator St, which will have the following action on the Pauli operators: Γ ; StðXÞ¼expðÀ 2tÞX ÂÃ Γ Γ = cr cr ; StðYÞ¼expðÀð 1 þ 2Þt 2ÞðÂÃ1 þ thx ÞY À hx Z Γ Γ = cr cr : StðZÞ¼expðÀð 1 þ 2Þt 2Þ hx tY þð1 À hx tÞZ Here we can note the linear dependence on t dueP to the system being critically damped. If we consider the signal gðtÞ¼ μ Tr½PμStðPμފ, we see that this linear dependence on t drops out in accordance with Eq. (22), i.e., this trace only depends on the eigenvalues and has an exponential dependence on t. In the presence of SPAM errors, some of the linear dependence could still be for such critically damped system. In fi addition, coef cients such as cμν ðtÞ¼Tr½PμStðPν ފ can depend linearly on Fig. 6 Spectral footprint of a simulated CNOT gate affected by t, making such tomographic data less suitable to extract eigenvalue frame mismatch accumulation, for K = 50. The shown eigenvalues information. are {0.9636 + 0.03276i, 0.9636 − 0.0327i, −0.9804 + 0.0495i, −0.9804 − 0.0495i}, qualitatively matching the experimentally mea- Upper bound on the entanglement fidelity with the targeted gate sured eigenvalues shown in Fig. 3 and critically matching the lack of real eigenvalues observed in Fig. 3 In this section, we show how to relate the eigenvalues of the Pauli transfer matrix of a TPCP map S to an upper bound on the entanglement fidelity P P π ; – 31 (and hence the average gate fidelity) with the targeted unitary gate U. m qm m with qm  0 m qm ¼ 1 (Birkhoff von Neumann theorem ) π Naturally, one can only expect to obtain an upper bound on the gate with m. With these facts and the convention λS λ fidelity, since the eigenvalues do not provide information about the ij ¼ i, we can bound eigenvectors of S. If the actual eigenvectors deviate a lot from ideal, the X fi Uy S y ideal S actual gate delity could be very low, so one can certainly not derive a jTr½T WD W Šj  qmjλ πmλ jNξmax: lower bound on the fidelity based on the eigenvalues. m

S λ N = These bounds together then lead to Eq. (24). Lemma 1. Let the eigenvalues of the N × N matrix T be f igi¼1 with N d2 − 1 for a d-dimensional system. Let U be the targeted gate with An immediate corollary of Lemma 1 is eigenvalues fλidealgN and let there be permutation π of ith eigenvalue λ , vffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi i iP¼1 P i 0 u P 1 λà λideal ξ 1 λà λideal u λ 2 which maximizes j i πðiÞ i j so that 0  max¼ maxhiπ N j i πðiÞ i j t j jj 1 B j C 1 Uy S ; B ξ C;  1. The entanglement fidelity F ðU; SÞ ¼ 1 þ Tr T T is upper F entðU SÞ  @1 þ N 1 À þ N maxA (26) ent Nþ1 N þ 1 N bounded as vffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi 0 u P 1 u λ 2 B t j jj C since uðSÞ  1 for TPCP maps. However, this is in general not a very strong 1 B j C fi F entðU; SÞ  @1 þ N uðSÞ À þ NξmaxA; (24) upper bound on the delity. N þ 1 N We can do better in the single-qubit case by realizing that there are S strong relations between the singular values σi of T and the absolute λ S where uðSÞ is the unitarity of S. values of the eigenvalues | i|ofT . Ordering both the singular values and the eigenvalue magnitudes in descending order, we have the following Proof. We write T S in Schur triangular form as T S ¼ WðDS þ EÞWy with (weak majorization) inequalities for arbitrary matrices W a unitary matrix, DS a diagonal matrix with the eigenvalues of T S, and E a strictly upper-triangular “error” matrix with non-zero entries only above YN YN 31 σ λ ; the diagonal. Using the Cauchy-Schwartz inequality, one has i ¼ j ij (27) i¼1 i¼1 = = Tr½T UyT SŠTr½T UyWDSWyŠþðTr½EyEŠÞ1 2ðTr½T UyT UŠÞ1 2: (25)

Uy U T U y Uy U Note that for a unitary gate U, T ¼ðT Þ ¼ðT Þ and T T ¼ I implying XF XF σ λ ; ; ¼ ; : that T is an orthogonalffiffiffiffi matrix with unit singular values. We thus have i  j ij F 2f1 N À 1g (28) = p ðTr½TUyT UŠÞ1 2 ¼ N. One has Tr½T SyT SŠ = Tr½ðDS þ EÞyðDS þ Eފ = i¼1 i¼1 Sy S y Tr½ðD D þ E Eފ, usingP the strict upper-triangularity of E. In other words, y Sy S λ 2 λ S For single-qubit channels, we can also impose TPCP constraints to the Tr½E EŠ¼Tr½T T ŠÀÂÃi j ij where i are the eigenvalues of T . 33 1 Sy S singular values of the channel. In particular, we have [ref. , Eq. (4)] Recognizing that N Tr T T ¼ uðSÞ, we obtain an upper bound on the second term in Eq. (25). σ  1; 8i 2f0; 1; 2; 3g; (29) Now let us upper bound the first term in Eq. (25) for unknown unitary W. i Assume w.l.o.g. that TU and DS are diagonal in the same basis (the additionalP rotation between theseP eigenbases can be absorbed into W). Let U λideal S λ σ þ σ  1 þ σ : (30) PT ¼ i i Pi and D ¼ i iPi with orthogonal projectors Pi and 1 2 3 fi y i Pi ¼ I.De ne the matrix MPwith entriesPMij ¼ Tr½PiWPjW Š. The matrix M is doubly stochastic, since i Mij ¼ 1 ¼ j Mij, which implies that M ¼ Using these relations, we can upper bound the unitarity of a single-qubit

Published in partnership with The University of New South Wales npj Quantum Information (2019) 74 J. Helsen et al. 10 channel S, given its eigenvalues, using the optimization: Publisher’s note: Springer Nature remains neutral with regard to jurisdictional claims fi 1 σ2 σ2 σ2 in published maps and institutional af liations. minimize uðSÞ ¼ 3 ð 1 þ 2 þ 3Þ σ1;σ2 ;σ3

subject to σ1σ2σ3 ¼jλ1jjλ2jjλ3j; REFERENCES 1  σ1  σ2  σ3  0; σ σ σ ; 1. Knill, E. et al. Randomized benchmarking of quantum gates. Phys. Rev. A 77, 1 þ 2  1 þ 3 012307 (2008). σ1 þ σ2 jλ1jþjλ2j; 2. Magesan, E., Gambetta, J. M. & Emerson, J. Scalable and robust randomized benchmarking of quantum processes. Phys. Rev. Lett. 106, 180504 (2011). σ1 þ σ2 þ σ3 jλ1jþjλ2jþjλ3j: 3. Magesan, E. et al. Efficient measurement of quantum gate error by interleaved This is a non-convex optimization problem in three variables, for which a randomized benchmarking. Phys. Rev. Lett. 109, 080505 (2012). λ λ λ global minimum can be numerically computed given 1, 2, 3. This gives 4. Wood, C. J. & Gambetta, J. M. Quantification and characterization of leakage an upper bound on the unitarity of S and hence on the entanglement errors. Phys. Rev. A 97, 032306 (2018). fi delity of S to the target unitary U. In the main text, we use this 5. Wallman, J., Granade, C., Harper, R. & Flammia, S. T. Estimating the coherence of fi optimization to give non-trivial upper bounds on the delities of single- noise. New J. Phys. 17, 113020 (2015). qubit gates realized on superconducting chips and analyzed using the 6. Dirkse, B., Helsen, J. & Wehner, S. Efficient unitarity randomized benchmarking of spectral tomographic method. few-qubit . E-prints at https://arxiv.org/abs/1808.00850 (2018). 7. Erhard, A. et al. Characterizing large-scale quantum computers via cycle bench- Frame mismatch accumulation marking. E-prints at https://arxiv.org/abs/1902.08543 (2019). 8. Onorati, E., Werner, A. H. & Eisert, J. Randomized benchmarking for individual In section “Spectral tomography on two superconducting chips,” we noted quantum gates. E-prints at https://arxiv.org/abs/1811.11775 (2018). that the data gathered for the CNOT gate cannot be explained by a model 9. Kimmel, S., da Silva, M. P., Ryan, C. A., Johnson, B. R. & Ohki, T. Robust extraction of of a noisy TPCP map S repeated k times. Here we propose a simple tomographic information via randomized benchmarking. Phys. Rev. X 4, 011050 coherent model that qualitatively reproduces the features observed in Fig. (2014). 3 and we call this the frame mismatch accumulation model. Let S be a 0 10. Blume-Kohout, R. et al. Demonstration of qubit operations below a rigorous TPCP map that is a good approximation of the targeted gate applied fault tolerance threshold with gate set tomography. Nat. Commun. 8, 14485 exactly once (in the main text, this was the CNOT) and let V be some (2017). unitary. In the frame mismatch accumulation model, we assume that k 11. Greenbaum, D. Introduction to quantum gate set tomography. E-prints at https:// consecutive applications of the gate are equal to: arxiv.org/abs/1509.02921 (2015). Yk ÀÁ 12. O’Brien, T. E., Tarasinski, B. & Terhal, B. Quantum phase estimation of multiple y i i y kþ1 k Sk ¼ V S0V ¼ðV Þ ðVS0Þ : (31) eigenvalues for small-scale (noisy) experiments. New J. Phys. 21, 023022 (2019). i¼0 13. Bennink, R. S. & Lougovski, P. Quantum process identification: a method for Intuitively, this can be interpreted as an increasing mismatch between the characterizing non-markovian quantum dynamics. E-prints at https://arxiv.org/ frame in which S0 was defined and the frame in which the gate was abs/1803.02438 (2018). implemented at the ith repetition, up to i = k. 14. Wolf, M. M. & Perez-Garcia, D. Assessing quantum dimensionality from obser- We apply this model to a CNOT gate, choosing S0 to be an ideal CNOT vable dynamics. Phys. Rev. Lett. 102, 190504 (2009). θ θ = 15. Strikis, A., Datta, A. & Knee, G. C. Quantum leakage detection using a model- gate and choosing V ¼ expðÀi 2 I YÞ with 0.05 deg. In the case of the cross-resonance CNOT gate performed on ibmqx4, this may correspond to independent dimension witness. Phys. Rev. A 99, 032328 (2019). an imperfect cancellation of the I ⊗ Y term.34 In Fig. 6, we see that this 16. Rudnicki, L., Puchała, Z. & Zyczkowski, K. Gauge invariant information concerning example closely reproduces the eigenvalues shown in Fig. 3. At the same quantum channels. Quantum 2, 60 (2018). time, we note that the qualitative features observed in Fig. 6 do not 17. Ruskai, M.-B., Szarek, S. & Werner, E. An analysis of completely-positive trace- depend on the choice of the rotation axis of V (for either qubit), as long as preserving maps on m2. Linear Algebra Appl. 347, 159–187 (2002). the rotation does not commute with S0 (which would leave the gate 18. Wolf, M. Quantum channels and operations guided tour. https://www-m5.ma. unaffected by the frame mismatch). tum.de/foswiki/pub/M5/Allgemeines/MichaelWolf/QChannelLecture.pdf (2012). 19. Horodecki, M., Horodecki, P. & Horodecki, R. General teleportation channel, DATA AVAILABILITY singlet fraction, and quasidistillation. Phys. Rev. A https://doi.org/10.1103/ PhysRevA.60.1888 (1998). Experimental data gathered for Figs. 2 and 3, as well as an implementation of the 20. Haroche, S. & Raimond, J.-M. Exploring the Quantum: Atoms, Cavities, and Photons matrix pencil algorithm, can be found online at https://doi.org/10.5281/ (Oxford University Press, Oxford, 2006). zenodo.2613856. 21. Nielsen, M. A. & Chuang, I. L. Quantum Computation and Quantum Information (Cambridge University Press, 2000). ACKNOWLEDGEMENTS 22. Sarkar, T. K. & Pereira, O. Using the matrix pencil method to estimate the para- meters of a sum of complex exponentials. IEEE Antennas Propag. Mag. 37,48–55 The work by F.B. and B.M.T. was supported by ERC grant EQEC No. 682726. J.H. is (1995). funded by STW Netherlands, NWO VIDI, an ERC Starting Grant, and by the NWO 23. Potts, D. & Tasche, M. Parameter estimation for nonincreasing exponential sums Zwaartekracht QSC grant. We thank Andrew Cross for generous access to the IBM by Prony-like methods. Linear Algebra Appl. 439, 1024–1039 (2013). Quantum Experience for a TU Delft MSc project, which indirectly led to this work, Jarn 24. Helsen, J., Wallman, J. J., Flammia, S. T. & Wehner, S. Multi-qubit randomized de Jong for discussions on quantum tomography, and Adriaan Rol for assistance with benchmarking using few samples. Preprint at https://arxiv.org/pdf/1701.04299. fi the QuTech Quantum In nity. J.H. would also like to thank Arnaud Carignan-Dugas pdf (2017). for interesting discussions. The views expressed in this manuscript are those of the 25. Barends, R. et al. Superconducting quantum circuits at the surface code threshold fl fi authors and do not re ect the of cial policy or of IBM or the IBM Quantum for fault tolerance. Nature 508, 500 (2014). Experience Team. 26. Xue, X. et al. Benchmarking gate fidelities in a si/sige two-qubit device. Phys. Rev. X 9, 021011 (2019). 27.Ballance,C.,Harty,T.,Linke,N.,Sepiol,M.&Lucas,D.High-fidelity quantum AUTHOR CONTRIBUTIONS logic gates using trapped-ion hyperfine qubits. Phys. Rev. Lett. 117, 060504 All authors contributed to the development of the theoretical concepts presented. (2016). The experiments on the IBM QE and the QuTech QI were performed and analyzed by 28. Wu, C.-F. J. et al. Jackknife, bootstrap and other resampling methods in regression J.H. and the simulations on non-Markovianity were performed by J.H. and F.B., under analysis. Ann. Stat. 14, 1261–1295 (1986). supervision of B.M.T. All authors contributed to the writing of the manuscript. 29. Seber, G. & Wild, C. Nonlinear Regression (John Wiley & Sons, Hoboken, NJ, 2003). 30. Rol, M. A. et al. A fast, low-leakage, high-fidelity two-qubit gate for a program- mable superconducting quantum computer. E-prints at https://arxiv.org/abs/ ADDITIONAL INFORMATION 1903.02492 (2019). 31. Horn, R. A. & Johnson, C. R. Matrix Analysis (Cambridge University Press, 1985). Competing interests: The authors declare no competing interests.

npj Quantum Information (2019) 74 Published in partnership with The University of New South Wales J. Helsen et al. 11 32. Sarandy, M. S. & Lidar, D. A. Adiabatic approximation in open quantum systems. appropriate credit to the original author(s) and the source, provide a link to the Creative Phys. Rev. A 71, 012331 (2005). Commons license, and indicate if changes were made. The images or other third party 33. Wolf, M. M. & Perez-Garcia, D. The inverse eigenvalue problem for quantum material in this article are included in the article’s Creative Commons license, unless channels. Preprints at https://arxiv.org/abs/1005.4545 (2010). indicated otherwise in a credit line to the material. If material is not included in the 34. Sheldon, S., Magesan, E., Chow, J. M. & Gambetta, J. M. Procedure for systematically article’s Creative Commons license and your intended use is not permitted by statutory tuning up cross-talk in the cross-resonance gate. Phys. Rev. A 93, 060302 (2016). regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this license, visit http://creativecommons. org/licenses/by/4.0/. Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give © The Author(s) 2019

Published in partnership with The University of New South Wales npj Quantum Information (2019) 74