Introduction

Random unitary matrices have a number of important applications, which include estimating noise1, realising private channels2, modeling thermalisation3 and formulating quantum mechanical models of black holes4. However, the generation of uniformly distributed random unitaries is very resource intensive, since the resources required to sample randomly with respect to the Haar measure on \(U(2^n)\), the group of unitary transformations on a n-qubit system, scale exponentially with n5. A t-design is a pseudorandom ensemble of which the statistical moments match those of the uniform Haar ensemble up to some finite order t. Hence, a t-design is by definition a \((t-1)\)-design. These t-designs can rarely be distinguished from the true random ensemble, and so they are often used as a substitute. Even approximate t-designs are sufficient for many applications, for example approximate 1-designs can be used for encrypting quantum data6, approximate 2-designs can be used for estimating channel fidelities7 and approximate 3-designs can be used for solving black-box problems8.

In random circuit constructions, t-designs on n qubits are realised by applying gates selected randomly from a universal set to qubits from a n-qubit system. Approximate n-qubit t-designs can be realised efficiently, since the resources required (the number of gates and random bits) scale polynomially with n and t9,10,11,12. Very efficient random circuit constructions for exact n-qubit 2-designs, where the resources required scale almost linearly with n, have also been devised13. More recently, random circuit constructions for general exact n-qubit t-designs were proposed14. However, they are only feasible for small systems, since the number of gates required scales exponentially with n and t for large n. Random circuit constructions have two major disadvantages, namely that they require a source of classical randomness, which can be expensive if it needs to be reliable, and that they require the reconfiguring of physical quantum gates, which is bound to introduce noise.

A measurement-based approach15,16, inspired by measurement-based quantum computing17,18, avoids both these problems at the cost of additional qubits. Measurement-based quantum computing is an alternative method to perform quantum computing, where the computation is carried out by performing single-qubit measurements on an entangled resource state instead of by applying unitary operations (or gates) as with the circuit model. Reducing the entire computation to single-qubit measurements has the benefit of avoiding the swapping of qubits around a large circuit, which would introduce additional noise. Measurement-based quantum computing is advantageous in physical systems, such as photonic or superconducting systems, or cold atoms, where the qubits to be entangled are spatially close to each other so that the entangled resource state can be generated efficiently.

Measurement-based t-designs are realised by performing a deterministic sequence of single-qubit measurements on a highly entangled graph state. Turner and Markham present a measurement-based protocol for realising an exact single-qubit 3-design, which requires a 6-qubit graph state, and discuss measurement-based protocols for realising higher order approximate single-qubit t-designs, which require larger graph states15. Efficient approximate n-qubit measurement-based t-designs, where the number of qubits in the entangled resource state scale polynomially with n and t, have also been found16. It is still unknown whether exact single-qubit measurement-based t-designs exist for \(t > 3\) or whether exact multi-qubit measurement-based t-designs exist at all.

In previous experiments, multi-qubit pseudorandom ensembles, in which the expected distribution of matrix elements of unitary operators sampled from the uniform Haar ensemble is reproduced, have been realised using a nuclear magnetic resonance quantum processor19 and single-qubit 1-designs and 2-designs have been realised using photons20. In this paper, we implement the exact single-qubit measurement-based 3-design of Ref.15 and our own approximate single-qubit measurement-based 2-design on IBM superconducting quantum computers, accessible through their website21. These were implemented by performing single-qubit measurements on 6-qubit and 5-qubit graph states respectively. Since measurement errors are responsible for a significant amount of noise on IBM quantum processors, and since this noise is predominantly classical, we performed quantum readout error mitigation to improve results22. Both the exact 3-design implementation and the approximate 2-design implementation passed our test for a 1-design, but not for a 2-design or a 3-design. Further investigations, presented in the supplementary information, suggest that depolarising noise is likely what prevented these implementations from passing the test for a 2-design and a 3-design.

This paper is structured as follows. In the “Background” section, we discuss measurement-based processing using graph states and how it can be used to generate t-designs. We also give an overview of the channel tomography technique used to analyse results and the quantum readout error mitigation technique used to improve results. In the “Experiments” section, we describe the implementations of the exact 3-design and approximate 2-design and present the results obtained. Some concluding comments are given in the “Conclusion” section. Supplementary information is included, in which further discussion of the implementations and analysis of the results is presented.

Background

Measurement-based t-designs

