# Quantum Gate Set Tomography

Quantum gate set tomography is a robust and powerful method for self-consistently characterizing an entire set of quantum logic gates on a black-box quantum device. This method arose from the observation that Quantum Process tomography is inaccurate in the presence of state preparation and measurement errors. This procedure estimates the complete process matrices of Pauli transfer matrices for the gate set based on experimental data.

## Assumptions

• The selected measurement basis should be tomographically complete.
• For the calculation of the likelihood function we assume that the noise on the coincidence measurements has a Gaussian probability distribution. We also assume that each of our measurements is taken for the same amount of time.
• The SPAM gates are composed of gates in the gate set and therefore the minimal gate set must include sufficient gates to create a complete set of states and measurements.
• In the gate set, the first gate is always selected to be the null gate.
• We assume no knowledge about the gate set.

## Outline

Quantum state tomography and Quantum process tomography assume that the initial states and measurements are known. But if the state preparation and measurement (SPAM) gates are faulty then the estimates provided using these techniques are faulty as well. Quantum gate set tomography solves this problem by including the SPAM gates self-consistently in the gate set to be estimated.

The goal of this method is to completely characterize a gate set, which includes an unknown set of gates and an initial state and 2-outcome POVM. For self-consistency, the SPAM gates are treated on the same footing as the original gates. The SPAM gates are composed of gates in the gate set and therefore the minimal gate set must include sufficient gates to create a complete set of states and measurements. When these gates are applied to our unknown fixed state and measurement, a complete set of initial states and final state is produced. The experimental requirement for GST is the ability to measure the expectation values for the gate set.

Two techniques are shown here, which are Linear inversion (LGST) and maximum likelihood estimation (MLE). The linear inversion protocol is fairly easy to implement numerically and is useful for providing quick diagnostics without resorting to more computationally intensive estimation via constrained optimization. The LGST estimate is not generally physical, the information obtained is somewhat qualitative, and hence MLE is preferred. LGST is a useful starting point for MLE. Since the starting point must be physical, while LGST is not, we should use the closest physical gate set to the LGST estimate.

This method consists of the following steps:

• Initialize the qubit to a particular state. In most systems, the natural choice for this state is the ground state of the qubit.
• For a particular choice of SPAM gates and a gate from the Gate set, the corresponding gate sequence is applied to the qubit. As the SPAM gates are composed of the gates from the gate set, the sequence only contains the gates from the gate set.
• The 2-outcome POVM is measured. This POVM is required to be a positive semi-definite Hermitian operator. The natural choice for this POVM in most systems is ${\displaystyle |0\rangle \langle 0|}$. (Sometimes ${\displaystyle |1\rangle \langle 1|}$ is used)
• The above 1-3 steps are repeated a large number of times (10000 to 100000). For every repetition, the measurement is success (i.e., the measured state is ${\displaystyle |0\rangle \langle 0|}$) is recorded as 1 and the measurement failure (i.e., the measured state is not ${\displaystyle |0\rangle \langle 0|}$) is recorded as 0.
• The measurement results in the step above are averaged over the number of times the measurement was repeated and the expectation value is calculated.
• The above 1-5 steps are repeated for every SPAM gates and every gate in the gate set. This gives us the probability of all the possible gate set and SPAM gate combinations.
• Repeat steps 1-5 to measure the expectation values of only the SPAM gates. This is used to form a matrix known as the Gram matrix. If the first gate of the gate set is a null gate, then this step is not needed as this data already exists due to the step performed above.
• To find the gate set estimate from the measurement data, there are two techniques:
• Linear inversion method (LGST):
• We should check that the gram matrix is invertible and after certain calculations with the inverted gram matrix, the gate set can be estimated. The LGST estimate is not generally physical, the information obtained is somewhat qualitative.
• The gate set estimated in this way is in a different gauge from the actual gate set. To compensate, we transform to a more useful gauge. Since we do not know the actual gate set, only the target one, the most useful gauge is the one that brings the estimated gate set as close as possible based, on some distance metric, to the target. The gauge transformation is found by solving an optimization problem and the resulting gauge matrix is then applied to the gate set found in the step above.
• Maximum likelihood estimation (MLE): LGST is a useful starting point for MLE. The goal in this method is to find the true probabilities corresponding to the measurements, subject to physical constraints. In this method, the best estimate is found by fitting to experimental data a theoretical model of the probability of obtaining that data.
• This method begins by parameterizing the estimate, state and measurement matrices in terms of a vector of parameters. A number of constraints reduce the total number of independent parameters.
• Putting everything together, the probability estimates are written in terms of the parameter vector and Depending on the parameterization choice each of the gates and states is either a linear or quadratic function of its parameters. Each of the gates and states is either a linear or quadratic function of its parameters. The estimator is, therefore, a homogeneous function of order 5 (linear parameterization) or 10 (quadratic parameterization).
• MLE proceeds by finding the set of parameters that minimizes an objective function. The objective, or likelihood function, is the probability distribution we assume produced the data.
• There are two kinds of parameterizations for gates that are commonly used: The Pauli Process Matrix representation and The Pauli transfer Matrix Representation.

