# Quantum tomography

Quantum tomography or quantum state tomography is the process by which a quantum state is reconstructed using measurements on an ensemble of identical quantum states. The source of these states may be any device or system which prepares quantum states either consistently into quantum pure states or otherwise into general mixed states. To be able to uniquely identify the state, the measurements must be tomographically complete. That is, the measured operators must form an operator basis on the Hilbert space of the system, providing all the information about the state. Such a set of observations is sometimes called a quorum. The term tomography was first used in the quantum physics literature in a 1993 paper introducing experimental optical homodyne tomography.
In quantum process tomography on the other hand, known quantum states are used to probe a quantum process to find out how the process can be described. Similarly, quantum measurement tomography works to find out what measurement is being performed. Whereas, randomized benchmarking scalably obtains a figure of merit of the overlap between the error prone physical quantum process and its ideal counterpart.
The general principle behind quantum state tomography is that by repeatedly performing many different measurements on quantum systems described by identical density matrices, frequency counts can be used to infer probabilities, and these probabilities are combined with Born's rule to determine a density matrix which fits the best with the observations.
This can be easily understood by making a classical analogy. Consider a harmonic oscillator (e.g. a pendulum). The position and momentum of the oscillator at any given point can be measured and therefore the motion can be completely described by the phase space. This is shown in figure 1. By performing this measurement for a large number of identical oscillators we get a probability distribution in the phase space (figure 2). This distribution can be normalized (the oscillator at a given time has to be somewhere) and the distribution must be non-negative. So we have retrieved a function $W(x,p)$ which gives a description of the chance of finding the particle at a given point with a given momentum.
For quantum mechanical particles the same can be done. The only difference is that the Heisenberg's uncertainty principle mustn't be violated, meaning that we cannot measure the particle's momentum and position at the same time. The particle's momentum and its position are called quadratures (see Optical phase space for more information) in quantum related states. By measuring one of the quadratures of a large number of identical quantum states will give us a probability density corresponding to that particular quadrature. This is called the marginal distribution, $\mathrm {pr} (X)$ or $\mathrm {pr} (P)$ (see figure 3). In the following text we will see that this probability density is needed to characterize the particle's quantum state, which is the whole point of quantum tomography.

## What quantum state tomography is used for

Quantum tomography is applied on a source of systems, to determine the quantum state of the output of that source. Unlike a measurement on a single system, which determines the system's current state after the measurement (in general, the act of making a measurement alters the quantum state), quantum tomography works to determine the state(s) prior to the measurements.
Quantum tomography can be used for characterizing optical signals, including measuring the signal gain and loss of optical devices, as well as in quantum computing and quantum information theory to reliably determine the actual states of the qubits. One can imagine a situation in which a person Bob prepares many identical objects (particles or fields) in the same quantum states and then gives them to Alice to measure. Not confident with Bob's description of the state, Alice may wish to do quantum tomography to classify the state herself.

## Methods of quantum state tomography
### Linear inversion

Using Born's rule, one can derive the simplest form of quantum tomography. Generally, being in a pure state is not known in advance, and a state may be mixed. In this case, many different types of measurements will have to be performed, many times each. To fully reconstruct the density matrix for a mixed state in a finite-dimensional Hilbert space, the following technique may be used.
Born's rule states $\mathrm {P} (E_{i}|\rho )=\mathrm {Trace} (E_{i}\rho )$, where $E_{i}$ is a particular measurement outcome projector and $\rho$ is the density matrix of the system. Given a histogram of observations for each measurement, one has an approximation $p_{i}$ to $\mathrm {P} (E_{i}|\rho )$ for each $E_{i}$.
Given linear operators $S$ and $T$, define the inner product
    $S\cdot T=\mathrm {Tr} [S^{\dagger }T]={\vec {S}}^{\dagger }{\vec {T}}$