Quantum graph states are a fundamental resource for measurement-based quantum computing17,18, and a wide range of other protocols, including quantum secret sharing23,24, quantum sensing25,26 and quantum games27,28. A n-qubit graph state is defined in relation to a connected graph with n vertices. Such a graph state is made by preparing each qubit in the state \(\left| +\right\rangle =\left( \left| 0\right\rangle +\left| 1\right\rangle \right) /\sqrt{2}\) and then applying controlled phase gates \(CZ=\text {diag}(1,1,1,-1)\), between a pair of qubits whenever their corresponding vertices are connected by an edge in the corresponding graph29. Linear cluster states are graph states corresponding to a graph in which the degree of each vertex is less than or equal to 2 (excluding rings).

Figure 1
figure 1

Summary of measurement-based processing with a n-qubit linear cluster state. Step 1 shows the initialisation of the qubits. Step 2 shows the entangled cluster state (after application of controlled phase gates between adjacent qubits) as well as the measurements performed on each qubit. Step 3 shows the state resulting from these measurements.

Unitary operations can be implemented by performing single-qubit measurements on linear cluster states29, as illustrated in Fig. 1. The first qubit is prepared in the input state, \(\rho _{\text {in}}=\left| \psi _{\text {in}}\right\rangle \left\langle \psi _{\text {in}}\right|\), to which the implemented unitary operation is to be applied. The remaining qubits are prepared in the state \(\left| +\right\rangle\) (Step 1), and qubits are then entangled via controlled phase gates applied between adjacent qubits (Step 2). Each of the qubits 1 to \(n-1\) are then measured in the basis \(\left\{ \left| ^{+}{\ }{\phi }\right\rangle ,\left| ^{-}{\ }{\phi }\right\rangle \right\}\) with \(\left| ^{\pm }{\ }{\phi }\right\rangle =(\left| 0\right\rangle \pm e^{-\text {i}\phi }\left| 1\right\rangle )/\sqrt{2}\), which we will refer to as a measurement in the \(\phi\)-direction, and which reduces to a measurement in the Pauli X-basis, \(\{\left| +\right\rangle ,\left| -\right\rangle \}\), when \(\phi =0\). This results in the \(n^{\text {th}}\) qubit being prepared in the output state, \(\rho _{\text {out}}\) (Step 3).

Each measurement in the \(\phi\)-direction is logically equivalent to applying the random unitary,

$$\begin{aligned} U_m(\phi )=HZ^mR_{z}(\phi ), \end{aligned}$$
(1)

to \(\left| \psi _{\text {in}}\right\rangle\) where \(m\in \{0,1\}\) is the random measurement outcome, H is a Hadamard, Z is the Pauli Z operation and \(R_{z}(\phi )=e^{-\text {i}Z\phi /2}\) is a z-rotation by the angle \(\phi\). Hence, a n-qubit linear cluster implements the random unitary

$$\begin{aligned} U_{\varvec{m}}(\varvec{\phi })=U_{m_{n-1}}(\phi _{n-1})\cdots U_{m_{1}}(\phi _{1}), \end{aligned}$$
(2)

where qubit i is measured in the \(\phi _i\)-direction with \(\phi _i\in [0,\pi ]\) and \(m_i\in \{0,1\}\) is the result of this measurement. Here \(\varvec{\phi }\) and \(\varvec{m}\) denote ordered lists of angles and measurement outcomes respectively. To present lists of measurement outcomes, we use little endian encoding, that is, they are presented as bit strings in which the leftmost bit is the outcome of the measurement on qubit \(n-1\) and the rightmost bit is the outcome of the measurement on qubit 1. This is in correspondence with how measurement outcomes are presented on IBM processors.

Now, given \(\varvec{\phi }\), consider the ensemble of unitaries \(\{p_{\varvec{m}},U_{\varvec{m}}(\varvec{\phi })\}\) for all \(\varvec{m}\). Note that by the linearity of the cluster, \(p_{\varvec{m}}=\frac{1}{2^{n-1}}\) for all \(\varvec{m}\), so that the distribution is uniform. An ensemble of unitaries \(\{p_i,U_i\}\) is an \(\epsilon\)-approximate t-design if there exists an \(\epsilon\) such that for all \(\rho \in {\mathcal {B}}(H^{\otimes t})\), with \(H={\mathbb {C}}^2\), we have

$$\begin{aligned} (1-\epsilon ){\mathbb {E}}^t_H(\rho )\le \sum _{i}p_iU_i^{\otimes t}\rho \left( U_i^{\otimes t}\right) ^{\dagger }\le (1+\epsilon ){\mathbb {E}}^t_H(\rho ), \end{aligned}$$
(3)

where the matrix inequality \(A\le B\) holds if \(B-A\) is positive semidefinite and