## Hardware Requirements

• Measurement device.

## Notation

• ${\displaystyle d}$: Dimension of Hilbert space
• ${\displaystyle G}$: Gate set. ${\displaystyle G=\{G_{0},G_{1},..G_{K}\}}$. Generally ${\displaystyle G_{0}={}}$ null gate.
• ${\displaystyle F}$: SPAM gate set. ${\displaystyle F=\{F_{0},...,F_{N}\}}$. ${\displaystyle F}$ is composed of gates in ${\displaystyle G}$.
• ${\displaystyle |\rho \rangle }$: Initial quantum state. Generally the natural choice for ${\displaystyle \rho }$ is ${\displaystyle |0\rangle \langle 0|}$
• ${\displaystyle E}$: 2-outcome POVM.
• ${\displaystyle n}$: Number of times the measurement is repeated.
• ${\displaystyle n_{r}}$: Result of ${\displaystyle r^{th}}$ measurement.
• ${\displaystyle m_{ijk}}$: measurement of the expectation value ${\displaystyle p_{ijk}}$
• ${\displaystyle p_{ijk}}$: Expectation value. ${\displaystyle p_{ijk}=\langle E|F_{i}G_{k}F_{j}|\rho \rangle }$
• ${\displaystyle g_{ij}}$: Gram matrix
• ${\displaystyle B_{ij}}$: Gauge matrix
• ${\displaystyle {\vec {t}}}$: Parameter vector
• ${\displaystyle {\hat {G}}({\vec {t}})}$: Parameterised estimate matrix. This has ${\displaystyle d^{4}}$ parameters.
• ${\displaystyle |{\hat {p}}({\vec {t}})\rangle }$: Parameterised state matrix. This has ${\displaystyle d^{2}}$ parameters.
• ${\displaystyle \langle {\hat {E}}({\vec {t}})|}$: Parameterised measurement matrix. This has ${\displaystyle d^{2}}$ parameters.
• ${\displaystyle l({\hat {G}})}$: likelihood function.
• ${\displaystyle \sigma _{ijk}}$: The sampling variance in the measurement ${\displaystyle m}$. ${\displaystyle \sigma ^{2}=p(1-p)/n}$
• ${\displaystyle \chi _{G}}$: Process matrix for gate ${\displaystyle G}$ is defined in terms of the gate’s action on an arbitrary state ${\displaystyle \rho }$ to produce a new state ${\displaystyle G(p)}$. ${\displaystyle G(p)=\sum _{i,j=1}^{d^{2}}(\chi _{G})_{ij}P_{i}\rho P_{j}}$. ${\displaystyle \chi }$ is a Hermitian positive semidefinite matrix, written in terms of ${\displaystyle \chi =T^{\dagger }T}$
• ${\displaystyle T}$: a lower-diagonal complex matrix, ${\displaystyle {\hat {T}}(t)={\begin{bmatrix}t_{1}&0&...&0\\t_{2^{n}+1}+it_{2^{n}+2}&t_{2}&...&0\\...&...&...&0\\t_{4^{n}-1}+it_{4^{n}}&t_{4^{n}-3}+it_{4^{n}-2}&t_{4^{n}-5}+it_{4^{n}-4}&t_{2^{n}}\end{bmatrix}}}$
• ${\displaystyle P_{i}}$: Pauli operator ${\displaystyle i}$ acting on the state
• ${\displaystyle R_{G}}$: Pauli tranfer matrix for a gate G is defined in terms of the gate’s action on Pauli matrices. ${\displaystyle (R_{G})_{ij}=Tr\{P_{i}G(P_{j})\}.|G(\rho )\rangle =R_{G}|\rho \rangle }$

## Properties

• Figure of merit: Gate set
• Multiple copies of the quantum state are required in this method.
• ${\displaystyle E_{j}}$ should be tomographically complete.
• In contrast to QPT, it is not possible in GST to characterize one gate at a time. Instead, GST estimates every gate in the gate set simultaneously.
• SPAM gates are included in the gate set for self-consistency.
• The limitation of linear-inversion GST (or LGST) is that it does not constrain the estimates to be physical. However, LGST provides a convenient method for diagnosing gate errors and also gives a good starting point for the constrained maximum likelihood estimation.
• In the gate set, the first gate is generally selected to be the null gate.
• The simulated errors are of three different types, representing coherent and incoherent gate errors as well as intrinsic SPAM errors.

## Procedure Description

Output: Gate set, ${\displaystyle G}$