where ${\vec {T}}$ is representation of the $T$ operator as a column vector and ${\vec {S}}^{\dagger }$ a row vector such that ${\vec {S}}^{\dagger }{\vec {T}}$ is the inner product in $\mathbb {C} ^{d}$ of the two.
Define the matrix $A$ as
    $A={\begin{pmatrix}{\vec {E}}_{1}^{\dagger }\\{\vec {E}}_{2}^{\dagger }\\{\vec {E}}_{3}^{\dagger }\\\vdots \end{pmatrix}}$.
Here E$_i$ is some fixed list of individual measurements (with binary outcomes), and A does all the measurements at once.
Then applying this to ${\vec {\rho }}$ yields the probabilities:
    $A{\vec {\rho }}={\begin{pmatrix}{\vec {E}}_{1}^{\dagger }{\vec {\rho }}\\{\vec {E}}_{2}^{\dagger }{\vec {\rho }}\\{\vec {E}}_{3}^{\dagger }{\vec {\rho }}\\\vdots \end{pmatrix}}={\begin{pmatrix}E_{1}\cdot \rho \\E_{2}\cdot \rho \\E_{3}\cdot \rho \\\vdots \end{pmatrix}}={\begin{pmatrix}\mathrm {P} (E_{1}|\rho )\\\mathrm {P} (E_{2}|\rho )\\\mathrm {P} (E_{3}|\rho )\\\vdots \end{pmatrix}}\approx {\begin{pmatrix}p_{1}\\p_{2}\\p_{3}\\\vdots \end{pmatrix}}={\vec {p}}$.
Linear inversion corresponds to inverting this system using the observed relative frequencies ${\vec {p}}$ to derive ${\vec {\rho }}$ (which is isomorphic to $\displaystyle \rho$).
This system is not going to be square in general, as for each measurement being made there will generally be multiple measurement outcome projectors $E_{i}$. For example, in a 2-D Hilbert space with 3 measurements $\sigma _{x},\sigma _{y},\sigma _{z}$, each measurement has 2 outcomes, each of which has a projector E$_i$, for 6 projectors, whereas the real dimension of the space of density matrices is (2⋅2$^2$)/2=4, leaving $A$ to be 6 x 4. To solve the system, multiply on the left by $A^{T}$:
    $A^{T}A{\vec {\rho }}=A^{T}{\vec {p}}$.
Now solving for ${\vec {\rho }}$ yields the pseudoinverse:
    ${\vec {\rho }}=(A^{T}A)^{-1}A^{T}{\vec {p}}$.
This works in general only if the measurement list E$_i$ is tomographically complete. Otherwise, the matrix $A^{T}A$ will not be invertible.

#### Continuous variables and quantum homodyne tomography

In infinite dimensional Hilbert spaces, e.g. in measurements of continuous variables such as position, the methodology is somewhat more complex. One notable example is in the tomography of light, known as optical homodyne tomography. Using balanced homodyne measurements, one can derive the Wigner function and a density matrix for the state of the light.
One approach involves measurements along different rotated directions in phase space. For each direction $\theta$, one can find a probability distribution $w(q,\theta )$ for the probability density of measurements in the $\theta$ direction of phase space yielding the value $q$. Using an inverse Radon transformation (the filtered back projection) on $w(q,\theta )$ leads to the Wigner function, $\mathrm {W} (x,p)$, which can be converted by an inverse Fourier transform into the density matrix for the state in any basis. A similar technique is often used in medical tomography.

#### Example: single-qubit state tomography

The density matrix of a single qubit can be expressed in terms of its Bloch vector ${\vec {r}}$ and the Pauli vector ${\vec {\sigma }}$:
    $\rho ={\frac {1}{2}}\left(I+{\vec {r}}\cdot {\vec {\sigma }}\right)={\frac {1}{2}}{\begin{pmatrix}1+r_{z}&r_{x}-\mathrm {i} r_{y}\\r_{x}+\mathrm {i} r_{y}&1-r_{z}\end{pmatrix}}$.