$$\begin{aligned} {\mathbb {E}}^t_H(\rho )=\int U^{\otimes t}\rho \left( U^{\otimes t}\right) ^{\dagger }\,dU \end{aligned}$$
(4)

is the expectation of the uniform Haar ensemble. For exact t-designs \(\epsilon =0\). Turner and Markham15 show that for the 6-qubit cluster state and measurement angles \(\phi _1=0\), \(\phi _2=\frac{\pi }{4}\), \(\phi _3=\arccos {\sqrt{1/3}}\), \(\phi _4=\frac{\pi }{4}\) and \(\phi _5=0\), the ensemble \(\{p_{\varvec{m}},U_{\varvec{m}}(\varvec{\phi })\}\), which consists of the 32 unitaries corresponding to the 32 possible measurement outcomes \(\varvec{m}\), is an exact 3-design.

Channel tomography

Channel tomography can be used to determine the extent to which the predicted unitary operations are realised by cluster state implementations in an experiment. We consider a method proposed for single-qubit channels by Nielsen and Chuang30,31. Given any input state \(\rho _{\text {in}}\), we write the output state as

$$\begin{aligned} \varepsilon (\rho _{\text {in}})=\sum _{mn}E_m\rho _{\text {in}} E_n^{\dagger }\chi _{mn}, \end{aligned}$$
(5)

where \(E_0=I\), \(E_1=X\), \(E_2=-\text {i}Y\), \(E_3=Z\) and \(\chi\) is a 4 by 4 matrix. Since the operators \(E_i\) are fixed, the channel is fully characterised by \(\chi\), and so channel tomography amounts to determining \(\chi\). The entries of \(\chi\) depend on the action of the channel on the probe input states, \(\left| 0\right\rangle\), \(\left| 1\right\rangle\), \(\left| +\right\rangle =\left( \left| 0\right\rangle +\left| 1\right\rangle \right) /\sqrt{2}\) and \(\left| +_{y}\right\rangle =\left( \left| 0\right\rangle +\text {i}\left| 1\right\rangle \right) /\sqrt{2}\), which is determined by performing state tomography on the output state for these input states. In particular,

$$\begin{aligned} \chi =\frac{1}{4} \begin{pmatrix} I&{}X\\ X&{}-I\\ \end{pmatrix} \begin{pmatrix} \rho _{1}'&{}\rho _{2}'\\ \rho _{3}'&{}\rho _{4}'\\ \end{pmatrix} \begin{pmatrix} I&{}X\\ X&{}-I\\ \end{pmatrix}, \end{aligned}$$
(6)

where the submatrices of the middle matrix are defined by

$$\begin{aligned} \rho _{1}'&= \varepsilon \left( \left| 0\right\rangle \left\langle 0\right| \right) \\ \rho _{4}'&= \varepsilon \left( \left| 1\right\rangle \left\langle 1\right| \right) \\ \rho _{2}'&= \varepsilon \left( \left| +\right\rangle \left\langle +\right| \right) +\text {i}\varepsilon \left( \left| +_{y}\right\rangle \left\langle +_{y}\right| \right) -\frac{1+\text {i}}{2}\left( \rho _{1}'+\rho _{4}'\right) \\ \rho _{3}'&= \varepsilon \left( \left| +\right\rangle \left\langle +\right| \right) -\text {i}\varepsilon \left( \left| +_{y}\right\rangle \left\langle +_{y}\right| \right) -\frac{1-\text {i}}{2}\left( \rho _{1}'+\rho _{4}'\right) , \end{aligned}$$

where \(\varepsilon \left( \left| 0\right\rangle \left\langle 0\right| \right)\), \(\varepsilon \left( \left| 1\right\rangle \left\langle 1\right| \right)\), \(\varepsilon \left( \left| +\right\rangle \left\langle +\right| \right)\) and \(\varepsilon \left( \left| +_{y}\right\rangle \left\langle +_{y}\right| \right)\) denote the output states determined for the respective probe input states. Once constructed, we can use \(\chi\) to quantify the reliability with which an expected channel is realised in an experiment, by calculating the channel fidelity,

$$\begin{aligned} F(\chi _e, \chi _c)= \text {Tr}\left( \sqrt{\sqrt{\chi _e}\chi _c\sqrt{\chi _e}}\right) , \end{aligned}$$
(7)

where \(\chi _e\) is the \(\chi\) matrix which corresponds to the expected operation of the channel, and \(\chi _c\) is the \(\chi\) matrix of the actual channel obtained from channel tomography. The channel fidelity ranges from 0 to 1, where 0 indicates that the channel deviates maximally from its expected operation and 1 indicates a perfect channel.

Quantum readout error mitigation

