Process Tensor Tomography

Note

This page runs several trajectory-heavy tomography steps and may take one to two minutes during a documentation build (execution_timeout: 600).

Process Tensor Tomography (PTT) characterises multi-time correlations in an open quantum system by reconstructing a process tensor, a generalisation of the quantum channel concept to several time steps. The cells below use noise-free unitary evolution for a quick demonstration; attach a NoiseModel in production runs to characterise open-system channels. Given a Hamiltonian and a set of state preparations and measurement projections, YAQS runs the simulation in parallel, applies these interventions at each time point, and assembles the result into a ProcessTensor object that can be used to:

  • compute the Quantum Mutual Information of the process (how much information the environment retains),

  • predict the final state for arbitrary held-out input and intervention sequences without re-running the simulator.

1. Define the system

 1from mqt.yaqs import AnalogSimParams, Hamiltonian
 2
 3# Two-site Ising chain: H = -J Σ ZZ - g Σ X
 4num_sites = 2
 5operator = Hamiltonian.ising(num_sites, J=1.0, g=0.5)
 6
 7sim_params = AnalogSimParams(
 8    dt=0.1,
 9    max_bond_dim=16,
10    order=1,
11)

2. Single-step tomography

Run tomography for a single evolution segment of length t = 0.1. 100 trajectories per preparation sequence are sufficient for a quick demonstration.

 1from mqt.yaqs.characterization.tomography.tomography import run
 2
 3pt_single = run(
 4    operator,
 5    sim_params,
 6    timesteps=[0.1],
 7    num_trajectories=100,
 8)
 9
10print(f"Process tensor shape: {pt_single.tensor.shape}")  # (4, 6)

The tensor has shape (4, N) where 4 encodes the vectorised output density matrix and N = 6 is the number of Pauli frame states used as input probes.

3. Quantum Mutual Information

The Quantum Mutual Information quantifies how much information is preserved by the channel between the input state ensemble and the final output:

1qmi = pt_single.quantum_mutual_information(base=2)
2print(f"Quantum Mutual Information (single step): {qmi:.4f} bits")
Quantum Mutual Information (single step): 0.9077 bits

For unitary channels, this value approaches the entropy of the average input state (~0.907 bits for the standard 4-state Pauli frame). A value near 0 indicates a fully depolarising channel that destroys all quantum and classical information.

4. Multi-step tomography

For two successive evolution segments, we can reconstruct the temporal correlation map across an intermediate time step:

1pt_two = run(
2    operator,
3    sim_params,
4    timesteps=[0.1, 0.1],       # two segments of dt each
5    num_trajectories=100,
6)
7
8print(f"Process tensor shape: {pt_two.tensor.shape}")  # (4, 16, 16)

5. Predicting held-out states

Once the process tensor is available, you can predict the output for any initial density matrix and any arbitrary local interventions applied between time steps without additional simulation runs. The prediction uses a dual-frame polynomial sum — an efficient linear-algebraic operation:

 1import numpy as np
 2
 3# Choose an arbitrary mixed input state
 4rng = np.random.default_rng(0)
 5
 6def _random_rho(rng: np.random.Generator) -> np.ndarray:
 7    """Sample a random 2×2 density matrix."""
 8    psi = rng.standard_normal(2) + 1j * rng.standard_normal(2)
 9    psi /= np.linalg.norm(psi)
10    rho = np.outer(psi, psi.conj())
11    # Mix with identity to make it a proper mixed state
12    return 0.7 * rho + 0.3 * 0.5 * np.eye(2, dtype=complex)
13
14rho_0 = _random_rho(rng)
15
16# The first intervention is the preparation of the initial state at t=0
17def initial_prep(rho: np.ndarray) -> np.ndarray:
18    return rho_0
19
20# Define an arbitrary CPTP intervention map applied at the intermediate timestep
21def x_gate_intervention(rho: np.ndarray) -> np.ndarray:
22    x_mat = np.array([[0, 1], [1, 0]], dtype=complex)
23    return x_mat @ rho @ x_mat.conj().T
24
25# Predict final state — no simulator call needed!
26rho_pred = pt_two.predict_final_state(
27    interventions=[initial_prep, x_gate_intervention]
28)
29print("Predicted output density matrix:")
30print(np.round(rho_pred, 4))
Predicted output density matrix:
[[0.2281-0.j     0.0725+0.2081j]
 [0.0725-0.2081j 0.7719+0.j    ]]

The result rho_pred is a (2, 2) density matrix giving the expected output state at the final time step given the initial state and the local unitary intervention applied to the system between the two segments.