The single-qubit state tomography can be performed by means of single-qubit Pauli measurements:
* First, create a list of three quantum circuits, with the first one measuring the qubit in the computational basis (Z-basis), the second one performing a Hadamard gate before measurement (which makes the measurement in X-basis), and the third one performing the appropriate phase shift gate (that is ${\sqrt {Z}}^{\dagger }=|0\rangle \langle 0|+\exp(-\mathrm {i} \pi /2)|1\rangle \langle 1|$) followed by a Hadamard gate before measurement (which makes the measurement in Y-basis);
* Then, run these circuits (typically thousands of times), and the counts in the measurement results of the first circuit produces ${\bar {z}}=(n_{z,+}-n_{z,-})/(n_{z,+}+n_{z,-})$, the second circuit ${\bar {x}}$, and the third circuit ${\bar {y}}$;
* Finally, if ${\bar {x}}^{2}+{\bar {y}}^{2}+{\bar {z}}^{2}\leq 1$, then a measured Bloch vector is produced as ${\vec {r}}_{m}=({\bar {x}},{\bar {y}},{\bar {z}})$, and the measured density matrix is $\rho _{m}={\frac {1}{2}}\left(I+{\vec {r}}_{m}\cdot {\vec {\sigma }}\right)$; If ${\bar {x}}^{2}+{\bar {y}}^{2}+{\bar {z}}^{2}>1$, it'll be necessary to renormalize the measured Bloch vector as ${\vec {r}}_{m}=({\bar {x}},{\bar {y}},{\bar {z}})/{\sqrt {{\bar {x}}^{2}+{\bar {y}}^{2}+{\bar {z}}^{2}}}$ before using it to calculate the measured density matrix.
This algorithm is the foundation for qubit tomography and is used in some quantum programming routines, like that of Qiskit.

#### Example: homodyne tomography.

Electromagnetic field amplitudes (quadratures) can be measured with high efficiency using photodetectors together with temporal mode selectivity. Balanced homodyne tomography is a reliable technique of reconstructing quantum states in the optical domain. This technique combines the advantages of the high efficiencies of photodiodes in measuring the intensity or photon number of light, together with measuring the quantum features of light by a clever set-up called the homodyne tomography detector.
Quantum homodyne tomography is understood by the following example. A laser is directed onto a 50-50% beamsplitter, splitting the laser beam into two beams. One is used as a local oscillator (LO) and the other is used to generate photons with a particular quantum state. The generation of quantum states can be realized, e.g. by directing the laser beam through a frequency doubling crystal and then onto a parametric down-conversion crystal. This crystal generates two photons in a certain quantum state. One of the photons is used as a trigger signal used to trigger (start) the readout event of the homodyne tomography detector. The other photon is directed into the homodyne tomography detector, in order to reconstruct its quantum state. Since the trigger and signal photons are entangled (this is explained by the spontaneous parametric down-conversion article), it is important to realize that the optical mode of the signal state is created nonlocal only when the trigger photon impinges the photodetector (of the trigger event readout module) and is actually measured. More simply said, it is only when the trigger photon is measured, that the signal photon can be measured by the homodyne detector.
Now consider the homodyne tomography detector as depicted in figure 4 (figure missing). The signal photon (this is the quantum state we want to reconstruct) interferes with the local oscillator, when they are directed onto a 50-50% beamsplitter. Since the two beams originate from the same so called master laser, they have the same fixed phase relation. The local oscillator must be intense, compared to the signal so it provides a precise phase reference. The local oscillator is so intense, that we can treat it classically (a = α) and neglect the quantum fluctuations. The signal field is spatially and temporally controlled by the local oscillator, which has a controlled shape. Where the local oscillator is zero, the signal is rejected. Therefore, we have temporal-spatial mode selectivity of the signal. The beamsplitter redirects the two beams to two photodetectors. The photodetectors generate an electric current proportional to the photon number. The two detector currents are subtracted and the resulting current is proportional to the electric field operator in the signal mode, depended on relative optical phase of signal and local oscillator.
Since the electric field amplitude of the local oscillator is much higher than that of the signal the intensity or fluctuations in the signal field can be seen. The homodyne tomography system functions as an amplifier. The system can be seen as an interferometer with such a high intensity reference beam (the local oscillator) that unbalancing the interference by a single photon in the signal is measurable. This amplification is well above the photodetectors noise floor.
The measurement is reproduced a large number of times. Then the phase difference between the signal and local oscillator is changed in order to ‘scan’ a different angle in the phase space. This can be seen from figure 4. The measurement is repeated again a large number of times and a marginal distribution is retrieved from the current difference. The marginal distribution can be transformed into the density matrix and/or the Wigner function. Since the density matrix and the Wigner function give information about the quantum state of the photon, we have reconstructed the quantum state of the photon.
The advantage of this balanced detection method is that this arrangement is insensitive to fluctuations in the intensity of the laser.
The quantum computations for retrieving the quadrature component from the current difference are performed as follows.
The photon number operator for the beams striking the photodetectors after the beamsplitter is given by:
    ${\hat {n}}_{i}={\hat {a}}_{i}^{\dagger }{\hat {a}}_{i}$,
