Skip to main content

Precise certification of a qubit space


We demonstrate an implementation of the precise test of dimension on the qubit, using the public IBM quantum computer, using the determinant dimension witness. The accuracy is below 10−3 comparing to maximal possible value of the witness in higher dimension. The test involving minimal independent sets of preparation and measurement operations (gates) is applied both for specific configurations and parametric ones. The test is robust against nonidealities such as incoherent leakage and erroneous gate execution. Two of the IBM devices failed the test by more than 5 standard deviations, which has no simple explanation.

1 Introduction

The basic building block of a quantum computer is a qubit, a generic two-level system. Since the goal is to manipulate accurately many qubits, it is necessary to ascertain whether or not the qubit space is reliable, i.e. not combined with a larger space. The most promising implementations of qubits keep them detuned from environment and other states, operating each qubit at a unique and isolated transition frequency, believed to cause only small incoherent disturbances. The assumption of two-level states is necessary for any successful fault-tolerant quantum computation performed on noisy devices, as the error mitigation relies on the controlled space of noise [13]. In some systems the effect of extra states can be identified and erased because of known mechanism and transition parameters [47]. On the other hand, the potential unknown contribution of external states can lead to systematic errors, which are hard to correct [811]. Such a leakage has been directly observed in the delay test [12] at the level of 3.5 variances, but its origin has not been yet identified. Due to anharmonicity, the leakage to known higher states of the transmon [13] becomes significant for very fast gates, where additional measures are necessary to reduce it [1416].

The dimension of the quantum space can be checked by a dimension witness [1722]. The construction of the witness is based on the two-stage protocol. The initial preparation preceeds the final measurement, with both chosen from independent sets of operations, as we schematically illustrate in Fig. 1. The precise witness is a quantity, which is exactly zero for systems up to a certain dimension, and nonzero otherwise. A good witness certifies the linear independence of specific dichotomic outcome probability \(p(M|N)\) for the preparation N and measurement M and so it is expressed by a suitable determinant [2325]. This type of witness was tested on optical states [26].

Figure 1
figure 1

Preparation and measurement scenario; the state is prepared as N and measured by M to give an outcome of either 1 or 0

The tests of dimension are robust against many deficiencies of real quantum gates. Physical operations on qubits are realized by microwave pulses and suffer from distortions due to nonlinearities of waveform generators [27]. Therefore a simple deviation of the probability distribution from the theoretical prediction [28, 29] is insufficient to test for an extra qubit space.

In this paper, we apply the optimal witness [25] to test several IBM quantum devices. Most of the results agree with the 2-level model. However, after taking a large statistics, we find clear signatures of the test failure. We reveal a device, which systematically produces more than 5 standard deviations away from the reference zero. Of course, it does not immediately mean a larger space, but the problem needs urgent further investigation. The cause, which may be also another assumption of the test (e.g. lack of independence of the operations) points to deeper problems, which can make promises of near-term quantum noisy devices fruitless.

2 Theory

We test the qubit space \(d=2\) with the witness constructed from the measurement probabilities \(p(M|N)=\operatorname{tr}M N\), where the preparation operator is \(N=N^{\dagger}\geq 0\), \(\operatorname{tr}N=1\) and the measurement is \(M=M^{\dagger}\) (both M and \(1-M\) are positive semi-definite). In Appendix A we write the explicit form of \(N_{j}\), \(M_{k}\) for 5 preparations \(j=1..5\) and 4 measurements \(k=1..4\).