• Initialize system to ${\displaystyle |\rho \rangle }$
• For ${\displaystyle i=1,2,...,N}$:
• For ${\displaystyle j=1,2,...,N}$:
• For ${\displaystyle k=1,2,...,K}$:
• For ${\displaystyle r=1,2,...,n}$
• Apply gate sequence ${\displaystyle F_{i}\circ G_{k}\circ F_{j}}$
• Measure with POVM ${\displaystyle E}$, get ${\displaystyle n_{r}=1}$ or ${\displaystyle n_{r}=0}$
• ${\displaystyle m_{ijk}=\sum _{r=1}^{n}{\frac {n_{r}}{n}}}$
• ${\displaystyle ({\tilde {G}}_{k})_{ij}=p_{ijk}=m_{ijk}=\langle E|F_{i}G_{k}F_{j}|\rho \rangle }$
• if ${\displaystyle k==0}$ (null gate), ${\displaystyle g_{ij}=\langle E|F_{i}F_{j}|\rho \rangle }$
• ${\displaystyle |{\tilde {\rho }}\rangle _{i}=\langle E|F_{i}|\rho \rangle }$
• ${\displaystyle B_{ij}=\langle i|F_{j}|\rho \rangle }$
• For Linear inversion:
• Check that the Gram matrix ${\displaystyle g_{ij}}$ is non singular, so that it may be inverted
• For the gate set, the estimate is ${\displaystyle |{\hat {\rho }}\rangle =g^{-1}|{\tilde {\rho }}\rangle ,\langle {\hat {E}}|=\langle {\tilde {E}}|,{\hat {G_{k}}}=g^{-1}{\tilde {G}}_{k}}$
• Apply gauge optimization, by minimizing:
${\displaystyle {\hat {B}}^{*}=argmin_{\hat {B}}\sum _{k=1}^{K+1}Tr\{({\hat {G}}_{k}-{\hat {B}}^{-1}T_{k}{\hat {B}})^{T}({\hat {G}}_{k}-{\hat {B}}^{-1}T_{k}{\hat {B}})\}}$
• Final gate set is: ${\displaystyle {\hat {G}}_{k}^{*}={\hat {B}}^{*}{\hat {G}}_{k}({\hat {B}}^{*})^{-1},|{\hat {p}}^{*}\rangle ={\hat {B}}^{*}|{\hat {p}}\rangle ,\langle {\hat {E}}^{*}|=\langle {\hat {E}}|({\hat {B}}^{*})^{-1}}$
• For Maximum Likelihood Estimation:
• ${\displaystyle {\hat {p}}_{ijk}=\langle {\hat {E}}({\vec {t}})|{\hat {F}}_{i}({\vec {t}}){\hat {G}}_{k}({\vec {t}}){\hat {F}}_{j}({\vec {t}})|{\hat {\rho }}({\vec {t}})\rangle }$
• Find the set of parameters ${\displaystyle {\vec {t}}}$ where ${\displaystyle l({\hat {G}})}$ is minimized.
Minimize: ${\displaystyle l({\hat {G}})=\sum _{ijk}(m_{ijk}-{\hat {p}}_{ijk}({\vec {t}}))^{2}/\sigma _{ijk}^{2}}$
• Minimize the above function with two different commonly used types of parameterisation of gates:
• Pauli Process Matrix Optimization problem:
Minimize: ${\displaystyle l({\hat {G}})=\sum _{ijk}(m_{ijk}-\sum _{mnrstu}(\chi _{F_{i}})_{tu}(\chi _{G_{k}})_{rs}(\chi _{F_{j}})_{mn}Tr\{EP_{t}P_{r}P_{m}\rho P_{n}P_{s}P_{u}\})^{2}/\sigma _{ijk}^{2}}$
Subject to: ${\displaystyle \sum _{mn}(\chi _{G})_{mn}Tr\{P_{m}P_{r}P_{n}\}-\delta _{0r}=0,(r=1,..,d^{2}),\forall G\in Gateset}$
${\displaystyle Tr\{\rho \}=1}$
${\displaystyle 1-E\geqslant 0}$
• Pauli Transfer Matrix Representation
Minimize: ${\displaystyle l({\hat {G}})=\sum _{ijk}(m_{ijk}-\langle {\hat {E}}({\vec {t}})|{\hat {R}}_{F_{i}}({\vec {t}}){\hat {R}}_{G_{k}}({\vec {t}}){\hat {R}}_{F_{j}}({\vec {t}})|{\hat {\rho }}({\vec {t}})\rangle )^{2}/\sigma _{ijk}^{2}}$
Subject to: ${\displaystyle \rho _{G}={\frac {1}{d^{2}}}\sum _{i,j=1}^{d^{2}}(R_{G})_{ij}P_{G}^{T}\otimes P_{i}\geqslant 0,\forall G\in Gateset}$
${\displaystyle (R_{G})_{0i}=\delta _{0i},\forall G\in Gateset}$
${\displaystyle (R_{G})_{ij}\in [-1,1],\forall G,i,j}$
${\displaystyle Tr\{\rho \}=1}$
${\displaystyle 1-E\geqslant 0}$

## Related Papers

• Daniel Greenbaum (2015) arXiv:1509.02921v1: Introduction to Quantum Gate Set Tomography