where i is 1 and 2, for respectively beam one and two. The mode operators of the field emerging the beamsplitters are given by:
    ${\hat {a}}_{1}=2^{-1/2}({\hat {a}}-\alpha _{LO})$
    ${\hat {a}}_{2}=2^{-1/2}({\hat {a}}+\alpha _{LO})$
The ${\hat {a}}$ denotes the annihilation operator of the signal and alpha the complex amplitude of the local oscillator. The number of photon difference is eventually proportional to the quadrature and given by:
    ${\hat {n}}_{21}={\hat {n}}_{2}-{\hat {n}}_{1}=\alpha _{LO}^{*}{\hat {a}}+\alpha _{LO}{\hat {a}}^{\dagger }$,
Rewriting this with the relation:
    ${\hat {q}}=2^{-1/2}({\hat {a}}^{\dagger }+{\hat {a}})$
Results in the following relation:
    ${\hat {n}}_{21}=2^{1/2}|{\hat {\alpha }}_{LO}|{\hat {q}}_{\theta }$,
where we see clear relation between the photon number difference and the quadrature component ${\hat {q}}_{\theta }$. By keeping track of the sum current, one can recover information about the local oscillator's intensity, since this is usually an unknown quantity, but an important quantity for calculating the quadrature component ${\hat {q}}_{\theta }$.

#### Problems with linear inversion

One of the primary problems with using linear inversion to solve for the density matrix is that in general the computed solution will not be a valid density matrix. For example, it could give negative probabilities or probabilities greater than 1 to certain measurement outcomes. This is particularly an issue when fewer measurements are made.
Another issue is that in infinite dimensional Hilbert spaces, an infinite number of measurement outcomes would be required. Making assumptions about the structure and using a finite measurement basis leads to artifacts in the phase space density.

### Maximum likelihood estimation

Maximum likelihood estimation (also known as MLE or MaxLik) is a popular technique for dealing with the problems of linear inversion. By restricting the domain of density matrices to the proper space, and searching for the density matrix which maximizes the likelihood of giving the experimental results, it guarantees the state to be theoretically valid while giving a close fit to the data. The likelihood of a state is the probability that would be assigned to the observed results had the system been in that state.
Suppose the measurements $\{|y_{j}\rangle \langle y_{j}|\}$ have been observed with frequencies $f_{j}$. Then the likelihood associated with a state ${\hat {\rho }}$ is
    $L({\hat {\rho }})=\prod _{j}\langle y_{j}|{\hat {\rho }}|y_{j}\rangle ^{f_{j}}$
where $\langle y_{j}|{\hat {\rho }}|y_{j}\rangle$ is the probability of outcome $y_{j}$ for the state ${\hat {\rho }}$.
Finding the maximum of this function is non-trivial and generally involves iterative methods. The methods are an active topic of research.

#### Problems with maximum likelihood estimation