We construct the \(5\times 5\) matrix p with entries \(p_{kj}=p(M_{j}|N_{k})\) and supplement it with \(p_{5j}=1\). Then the witness determinant \(W=\det p\) must be equal to zero if all \(N_{j}\) and \(M_{k}\) represent the same two-level space [12, 25]. In addition, it remains zero also if all preparations contain some constant incoherent leakage term, i.e. \(N'_{j}=N_{j}+\tilde{N}\), with Ñ in an arbitrary space, independent of j. In this way, the uncontrolled leakage to an extra space does not affect the test [12]. For \(d=2\) we have \(W=0\), but \(d=3\) gives maximally \(27\sqrt{2}/64\simeq 0.6\) in the real space and 0.632 in the complex space [25]. For \(d=4\) the maximum (real and complex) is \(2^{12}/3^{7}\simeq 1.87\), even higher dimensions saturate the classical bound 3.

The IBM Quantum Experience cloud computing offers several devices, collections of qubits, which can be manipulated by a user-defined set of gates (operations) – either single qubit or two-qubit ones, equipped with a general parametrization. One can put barriers (controlling the order of operations) or additional resets (nonunitary transition to the ground state). These features are necessary to implement our tests. The qubits are physical transmons [30], the artificial quantum states existing due to interplay of superconductivity (Josephson effect) and capacitance (Coulomb charging effect). Controlled anharmonicity allows to limit the working space to two states. The decoherence time (mostly environmental) is long enough to perform a sequence of quantum operations and read out reliable results.

Gates are implemented by time-scheduled microwave pulses prepared by waveform generators and mixers (time \(30-70\text{ ns}\) with sampling at 0.222 ns), tuned to the drive frequency (energy difference between qubit levels) [31] (about \(4-5\text{ GHz}\)). The single-qubit rotation \(Z_{\gamma}\) is not a real pulse, but it is realized by an instantaneous virtual gate \(\operatorname{VZ}(\gamma )\), which adds a rotation between in- and out-of-phase components of the pulse for the next gates [32]. The readout is performed by coupling the resonator to another long microwave pulse at a frequency different from the drive and finally measuring the populated photons [31, 33]. The ground state \(|0\rangle \) can be additionally assured by a reset operation applied after the measurement.

In the following, we assume the two-level description of the qubits, expecting \(W=0\) up to a statistical error. Larger deviation would be an evidence that this description is inaccurate. In a two-dimensional Hilbert space the states and the operators are constructed with the standard Pauli matrices

$$\begin{aligned} &\sigma _{1}= \begin{pmatrix} 0&1 \\ 1&0 \end{pmatrix},\qquad \sigma _{2}= \begin{pmatrix} 0&-i \\ i&0 \end{pmatrix},\qquad \sigma _{3}= \begin{pmatrix} 1&0 \\ 0&-1 \end{pmatrix}, \end{aligned}$$

defined in the computational basis \(|0\rangle \), \(|1\rangle \). Then the initial pure state is \(|0\rangle \langle 0|= (1+\sigma _{3})/2\).

A microwave pulse tuned to the interlevel drive frequency allows one to apply the parametrically controlled gates. The native gate is the \(\pi /2\) rotation:

$$ S=RX(\pi /2)=\sqrt{X}=\frac{1}{\sqrt{2}} \begin{pmatrix} 1&-i \\ -i&1\end{pmatrix} . $$

The rotation for a given angle θ is realized with the native gate S and two gates \(Z(\theta )\):

$$ S_{\theta}=Z^{\dagger}_{\theta }SZ_{\theta },\qquad Z_{\theta}= \begin{pmatrix} e^{-i\theta /2}&0 \\ 0&e^{i\theta /2}\end{pmatrix} . $$

Physically the experiment is a sequence of initialization in the state \(|0\rangle \), two gates \(S_{\alpha}\), \(S_{\beta}\) applied for the preparation, then the two gates \(S_{\phi}\), \(S_{\theta}\), and the readout pulse for the measurement of the state \(|0\rangle \) again, see Fig. 2. There are 5 pairs of angles \(\alpha _{j}\), \(\beta _{j}\) (\(j=1..5\)) to be chosen independently of the 4 pairs \(\theta _{k}\), \(\phi _{k}\) (\(k=1..4\)). Then \(N_{\alpha \beta}=S_{\beta }S_{\alpha}|0\rangle \langle 0|\) and \(M_{\theta \phi}=S^{\dagger}_{\phi }S^{\dagger}_{\theta}|0\rangle \langle 0|S_{ \theta }S_{\phi}\) represent the state preparation and measurement operators correspondingly. The actual pulse waveform of a sample sequence of gates is depicted in Fig. 3.

Figure 2
figure 2

The quantum circuit for the dimension test. The initial state \(|0\rangle \) and four gates \(S_{\gamma}\), split into preparation and measurement stages, are followed by the final dichotomic measurement

Figure 3
figure 3

The actual waveform of the pulse on IBM quantum computer (nairobi), with four subsequent gates \(S_{\gamma}\), with \(\gamma =\alpha ,\beta ,\phi ,\theta \), consecutively. The discretization unit time is \(dt=0.222\text{ ns}\). Driving (level gap) frequency is denoted by D0. The light/dark shading corresponds to in-phase/out-of-phase amplitude component, respectively. The element \(\operatorname{VZ}(\xi )\) is a zero-duration virtual gate \(Z_{\xi}\) for subsequent gates \(S_{\gamma}S_{\delta}\) with \(\xi =\gamma -\delta \) [32]

The states and measurements of a two-level system can be equivalently represented in the Bloch sphere. The initial state \(|0\rangle \langle 0|\) corresponds to the vector \((0,0,1)\). In Appendix A we write explicit formulas for the Bloch vector \(\boldsymbol {n}_{\alpha \beta}\) corresponding to our preparations and \(\boldsymbol {m}_{\theta \phi}\) corresponding to the measurements. The Bloch vectors are used for illustration purposes in Fig. 4. Heuristically, one needs evenly spread vectors over the Bloch sphere to provide a more discriminative test [25].

Figure 4
figure 4

The Bloch vectors for the preparations (red) and measurements (blue) corresponding to the angles from Table 1, top ’ and bottom ”. For the case ’, the four measurement direction are identical to four preparations

3 Experiment

In a perfect theory, we can predict a probability for every choice of α, β, θ, ϕ. The experimental results can differ for a variety of reasons. Firstly, the test is random and we have to estimate the error due to finite statistics. For T times the experiment is repeated, the variance of W was derived in Ref. [25] as:

$$ T\bigl\langle W^{2}\bigr\rangle \simeq \sum _{kj}p_{kj}(1-p_{kj}) (\operatorname{Adj} p)_{jk}^{2}, $$

where Adj is the adjoint matrix (matrix of minors of p, with crossed out a given row and column, and then transposed). Note that the identity \(p^{-1}\det p=\operatorname{Adj} p\) does not apply here as \(W=\det p=0\) in the limit \(T\to \infty \). We circumvent the limitations of statistical errors by accumulating a vast statistics of the data. We use the finite data estimate of \(\langle W^{2}\rangle \) to monitor accuracy of our results. Secondly, the implementation of gates may be not faithful. Our test is not affected the standard local sources of depolarizing and relaxation errors, and general gate and readout errors, as they are assumed to remain within the two-level space. Moreover, the test accounts for a leakage to external states (e.g. \(|2\rangle \)) as long as it is incoherent and does not depend on the circuit parameters α, β, θ, ϕ, as it adds a global constant to eacht \(p_{jk}\). Lastly, we have to assume that the pulse does not depend on the previous ones. In other words, we can only test the following combination of assumptions: dimension of the space and independence of operations.

We have calculated W in two ways: (i) determining p for each job and then finding W (see the values for each job in Fig. 10) and finally averaging W, and (ii) averaging first p from all jobs and then finding W. Results are consistent within statistical error, the details are depicted in Fig. 6.

There is no a priori best selection of preparations and measurements but they should not lie on a single Bloch circle. Otherwise the qubit becomes a rebit (reduced to real subspace). We decided to make two kinds of tests: (I) two special configurations corresponding to either the same Bloch vectors for preparation and measurements or maximal \(\langle W^{2}\rangle \) for a given T; (II) a family of configurations with one preparation vector at one of the 5 directions on the Bloch circle. In both cases the corresponding Bloch vectors are derived explicitly in Appendix A. The sets of angles in the case (I) are given in the Table 1, and the corresponding Bloch vectors are visualized in Fig. 4.

Table 1 The angles for the special two special cases, ’ and ”, with \(\eta =\operatorname{acos}(1/3)\) and 1 = 1’ = 1” for preparations in the test (I)

We have run the test (I) on lima and lagos, qubit 0. The probability matrix, compared to the ideal expectation is depicted in Fig. 5. The deviation from zero and the statistical error is given in Fig. 6. The total number of experiments is \(T=\#\mathrm{jobs}\cdot \#\mathrm{shots}\cdot \#\mathrm{repetitions}\). Technically, one sends a list of jobs to execute, each job contains up to 300 circuits, to be distributed between experiments repeated the same number of times. The number of shots specifies how many time the preprogrammed sequence of circuits is repeated within a single job. The readout counts for each circuit is the value returned after the job execution is accomplished. In this case the results agree with the assumption or the qubit space within the statistical error.

Figure 5
figure 5

Results of the test (I) with probabilities \(p_{kj}\) for the angles from Table 1, for lima and lagos, compared to the ideal expectation. Lagos: 60 jobs, 32000 shots, 15 repetitions. Lima: 521’/194” jobs, 20000 shots, 5 repetitions

Figure 6
figure 6

Results of the test (I) the witness \(W=\det p\), for the angles from Table 1, for lima and lagos, with the error given by (4). Red – W for p from each job and then averaged, blue – p averaged from all jobs to give W

The sets of angles in the case (II) are prepared differently. Four preparations and measurements are fixed while the last preparation is parameter-dependent. The fixed angles are specified in Table 2. The last preparation angles are \(\alpha _{5}=2\pi i/5=\beta _{5}-\pi /2\) for \(i=0..4\). The corresponding Bloch vectors are depicted in Fig. 7. We have run the test (II) on nairobi and perth, qubit 0. The probability matrix, compared to the ideal expectation is depicted in Fig. 8. The deviation from zero and the statistical error is given in Fig. 9. This time, the results are away from 0 by more than 5 standard deviations, in opposite directions, comparing both devices. As a sanity-check of our test we have run the identical programs on IBM simulator of a quantum computer with the noise model taken from the real devices perth and nairobi. However, in contrast to real devices, the results are in agreement with the theory as shown in Figs. 11, 12, 13. The data and scripts are available at the public repository [34].

Figure 7
figure 7

The Bloch vectors for the parametric case (II) with fixed preparations (red) and measurements (blue) corresponding to the angles from Table 1, and a parametric preparation (green)

Figure 8
figure 8

Results of the test (II) with probabilities \(p_{kj}\) for the angles from Table 2, for nairobi and perth, compared to the theory expectation. Nairobi/perth: 115/93 jobs, both 100000 shots and 8 repetitions

Figure 9
figure 9

Results of the test (II) the witness \(W=\det p\), for the angles from Table 2, for nairobi and perth, with the error given by (4). Red – W for p from each job and then averaged, blue – p averaged from all jobs to give W

Figure 10
figure 10

Results of the test (II) the witness \(W=\det p\), for the angles from Table 2, for nairobi and perth, for individual jobs. Two values for nairobi are beyond the picture boundaries, \((3,0.0023)\) and \((4,0.003)\)

Figure 11
figure 11

Results of the simulations of the test (II) with probabilities \(p_{kj}\) for the angles from Table 2, for nairobi and perth

Figure 12
figure 12

Results of the simulations of the test (II) the witness \(W=\det p\), for the angles from Table 2, for nairobi and perth noise models. Note that the two ways of calculation of W almost coincide (the blue one covers the red one), which is consistent with our explanation of averaged out first order difference in Appendix B

Figure 13
figure 13

Results of the simulations of the test (II) the witness \(W=\det p\), for the angles from Table 2, for nairobi and perth noise models, for individual jobs

Table 2 The angles for the parametric test (II) for preparations and measurements 1..4

4 Discussion of nonidealities

There are several factors that can affect the correctness of the experiment. (A) The daily calibration. The drive frequency and the gate waveforms are corrected so different jobs can rely on different realizations of gates. There first order effect of calibrations is cancelled out. Nevertheless, we made more detailed estimates on second order effects in Appendix B. Only large, unexpected failures could be a problem. (B) The leakage to higher states, e.g. \(|2\rangle \) is negligible [12, 29], of the order 10−13, according to IBM data, see details in Appendix C. (C) Memory of the waveform between successive gates. Highly unlikely, a residual voltage amplitude can persist up to the next gate. In principle it can be mitigated by delay-separated gates if the effect fades out with time. (D) Other qubits. They are usually detuned but some crosstalk may remain. We expect the crosstalk to be incoherent and so irrelevant for the witness.

5 Conclusions

A test of linear independence of quantum operations reveals subtle deviations, invisible in more crude tests. We demonstrated an experimental feasibilty and usefullness of the theoretical test. Further tests are necessary to identify the origin of the deviations, to exclude some sophisticated technical issues (e.g. lack of independence between the gate pulses) and more exotic options many worlds/copies theories [35, 36]. Even when the technical issues are to be blamed, our results evade standard characterisation methods. We suggest: (i) an extreme statistics collected in a relatively short time to avoid corrections due to calibration drifts, (ii) a time separation between gates to exclude potential overlap of the effects, (iii) a scan through a large set of Bloch vectors to maximize the potential deviation, (iv) run the test on a single-qubit devices to avoid cross-talks. It is also possible to develop more sophisticated tests, with different assumptions, or involving different qubits. In any case, a precise diagnostics of qubits must become a standard in quantum technologies.

Data availability

The data are publicly available at



rotation wave approximation




  1. Suzuki Y, Endo S, Fujii K, Tokunaga Y. Quantum error mitigation as a universal error reduction technique: applications from the NISQ to the fault-tolerant quantum computing eras. PRX Quantum. 2022;3:010345.

    Article  ADS  Google Scholar 

  2. Takagi R, Endo S, Minagawa S, Gu M. Fundamental limits of quantum error mitigation. npj Quantum Inf. 2022;8:114.

    Article  ADS  Google Scholar 

  3. Cai Z, et al. Quantum error mitigation. arXiv:2210.00921.

  4. Wu Y, Kolkowitz S, Puri S, Thompson JD. Erasure conversion for fault-tolerant quantum computing in alkaline earth Rydberg atom arrays. Nat Commun. 2022;13:4657.

    Article  CAS  PubMed  PubMed Central  ADS  Google Scholar 

  5. Kang M, Campbell WC, Brown KR. Quantum error correction with metastable states of trapped ions using erasure conversion. PRX Quantum. 2023;4:020358.

    Article  ADS  Google Scholar 

  6. Chou KS, et al. Demonstrating a superconducting dual-rail cavity qubit with erasure-detected logical measurements. arXiv:2307.03169.

  7. Levine H, et al. Demonstrating a long-coherence dual-rail erasure qubit using tunable transmons. arXiv:2307.08737.

  8. Wood CJ, Gambetta JM. Quantification and characterization of leakage errors. Phys Rev A. 2018;97:032306.

    Article  CAS  ADS  Google Scholar 

  9. Ghosh J, Fowler AG, Martinis JM, Geller MR. Understanding the effects of leakage in superconducting quantum error detection circuits. Phys Rev A. 2013;88:062329.

    Article  ADS  Google Scholar 

  10. Battistel F, Varbanov BM, Terhal BM. Hardware-efficient leakage-reduction scheme for quantum error correction with superconducting transmon qubits. PRX Quantum. 2021;2:030314.

    Article  ADS  Google Scholar 

  11. Wallman JJ et al.. Robust characterization of leakage errors. New J Phys. 2016;18:043021.

    Article  MathSciNet  Google Scholar 

  12. Strikis A, Datta A, Knee GC. Quantum leakage detection using a model-independent dimension witness. Phys Rev A. 2019;99:032328.

    Article  CAS  ADS  Google Scholar 

  13. Gambetta JM, Chow JM, Steffen M. Building logical qubits in a superconducting quantum computing system. npj Quantum Inf. 2017;3:2.

    Article  ADS  Google Scholar 

  14. Chen Z et al.. Measuring and suppressing quantum state leakage in a superconducting qubit. Phys Rev Lett. 2016;116:020501.

    Article  PubMed  ADS  Google Scholar 

  15. Werninghaus M, Egger DJ, Roy F, Machnes S, Wilhelm FK, Filipp S. Leakage reduction in fast superconducting qubit gates via optimal control. npj Quantum Inf. 2021;7:14.

    Article  ADS  Google Scholar 

  16. McEwen M et al.. Removing leakage-induced correlated errors in superconducting quantum error correction. Nat Commun. 2021;12:1761.

    Article  CAS  PubMed  PubMed Central  ADS  Google Scholar 

  17. Gallego R, Brunner N, Hadley C, Acin A. Device-independent tests of classical and quantum dimensions. Phys Rev Lett. 2010;105:230501.

    Article  PubMed  ADS  Google Scholar 

  18. Hendrych M, Gallego R, Micuda M, Brunner N, Acin A, Torres JP. Experimental estimation of the dimension of classical and quantum systems. Nat Phys. 2012;8:588.

    Article  CAS  Google Scholar 

  19. Ahrens J, Badziag P, Cabello A, Bourennane M. Experimental device-independent tests of classical and quantum dimensionality. Nat Phys. 2012;8:592.

    Article  CAS  Google Scholar 

  20. Ahrens J, Badziag P, Pawlowski M, Zukowski M, Bourennane M. Experimental tests of classical and quantum dimensions. Phys Rev Lett. 2014;112:140401.

    Article  PubMed  ADS  Google Scholar 

  21. Brunner N, Navascues M, Vertesi T. Dimension witnesses and quantum state discrimination. Phys Rev Lett. 2013;110:150501.

    Article  PubMed  ADS  Google Scholar 

  22. Pan AK, Mahato SS. Device-independent certification of the Hilbert-space dimension using a family of Bell expressions. Phys Rev A. 2020;102:052221.

    Article  MathSciNet  CAS  ADS  Google Scholar 

  23. Bowles J, Quintino MT, Brunner N. Certifying the dimension of classical and quantum systems in a prepare-and-measure scenario with independent devices. Phys Rev Lett. 2014;112:140407.

    Article  PubMed  ADS  Google Scholar 

  24. Chen X, Redeker K, Garthoff R, Rosenfeld W, Wrachtrup J, Gerhardt I. Certified randomness from remote state preparation dimension witness. Phys Rev A. 2021;103:042211.

    Article  CAS  ADS  Google Scholar 

  25. Batle J, Bednorz A. Optimal classical and quantum real and complex dimension witness. Phys Rev A. 2022;105:042433.

    Article  MathSciNet  CAS  ADS  Google Scholar 

  26. Sun Y-N et al.. Experimental certification of quantum dimensions and irreducible high-dimensional quantum systems with independent devices. Optica. 2020;7:1073.

    Article  ADS  Google Scholar 

  27. Chaves KR, Wu X, Rosen YJ, DuBois JL. Nonlinear signal distortion corrections through quantum sensing. Appl Phys Lett. 2021;118:014001.

    Article  CAS  ADS  Google Scholar 

  28. Bultrini D, Gordon MH, López E, Sierra G. Simple mitigation strategy for a systematic gate error in IBMQ. arXiv:2012.00831.

  29. Białecki T, Rybotycki T, Tworzydło J, Bednorz A. Testing the accuracy of qubit rotations on a public quantum computer. Front Phys 2024;12;1360080.

    Article  Google Scholar 

  30. Koch J, Yu TM, Gambetta J, Houck AA, Schuster DI, Majer J, Blais A, Devoret MH, Girvin SM, Schoelkopf RJ. Charge-insensitive qubit design derived from the Cooper pair box. Phys Rev A. 2007;76:042319.

    Article  ADS  Google Scholar 


  32. McKay DC, Wood CJ, Sheldon S, Chow JM, Gambetta JM. Efficient Z gates for quantum computing. Phys Rev A. 2017;96:022330.

    Article  ADS  Google Scholar 

  33. Sank D et al.. Measurement-induced state transitions in a superconducting qubit: beyond the rotating wave approximation. Phys Rev Lett. 2016;117:190503.

    Article  MathSciNet  PubMed  ADS  Google Scholar 

  34. European Organization For Nuclear Research and Open AIRE, Zenodo, CERN, 2022.

  35. Plaga R. On a possibility to find experimental evidence for the many-worlds interpretation of quantum mechanics. Found Phys. 1997;27:559.

    Article  MathSciNet  ADS  Google Scholar 

  36. Bednorz A. Objective realism and joint measurability in quantum many copies. Ann Phys. 2018;530:1800002.

    Article  MathSciNet  Google Scholar 

  37. Bloch F, Siegert A. Magnetic resonance for nonrotating fields. Phys Rev. 1940;57:522.

    Article  ADS  Google Scholar 

  38. Zeuch D, Hassler F, Slim JJ, DiVincenzo DP. Exact rotating wave approximation. Ann Phys. 2020;423:168327.

    Article  MathSciNet  CAS  Google Scholar 

Download references


We acknowledge use of the IBM Quantum Experience for this work. The views expressed are those of the authors and do not reflect the official policy or position of IBM or the IBM Quantum Experience team. TR acknowledges the financial support by TEAM-NET project co-financed by EU within the Smart Growth Operational Programme (contract no. POIR.04.04.00-00-17C1/18-00)


TR acknowledges the financial support by TEAM-NET project co-financed by EU within the Smart Growth Operational Programme (contract no. POIR.04.04.00-00-17C1/18-00.

Author information

Authors and Affiliations



T.B. collected the data and analyzed them. T.B. and T.R. wrote the scripts. J.B., J.T. and A.B. wrote the manuscript. All the authors reviewed the manuscript.

Corresponding author

Correspondence to Adam Bednorz.

Ethics declarations

Ethics approval and consent to participate

Not applicable.

Consent for publication

No applicable.

Competing interests

The authors declare no competing interests.

Additional information

Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.


Appendix A: Bloch sphere representations

Using vectors n to represent the state \(N=|\boldsymbol {n}\rangle \langle \boldsymbol {n}|=(1+\boldsymbol {n} \cdot \boldsymbol {\sigma})/2\), we have \(S_{\alpha }N S^{\dagger}_{\alpha}=N_{\alpha}\) and \(S_{\theta}^{\dagger }M S_{\theta}=M_{\theta}\) with

$$\begin{aligned} &\boldsymbol {n}_{\alpha}= \begin{pmatrix} \cos ^{2}\alpha &-\cos \alpha \sin \alpha &-\sin \alpha \\ -\cos \alpha \sin \alpha &\sin ^{2}\alpha &-\cos \alpha \\ \sin \alpha &\cos \alpha &0 \end{pmatrix}\boldsymbol {n}, \\ &\boldsymbol {m}_{\theta}= \begin{pmatrix} \cos ^{2}\theta &-\cos \theta \sin \theta &\sin \theta \\ -\cos \theta \sin \theta &\sin ^{2}\theta &\cos \theta \\ -\sin \theta &-\cos \theta &0 \end{pmatrix}\boldsymbol {m}, \end{aligned}$$

For \(\boldsymbol {n}=\boldsymbol {m}=(0,0,1)\) we have \(N_{\alpha \beta}=S_{\beta }S_{\alpha }N S^{\dagger}_{\alpha }S^{\dagger}_{ \beta}\) with

$$ \boldsymbol {n}'_{\alpha \beta }=\bigl(\sin (\beta -\alpha )\cos \beta , \sin (\alpha -\beta )\sin \beta ,-\cos (\beta -\alpha )\bigr) $$

while \(M_{\theta \phi}=S^{\dagger}_{\phi }S^{\dagger}_{\theta }MS_{\theta }S_{ \phi}\) with

$$ \boldsymbol {m}_{\theta \phi }=\bigl(\sin (\theta -\phi )\cos \phi , \sin (\phi - \theta )\sin \phi ,-\cos (\theta -\phi )\bigr). $$

Then the probability matrix elements read

$$ p_{kj}=\operatorname{Tr}M_{k}N_{j}=(1+ \boldsymbol {n}\cdot \boldsymbol {m})/2 $$

and additionally \(p_{5j}=1\).

In this way we can represent the choices used in our experiment. In the first choice, preparations \(\boldsymbol {n}'_{1}=(0,0,-1)\), \(\boldsymbol {n}'_{2}=(-\sqrt{3}/2,1/2,0)\), \(\boldsymbol {n}'_{3}=(-\sqrt{3}/4,-1/4,\sqrt{3}/2)\), \(\boldsymbol {n}'_{4}=(\sqrt{3}/4, -1/4,\sqrt{3}/2)\), \(\boldsymbol {n}'_{5}=(\sqrt{3}/2,1/2,0)\) and measurements \(\boldsymbol {m}'_{k}=\boldsymbol {n}'_{k-1}\). In the second choice, \(\boldsymbol {n}''_{1}=-\boldsymbol {n}''_{2}=(0,0,-1)\), \(\boldsymbol {n}''_{3}=(2\sqrt{2},0,1/3)\), \(\boldsymbol {n}''_{4,5}=(-\sqrt{2}/3,\mp \sqrt{2/3},1/3)\) and measurements \(\boldsymbol {m}''_{1}=(0,0,1)\), \(\boldsymbol {m}''_{2}=(1,0,0)\), \(\boldsymbol {m}''_{3,4}=(-1/2,\mp \sqrt{3}/2,0)\).

For the parametric test we have \(\boldsymbol {n}_{1}=(0,0,1)\), \(\boldsymbol {n}_{2}=(2\sqrt{2},0,1/3)\), \(\boldsymbol {n}_{3,4}=(-\sqrt{2}/3,\mp \sqrt{2/3}, 1/3)\) while \(\boldsymbol {n}_{5}^{i}=(-\sin(2\pi i/5),-\cos(2\pi i/5),0)\).

Appendix B: Bounds on daily calibrations

Suppose that the calibration from job to job can alter the matrix of probabilities. Assuming that each job \(n=1..N\) satisfies \(W^{(n)}=0\) for probabilities \(p^{(n)}\), we ask if W for \(p=\sum_{n} p^{(n)}/N\) can be nonzero. Suppose \(\delta p^{(n)}=p^{(n)}-p^{(0)}\) is small for some reference matrix \(p^{(0)}\) and \(|\delta p_{kj}^{(n)}|\leq \epsilon \) for all kj and some small bound ϵ. Then, in the first order of δp we have still \(W\simeq 0\) from expanding determinant in linear combinations of single columns \(p^{(n)}\) and the rest of columns kept equal \(p^{(0)}\). The nonvanishing contribution is of the second order, when replacing either of two columns by \(\delta p^{(n)}\). Their length is \(\leq 2\epsilon \). The last row contains 0 for the replaced columns and 1 for the rest. Subtracting \(1/2\) of that row from the other rows. The moduli of remaining elements are \(\leq 1/2\) for the length of the remaining 3 columns is \(\leq \sqrt{2}\). From Hadamard inequality \(|\det A|\leq \prod_{j} |A_{j}|\) with \(|A_{j}|\) being the length of the vector (column) \(A_{j}\) of the matrix A, we have the upper bound \(|W|\leq 80\sqrt{2}\epsilon ^{2}\) as we have 10 choices of 2 columns out of 5.

Appendix C: Corrections from higher states

The generic Hamiltonian, in the basis states \(|n\rangle \), \(n=0,1,2,\ldots \) (\(\hbar =1\)) reads

$$ H=\sum_{n} \omega _{n} \bigl\vert n \rangle \langle n \bigr\vert +2\cos (\omega t-\theta ) \hat{V}(t) $$

with energy \(\omega _{n}\) eigenstates levels and the external drive V at frequency ω and phase shift θ (the second term). In principle free parameters ω, θ and \(\hat{V}(t)\) can model a completely arbitrary evolution. We can estimate deviations by perturbative analysis, setting \(\omega _{0}=0\), \(\omega _{1}=\omega \) (resonance), \(\omega _{2}=2\omega +\omega '\) (anharmonicity, i.e. \(\omega '\ll \omega \), in IBM about 300 Mhz compared to drive frequency \(\sim 5\text{ GHz}\)). The state \(|2\rangle \) should give the most significant potential contribution. We can incorporate rotation and phase into the definition of states, \(|n\rangle \to |n'\rangle =e^{-in(\theta +\omega t)}|n\rangle \). Then the expected leakage depends on the gate duration, here about \(\tau =35\text{ ns}\). According to IBM documentation, it a Gaussian pulse width (variance) \(\sigma =\tau /4\) the leakage is of the order \(\exp(-\sigma ^{2}\omega ^{\prime 2})\sim e^{-30}\) being completely negligible. A slow Bloch-Siegert shift [37] does not cause leakage and stroboscopic corrections to RWA [38] can be neglected due to a very short sampling time, \(dt=0.222\text{ ns}\), while the heating gives incoherent leakage of the order 10−5 [24].

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Białecki, T., Rybotycki, T., Batle, J. et al. Precise certification of a qubit space. EPJ Quantum Technol. 11, 21 (2024).

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: