Quantum state tomography#

Description#

Quantum state tomography is a technique that consists of the determination of an unknown quantum state by measuring it with respect to all elements of an appropriate tomographically or informationally complete operator basis. In practise, any such basis is usually a set of observables, with some of the most prominent examples being the Pauli matrices (including the identity matrix) for qubits and the Gell-Mann matrices (also including the identity matrix) for qutrits.

Presented here is a simple tomographical reconstruction of an arbitrary qubit density matrix. Once the unknown state (or rather, an ensemble of identically prepared quantum states) has been measured exhaustively in a suitable basis, the resulting statistics (i.e., expectation values) enable the determination of the Bloch vector via (139), which is equivalent to precise identification of the associated (and previously unknown) state.

Implementation#

Listing 25 /text/examples/algorithms/tomography_strong.py#
from qhronology.quantum.states import MatrixState
from qhronology.quantum.gates import Pauli

import sympy as sp

import copy

# Construct symbolic density matrix
tau = sp.MatrixSymbol("τ", 2, 2).as_mutable()
unknown_state = MatrixState(spec=tau, label="τ")

# Construct observables
I = Pauli(index=0, targets=[0], num_systems=1)
X = Pauli(index=1, targets=[0], num_systems=1)
Y = Pauli(index=2, targets=[0], num_systems=1)
Z = Pauli(index=3, targets=[0], num_systems=1)

# Perform measurements on the unknown state over all observables
unknown_state.measure(operators=[I, X, Y, Z], observable=True)
reconstructed_state = copy.deepcopy(unknown_state)
unknown_state.reset()
reconstructed_state.coefficient(sp.Rational(1, 2))  # Manually normalize
reconstructed_state.simplify()

# Results
unknown_state.print()
reconstructed_state.print()

Output#

States#

>>> unknown_state.print()
τ = τ[0, 0]|0⟩⟨0| + τ[0, 1]|0⟩⟨1| + τ[1, 0]|1⟩⟨0| + τ[1, 1]|1⟩⟨1|
>>> reconstructed_state.print()
τ = τ[0, 0]|0⟩⟨0| + τ[0, 1]|0⟩⟨1| + τ[1, 0]|1⟩⟨0| + τ[1, 1]|1⟩⟨1|