Maximum likelihood estimation suffers from some less obvious problems than linear inversion. One problem is that it makes predictions about probabilities that cannot be justified by the data. This is seen most easily by looking at the problem of zero eigenvalues. The computed solution using MLE often contains eigenvalues which are 0, i.e. it is rank deficient. In these cases, the solution then lies on the boundary of the n-dimensional Bloch sphere. This can be seen as related to linear inversion giving states which lie outside the valid space (the Bloch sphere). MLE in these cases picks a nearby point that is valid, and the nearest points are generally on the boundary.
This is not physically a problem, the real state might have zero eigenvalues. However, since no value may be less than 0, an estimate of an eigenvalue being 0 implies that the estimator is certain the value is 0, otherwise they would have estimated some $\epsilon$ greater than 0 with a small degree of uncertainty as the best estimate. This is where the problem arises, in that it is not logical to conclude with absolute certainty after a finite number of measurements that any eigenvalue (that is, the probability of a particular outcome) is 0. For example, if a coin is flipped 5 times and each time heads was observed, it does not mean there is 0 probability of getting tails, despite that being the most likely description of the coin.

### Bayesian methods

Bayesian mean estimation (BME) is a relatively new approach which addresses the problems of maximum likelihood estimation. It focuses on finding optimal solutions which are also honest in that they include error bars in the estimate. The general idea is to start with a likelihood function and a function describing the experimenter's prior knowledge (which might be a constant function), then integrate over all density matrices using the product of the likelihood function and prior knowledge function as a weight.
Given a reasonable prior knowledge function, BME will yield a state strictly within the n-dimensional Bloch sphere. In the case of a coin flipped N times to get N heads described above, with a constant prior knowledge function, BME would assign $\scriptstyle {\frac {1}{N+2}}$ as the probability for tails.
BME provides a high degree of accuracy in that it minimizes the operational divergences of the estimate from the actual state.

### Methods for incomplete data

The number of measurements needed for a full quantum state tomography for a multi-particle system scales exponentially with the number of particles, which makes such a procedure impossible even for modest system sizes. Hence, several methods have been developed to realize quantum tomography with fewer measurements.
The concept of matrix completion and compressed sensing have been applied to reconstruct density matrices from an incomplete set of measurements (that is, a set of measurements which is not a quorum). In general, this is impossible, but under assumptions (for example, if the density matrix is a pure state, or a combination of just a few pure states) then the density matrix has fewer degrees of freedom, and it may be possible to reconstruct the state from the incomplete measurements.
Permutationally Invariant Quantum Tomography is a procedure that has been developed mostly for states that are close to being permutationally symmetric, which is typical in nowadays experiments. For two-state particles, the number of measurements needed scales only quadratically with the number of particles.
Besides the modest measurement effort, the processing of the measured data can also be done efficiently: It is possible to carry out the fitting of a physical density matrix on the measured data even for large systems.
Permutationally Invariant Quantum Tomography has been combined with compressed sensing in a six-qubit photonic experiment.

## Quantum measurement tomography

One can imagine a situation in which an apparatus performs some measurement on quantum systems, and determining what particular measurement is desired. The strategy is to send in systems of various known states, and use these states to estimate the outcomes of the unknown measurement. Also known as "quantum estimation", tomography techniques are increasingly important including those for quantum measurement tomography and the very similar quantum state tomography. Since a measurement can always be characterized by a set of POVM's, the goal is to reconstruct the characterizing POVM's $\Pi _{l}$. The simplest approach is linear inversion. As in quantum state observation, use
    $\displaystyle \mathrm {Tr} [\Pi _{l}\rho _{m}]=\mathrm {P} (l|\rho _{m})$.
Exploiting linearity as above, this can be inverted to solve for the $\Pi _{l}$.
Not surprisingly, this suffers from the same pitfalls as in quantum state tomography: namely, non-physical results, in particular negative probabilities. Here the $\Pi _{l}$ will not be valid POVM's, as they will not be positive. Bayesian methods as well as Maximum likelihood estimation of the density matrix can be used to restrict the operators to valid physical results.