As a result of measurement errors, actual quantum states and channels are often more similar to expected states and channels than tomography results would suggest. Since measurement errors on IBM quantum processors are mostly classical22, quantum readout error mitigation can be used to obtain tomography results which more accurately reflect the prepared states and channels, as has been successfully done in a number of recent studies which also involved measurements on highly entangled states on IBM quantum processors32,33,34. To mitigate readout errors in a n-qubit experiment (the main experiment), we first use quantum detector tomography35 to construct a \(2^n\) by \(2^n\) calibration matrix \(\Lambda\). The entries of \(\Lambda\) are the conditional probabilities of measuring each of the \(2^n\) possible combinations of computational basis states, given that a specific combination of computational basis states was prepared, for all \(2^n\) possible combinations of computational basis states. In particular, each column of \(\Lambda\) contains the \(2^n\) conditional probabilities associated with one of the \(2^n\) prepared combinations of computational basis states. These conditional probabilities are determined in a series of separate experiments, in which each of the \(2^n\) possible combinations of computational basis states is prepared on the n qubits to be used in the main experiment and sufficient computational basis measurements are done to infer the associated conditional probabilities. Once constructed, \(\Lambda\) can be used to correct classical measurement errors in the main experiment by multiplying \(\Lambda ^{-1}\) by \(\varvec{p}_{\text {exp}}\), the column vector containing the relative frequencies obtained in the main experiment. As a result of other noise, such as gate errors, the resulting vector, \(\Lambda ^{-1}\varvec{p}_{\text {exp}}\), may be non-physical (relative frequencies may be negative or may not sum to one). We therefore use qiskit’s built-in method36, which solves a constrained optimisation problem (least squares method), to find the closest physical relative frequency vector to \(\Lambda ^{-1}\varvec{p}_{\text {exp}}\).

Figure 2
figure 2

General quantum circuit for implementation of the exact measurement-based 3-design of Ref.15 on the ibmq_toronto quantum processor. Here ‘in’ represents the set of gates applied to construct the input state and ‘out’ represents the set of gates applied and measurements done to perform tomography on the sixth qubit. The angles for the z-rotation gates are \(\phi _2=\phi _4=\frac{\pi }{4}\) and \(\phi _3=\arccos {\sqrt{1/3}}\).

Figure 3
figure 3

Example of channel tomography results for the random unitary that agreed least with the ideal case generated for measurement outcome \(\varvec{m}=00000\) with the exact 3-design on the ibmq_toronto quantum processor. The diagram at the top shows the entangled 6-qubit cluster state with the measurements performed on each qubit. The \(\chi\) matrix obtained without quantum readout error mitigation is shown on the left, the \(\chi\) matrix obtained with quantum readout error mitigation is shown in the middle and the ideal \(\chi\) matrix is shown on the right. The real part of each matrix is shown above and the imaginary part of each matrix is shown below.

Figure 4
figure 4

Example of channel tomography results for the random unitary that agreed most with the ideal case generated for measurement outcome \(\varvec{m}=11001\) with the exact 3-design on the ibmq_toronto quantum processor. The diagram at the top shows the entangled 6-qubit cluster state with the measurements performed on each qubit. The \(\chi\) matrix obtained without quantum readout error mitigation is shown on the left, the \(\chi\) matrix obtained with quantum readout error mitigation is shown in the middle and the ideal \(\chi\) matrix is shown on the right. The real part of each matrix is shown above and the imaginary part of each matrix is shown below.

Experiments

Implementation

The exact measurement-based 3-design proposed by Turner and Markham15 and described in the “Measurement-based t-designs” section was implemented on 6 physical qubits of the ibmq_toronto quantum processor. Supplementary information I provides more details on the ibmq_toronto quantum processor and how the logical qubits 1 to 6 were mapped onto the physical qubits of this processor. The 4 channel tomography probe states were considered as input states. For each input state, we prepared the 6-qubit linear cluster state and performed the appropriate single-qubit measurements. Quantum state tomography was then done on the sixth qubit to construct the output state obtained for each of the 32 different measurement outcomes. A general quantum circuit for the implementation is shown in Fig. 2.

Qubits are initialised in the state \(\left| 0\right\rangle\) by default on IBM processors, and so the state \(\left| 1\right\rangle\) was prepared by applying the Pauli X operation, the state \(\left| +\right\rangle\) was prepared by applying a Hadamard and the state \(\left| +_y\right\rangle\) was prepared by applying a Hadamard, followed by a S-gate. Since IBM processors do not support controlled phase gates at the hardware level, we converted the Hadamards and controlled phase gates, needed to prepare the 6-qubit linear cluster state, into Hadamards (H) and controlled not (CX) gates using