## Quantum process tomography

Quantum process tomography (QPT) deals with identifying an unknown quantum dynamical process. The first approach, introduced in 1996 and sometimes known as standard quantum process tomography (SQPT) involves preparing an ensemble of quantum states and sending them through the process, then using quantum state tomography to identify the resultant states. Other techniques include ancilla-assisted process tomography (AAPT) and entanglement-assisted process tomography (EAPT) which require an extra copy of the system.
Each of the techniques listed above are known as indirect methods for characterization of quantum dynamics, since they require the use of quantum state tomography to reconstruct the process. In contrast, there are direct methods such as direct characterization of quantum dynamics (DCQD) which provide a full characterization of quantum systems without any state tomography.
The number of experimental configurations (state preparations and measurements) required for full quantum process tomography grows exponentially with the number of constituent particles of a system. Consequently, in general, QPT is an impossible task for large-scale quantum systems. However, under weak decoherence assumption, a quantum dynamical map can find a sparse representation. The method of compressed quantum process tomography (CQPT) uses the compressed sensing technique and applies the sparsity assumption to reconstruct a quantum dynamical map from an incomplete set of measurements or test state preparations.

### Quantum dynamical maps

A quantum process, also known as a quantum dynamical map, ${\mathcal {E}}(\rho )$, can be described by a completely positive map
    ${\mathcal {E}}(\rho )=\sum _{i}A_{i}\rho A_{i}^{\dagger }$,
where $\rho \in {\mathcal {B(H)}}$, the bounded operators on Hilbert space; with operation elements $\displaystyle A_{i}$ satisfying $\textstyle \sum _{i}A_{i}^{\dagger }A_{i}\leq I$ so that $\mathrm {Tr} [{\mathcal {E}}(\rho )]\leq 1$.
Let $\displaystyle \{E_{i}\}$ be an orthogonal basis for ${\mathcal {B(H)}}$. Write the $\displaystyle A_{i}$ operators in this basis
    $\displaystyle A_{i}=\sum _{m}a_{im}E_{m}$.
This leads to
    ${\mathcal {E}}(\rho )=\sum _{m,n}\chi _{mn}E_{m}\rho E_{n}^{\dagger }$,
where $\chi _{mn}=\sum _{i}a_{im}a_{in}^{*}$.
The goal is then to solve for $\displaystyle \chi$, which is a positive superoperator and completely characterizes ${\mathcal {E}}$ with respect to the $\displaystyle \{E_{i}\}$ basis.

### Standard quantum process tomography

SQPT approaches this using $d^{2}$ linearly independent inputs $\rho _{j}$, where $d$ is the dimension of the Hilbert space ${\mathcal {H}}$. For each of these input states $\rho _{j}$, sending it through the process gives an output state ${\mathcal {E}}(\rho )$ which can be written as a linear combination of the $\rho _{k}$, i.e. $\textstyle {\mathcal {E}}(\rho _{j})=\sum _{k}c_{jk}\rho _{k}$. By sending each $\rho _{j}$ through many times, quantum state tomography can be used to determine the coefficients $c_{jk}$ experimentally.
Write
    $E_{m}\rho _{j}E_{n}^{\dagger }=\sum _{k}B_{m,n,j,k}\rho _{k}$,
where $B$ is a matrix of coefficients. Then
    $\sum _{k}c_{jk}\rho _{k}={\mathcal {E}}(\rho _{j})=\sum _{m,n}\chi _{m,n}E_{m}\rho _{j}E_{n}^{\dagger }=\sum _{m,n}\sum _{k}\chi _{m,n}B_{m,n,j,k}\rho _{k}$.
Since $\rho _{k}$ form a linearly independent basis,
    $\displaystyle c_{jk}=\sum _{m,n}\chi _{m,n}B_{m,n,j,k}$.
Inverting $B$ gives $\chi$:
    $\chi _{m,n}=\sum _{j,k}B_{m,n,j,k}^{-1}c_{jk}$.