$$\begin{aligned} CZ=(I\otimes H)CX(I\otimes H) \end{aligned}$$
(8)

and then eliminated redundant Hadamards using the fact that \(H^2=I\). Doing so ensured that redundant Hadamards, which would have increased noise in the results due to gate errors, were removed from the circuit. Preparing the 6-qubit linear cluster state with controlled phase gates would have resulted in redundant Hadamards being introduced by the transpiler. Since IBM processors can only perform measurements in the computational basis, \(\{\left| 0\right\rangle , \left| 1\right\rangle \}\), measurements in the \(\phi\)-direction were realised by applying \(R_{z}(\phi )\), followed by a Hadamard, and measuring in the computational basis. Quantum state tomography was done using qiskit’s built-in method37, which uses maximum-likelihood estimation to ensure that the density matrices constructed from the data are physical (i.e. that they have a trace of 1 and are Hermitian). The state tomography results were used to do channel tomography for each of the 32 different measurement outcomes to determine the extent to which the 32 corresponding unitary operations performed on the input states in the implementation matched the expected unitary operations. The results are presented in the “Channel tomography results” section.

Each of the 12 circuits needed for channel tomography (3 circuits for state tomography to construct the output state for each of the 4 input states) was run 5 times with 8000 shots on the ibmq_toronto quantum processor. The counts obtained in the 5 different runs of the same circuit were then combined to obtain an effective run with 40000 shots for each of the 12 circuits. This was done to decrease statistical noise in the tomography results. The procedure was repeated 10 times to obtain 10 sets of channel tomography results (\(\chi\) matrices) for each of the 32 different unitary operations. Associated results, such as channel fidelities, quoted in the sections which follow, are an average of these 10 repetitions and the errors quoted are the standard deviations.

To obtain the conditional probabilities needed to construct the calibration matrix, required to mitigate readout errors in the tomography results, we prepared each of the 64 possible combinations of computational basis states on the same 6 qubits of the ibmq_toronto quantum processor as was used for the 3-design implementation and measured these qubits in the computational basis. Each of the 64 circuits was run with 8000 shots and no combination of counts was done. Readout errors in the raw tomography data (i.e. the counts obtained by running the various circuits) were then mitigated as described in the “Quantum readout error mitigation” section. Results obtained using both the raw and the processed (error mitigated) data are presented in the sections which follow.

Channel tomography results

Channel tomography results obtained for the two random unitaries, generated with the exact 3-design on the ibmq_toronto quantum processor, which showed the least and most agreement with theoretical predictions, are shown in Figs. 3 and 4 respectively. Channel fidelities for each of the 32 different random unitaries generated with the exact 3-design implementation are given in Table 1 and the distribution of these channel fidelities is displayed in Fig. 5. The average channel fidelity is (0.8220 ± 0.0325) without quantum readout error mitigation and (0.8754 ± 0.0361) with quantum readout error mitigation. Quantum readout error mitigation improved all the channel fidelities, which confirms that classical measurement errors were responsible for a significant amount of noise in the exact measurement-based 3-design implementation, and would have resulted in channel fidelities which greatly underestimate the reliability with which the expected unitary operations are realised in the implementation, if left uncorrected.

Table 1 Channel fidelities for the 32 random unitaries, corresponding to the 32 different measurement outcomes, generated with the exact 3-design on the ibmq_toronto quantum processor.
Figure 5
figure 5

Distribution of channel fidelities for the 32 random unitaries generated with the exact 3-design on the ibmq_toronto quantum processor. (a) Raw shows the distribution without quantum readout error mitigation. (b) Processed shows the distribution with quantum readout error mitigation.

Relative frequencies

Due to errors that occur when gates are applied and measurements are made, the relative frequencies with which the 32 random unitaries are generated, with the exact 3-design on the ibmq_toronto quantum processor, do not exactly match the expected uniform probabilities of \(\frac{1}{32}=0.03125\). To determine the relative frequency with which each unitary is generated, a separate investigation was conducted in which the 6-qubit linear cluster state was prepared on the same 6 physical qubits of the ibmq_toronto quantum processor as was used for the 3-design implementation (see supplementary information I) and the first 5 qubits were measured in the same way as in the 3-design implementation. The relative frequency of each set of measurement outcomes is the relative frequency with which the random unitary corresponding to that set of measurement outcomes is generated. The required circuit was run 5 times with 8000 shots each and counts were once again combined to obtain an effective run with 40000 shots. This was repeated 10 times, so that relative frequencies quoted are an average of 10 repetitions and the errors quoted are the standard deviations. The relative frequencies with which each of the 32 different random unitaries are generated with the exact 3-design on the ibmq_toronto quantum processor are presented in Table 2 and the distribution of these relative frequencies is displayed in Fig. 6. The average relative frequency is (0.03125 ± 0.00355) without quantum readout error mitigation and (0.03125 ± 0.00375) with quantum readout error mitigation. We note that even though the relative frequencies with which the different unitaries are generated deviate from the expected uniform probabilities, the average relative frequency is equal to the expected probability.

Table 2 Relative frequencies with which the 32 random unitaries, corresponding to the 32 different measurement outcomes, are generated with the exact 3-design on the ibmq_toronto quantum processor.

Testing for a t-design

The definition of an approximate t-design as given by inequality (3) in the “Measurement-based t-designs” section leads naturally to a simple method for testing whether the ensemble of 32 unitaries generated with the 6-qubit cluster state on the ibmq_toronto quantum processor is at least an approximate t-design. Although this definition applies to any density matrix acting on the tensor product space \(({\mathbb {C}}^2)^{\otimes t}\), we restrict ourselves to density matrices which are t copies of an arbitrary single-qubit density matrix for the purposes of testing. This is sufficient for quantifying the extent to which the unitaries are able to randomise single-qubit states, which is our primary interest here, and can at least provide a lower bound on the \(\epsilon\) for which the ensemble of unitaries is an \(\epsilon\)-approximate t-design with more general states included. The restriction to copies of single-qubit density matrices has two major advantages, namely that the test is computationally feasible for all t, since the number of parameters that need to be varied when creating samples of density matrices would otherwise grow exponentially with t, and that the results can be interpreted geometrically, since single-qubit states can be represented by points in the Bloch sphere. For the purposes of testing, we therefore consider the adapted inequality

$$\begin{aligned} (1-\epsilon ){\mathbb {E}}^t_H(\rho ^{\otimes t})\le \sum _{i}p_i{\rho _i'}^{\otimes t}\le (1+\epsilon ){\mathbb {E}}^t_H(\rho ^{\otimes t}), \end{aligned}$$
(9)

where \(p_i\) are the experimentally determined relative frequencies and

$$\begin{aligned} \rho _i'=\sum _{mn}E_m\rho E_n^{\dagger }\chi ^{(i)}_{mn}, \end{aligned}$$
(10)

where \(\chi ^{(i)}\) are the \(\chi\) matrices determined by doing channel tomography for the different unitaries. The test amounts to generating a sample of single-qubit density matrices and finding, for each density matrix in the sample, the smallest possible \(\epsilon\) such that inequality (9) is satisfied. The largest \(\epsilon\) found is the one which ensures that inequality (9) is satisfied for all density matrices in the sample and is therefore the test result.

Figure 6
figure 6

Distribution of relative frequencies with which the 32 random unitaries are generated with the exact 3-design on the ibmq_toronto quantum processor. (a) Raw shows the distribution without quantum readout error mitigation. (b) Processed shows the distribution with quantum readout error mitigation.

We set the passing criterion for the test to \(\epsilon \le 0.5\), by which we simply mean that, for the purposes of this paper, we consider the quality of an approximate t-design acceptable if \(\epsilon \le 0.5\). In practice, some applications of approximate t-designs may require a smaller value of \(\epsilon\). We also note that, given an ensemble of unitaries which is an exact t-design or an approximate t-design with \(\epsilon _t \le 0.5\), it is generally not possible to say whether this ensemble of unitaries is also an approximate \((t+1)\)-design with \(\epsilon _{t+1} \le 0.5\), as this depends on the ensemble. Therefore an ensemble of unitaries which passes our test for an approximate t-design, for a given t, may or may not pass our test for an approximate \((t+1)\)-design.

To generate a sample of single-qubit density matrices, we first generate a representative sample of points in the Bloch sphere using spherical coordinates. We generate 10 evenly spaced values of r in the range [0, 1], 10 evenly spaced values of \(\phi\) in the range \([0, 2\pi )\) and 10 evenly spaced values of \(\theta\) in the range \([0, \pi ]\). Using the standard conversions from spherical to cartesian coordinates, we compute \(r_x\), \(r_y\) and \(r_z\) for all combinations of the sampled values of r, \(\phi\) and \(\theta\), thereby obtaining 1000 points in the Bloch sphere. Using

$$\begin{aligned} \rho =\frac{1}{2} \begin{pmatrix} 1+r_z&{}r_x-\text {i}r_y\\ r_x+\text {i}r_y&{}1-r_z\\ \end{pmatrix} \end{aligned}$$
(11)

we obtain a sample of 1000 density matrices.

Table 3 Summary of test results for the ensemble of unitaries generated using the ibmq_toronto quantum processor.
Table 4 Fraction of states for which the ensemble of unitaries generated using the ibmq_toronto quantum processor passed the different tests.

Using our sample of 1000 density matrices, we applied the test for the 1-design, the 2-design and the 3-design to the ensemble of unitaries generated using the ibmq_toronto quantum processor. The expected unitary operations of the exact 3-design described in the “Measurement-based t-designs” section were used to compute \({\mathbb {E}}^t_H(\rho ^{\otimes t})\) for \(t=1,2,3\). The test for the 1-design passed. The tests for the 2-design and the 3-design did not pass, as \(\epsilon\) diverged for states close to the surface of the Bloch sphere. Nevertheless, inequality (9) could be satisfied for states close to the centre of the Bloch sphere. This was investigated further by re-applying the tests for the 2-design and the 3-design, this time truncating the values of r considered when generating density matrices so that \(\epsilon\) did not exceed 0.5. The test results are summarised in Table 3. Applying quantum readout error mitigation improved the test results. The changes in the values of \(\epsilon\) resulting from replacing the experimentally determined relative frequencies with uniform probabilities, are mostly within the error margins. This suggests that non-uniformity did not significantly impair the quality of the ensemble.

The divergence in \(\epsilon\) observed for states close to the surface of the Bloch sphere is likely a result of pure states becoming inaccessible due to depolarising noise and was investigated further by applying the test for the 1-design, the 2-design and the 3-design to an exact 3-design combined with a depolarising channel. The full study is presented in supplementary information II and shows that depolarising noise is a very good noise model for the data. Our measurement-based implementation of the identity operation (see supplementary information III) shows that depolarising noise is the predominant type of noise in measurement-based processes on IBM processors, providing further confirmation that depolarising noise is indeed what prevented the tests for the 2-design and the 3-design from passing. Urbanek et al. recently proposed a method for mitigating depolarising noise in quantum computations where the final outcome is an expectation value38. Since the final outcome of our implementation is a quantum process or channel, and not an expectation value, this method is unfortunately not applicable here. However, their method may have potential for improving results in applications of measurement-based t-designs where the final outcome is an expectation value.

To determine the fraction of the Bloch sphere for which a test passes, we consider 8000 evenly spaced points in a cube which encloses the Bloch sphere. Points in the Bloch sphere then correspond to valid states. For each valid state, we determine whether inequality (9) can be satisfied with \(\epsilon \le 0.5\). The fraction of the Bloch sphere for which a test passes is given by the number of states for which the inequality can be satisfied divided by the number of states considered. The fraction of states for which the ensemble of unitaries generated using the ibmq_toronto quantum processor passed the test for the 1-design, the 2-design and the 3-design are given in Table 4. The fraction of states for which the test for the 2-design and the 3-design pass is substantially improved by quantum readout error mitigation. This confirms that classical measurement noise is responsible for many states failing to satisfy inequality (9) and, if left uncorrected, would result in test results which greatly underestimate the extent to which the various designs are realised by our implementation on the ibmq_toronto quantum processor.

Approximate 2-design

Turner and Markham15 show that there is no set of measurement angles such that the ensemble of unitaries generated by performing single-qubit measurements on the 5-qubit linear cluster state is an exact 2-design. However, applying our test for an approximate 2-design to the expected ensemble of unitaries generated for the 5-qubit cluster state and the measurement angles \(\phi _1=0\), \(\phi _2=\frac{\pi }{4}\), \(\phi _3=\frac{\pi }{4}\) and \(\phi _4=0\) yields \(\epsilon =0.5\). Hence this ensemble is an approximate 2-design, with our passing criterion, although it must be noted that the ensemble does not resemble an exact 2-design closely and that the passing criterion is satisfied only for the subset of density matrices in \({\mathcal {B}}({\mathbb {C}}^2\otimes {\mathbb {C}}^2)\) which are tensor products of pairs of single-qubit states. We implemented this approximate measurement-based 2-design on 5 physical qubits of the ibmq_sydney quantum processor. Supplementary information IV provides more detail on the ibmq_sydney quantum processor, the qubits that were used and why the ibmq_sydney quantum processor was used for this experiment instead of the ibmq_toronto quantum processor. Generation of channel tomography results for the 16 different unitary operations corresponding to the 16 different measurement outcomes, determining of relative frequencies, combining of counts to reduce statistical noise and construction of calibration matrices for quantum readout error mitigation were all done in the same way as for the exact 3-design implementation on the ibmq_toronto quantum processor.

Table 5 Channel fidelities for the 16 random unitaries, corresponding to the 16 different measurement outcomes, generated with the approximate 2-design on the ibmq_sydney quantum processor.
Table 6 Relative frequencies with which the 16 random unitaries, corresponding to the 16 different measurement outcomes, are generated with the approximate 2-design on the ibmq_sydney quantum processor.

Channel fidelities for each of the 16 different random unitaries are given in Table 5. The average channel fidelity is (0.8596 ± 0.0356) without quantum readout error mitigation and (0.9312 ± 0.0323) with quantum readout error mitigation. The average channel fidelity is larger than the average channel fidelity for the exact 3-design implementation, reflecting reduced noise in the implementation with the smaller cluster state with fewer qubits. The relative frequencies with which each of the 16 different random unitaries are generated are given in Table 6. The average relative frequency is (0.06250 ± 0.01127) without quantum readout error mitigation and (0.06250 ± 0.00871) with quantum readout error mitigation. The average relative frequency is once again equal to the expected uniform probability of \(\frac{1}{16}=0.0625\).

Table 7 Summary of test results for the ensemble of unitaries generated using the ibmq_sydney quantum processor.
Table 8 Fraction of states for which the ensemble of unitaries generated using the ibmq_sydney quantum processor passed the different tests.

We applied our test for the 1-design and the 2-design to the ensemble of unitaries generated using the ibmq_sydney quantum processor. The test for the 1-design passed, but the test for the 2-design did not. Test results are summarised in Table 7 and the fraction of states for which each test passed is conveyed in Table 8. The values of \(\epsilon\) obtained for the ensemble of unitaries generated using the ibmq_sydney quantum processor, for a given truncation radius, are not much larger than the expected values for the approximate 2-design. This suggests that inherent deviations from an exact 2-design, present in the approximate 2-design considered, had a more significant effect on the quality of the ensemble of unitaires than noise on the ibmq_sydney quantum processor.

The fraction of states for which the test for the 2-design passed with quantum readout error mitigation is almost double that without quantum readout error mitigation. This confirms that the noise in this implementation was also predominantly classical measurement errors. The effect of readout errors was more pronounced in this implementation, likely because gate errors of the qubits used are much smaller (see supplementary information IV). We note that the fraction of states for which the ensemble of unitaries generated with the 5-qubit cluster state on the ibmq_sydney quantum processor passed the test for the 2-design, especially with quantum readout error mitigation, is larger than that of the ensemble of unitaries generated with the 6-qubit cluster state on the ibmq_toronto quantum processor. Hence, even though the approximate 2-design considered does not closely resemble an exact 2-design, the ensemble of unitaries generated with this approximate 2-design implementation more closely resembles a 2-design than the ensemble of unitaries generated with the exact 3-design implementation. This is as a result of significantly reduced noise in the implementation with the smaller 5-qubit cluster state, compared to the implementation with the larger 6-qubit cluster state.

Conclusion

The exact measurement-based 3-design of Ref.15 was implemented by performing single-qubit measurements on a 6-qubit linear cluster state, prepared on the ibmq_toronto quantum processor. To infer the ensemble of unitaries realised in the implementation, we performed channel tomography for all possible measurement outcomes. This ensemble of unitaries passed our test for a 1-design, but not for a 2-design or a 3-design. Further studies, presented in supplementary information II and III, strongly suggest that depolarising noise prevented the tests for the 2-design and the 3-design from passing. Therefore, for measurement-based t-designs to be effectively realised for \(t>1\) on superconducting systems, such as IBM quantum processors, a significant amount of work will need to be done to reduce or mitigate depolarising noise in these devices.

The noteworthy improvement in results obtained by applying quantum readout error mitigation confirms that classical measurement errors are indeed responsible for a substantial amount of noise on IBM quantum processors in this instance. It also shows the importance of mitigating these errors, as not doing so would lead to results that give an inaccurate account of the actual implementations realised on these processors. The ensemble of unitaries realised by our approximate measurement-based 2-design implementation, in which single-qubit measurements were performed on a 5-qubit linear cluster state prepared on the ibmq_sydney quantum processor, showed improved results for the 2-design test as a result of reduced noise for the smaller 5-qubit cluster state. This clearly demonstrates the advantage of keeping entangled resource states used in measurement-based processes small. It also shows that in experimental realisations (where noise is present), the quality of a noisy approximate t-design may be better than the quality of a noisy exact t-design, if the implementation of the approximate t-design is significantly less sensitive to noise than the implementation of the exact t-design.