mqt.yaqs.core.methods.stochastic_process

Stochastic Process of the Tensor Jump Method.

This module implements stochastic processes for quantum systems represented as Matrix Product States (MPS). It provides functions to compute the stochastic factor, generate a probability distribution for quantum jumps based on a noise model, and perform a stochastic (quantum jump) process on the state. These tools are used to simulate noise-induced evolution in quantum many-body systems.

Module Contents

calculate_stochastic_factor(state: MPS) numpy.typing.NDArray[numpy.float64][source]

Calculate the stochastic factor for a given state.

This factor is used to determine the probability that a quantum jump will occur during the stochastic evolution. It is defined as 1 minus the norm of the state at site 0.

Parameters:

state – The Matrix Product MPS representing the current state of the system. The state should be in mixed canonical form at site 0 or B normalized.

Returns:

The calculated stochastic factor as a float.

create_probability_distribution(state: MPS, noise_model: NoiseModel | None, dt: float, sim_params: AnalogSimParams | StrongSimParams | WeakSimParams) list[float][source]

Create a probability distribution for potential quantum jumps in the system.

The function sweeps from left to right over the sites of the MPS. For each site, it shifts the orthogonality center to that site if necessary and then considers all relevant jump operators in the noise model:

  • For each 1-site jump operator acting on the current site, it constructs a candidate post-jump state, computes the corresponding quantum jump probability (proportional to the time step, jump strength, and post-jump norm at that site), and records the operator and site.

  • For each 2-site jump operator acting on the current site and its right neighbor, it merges the two tensors, applies the operator, splits the result, computes the probability, and records the operator and the site pair.

After all possible jumps are considered, the per-process probabilities are normalized and returned. The associated jump operators and target sites are not returned; they must be recovered separately from noise_model.processes using the same iteration order.

Parameters:
  • state – The Matrix Product MPS, assumed left-canonical at site 0 on entry.

  • noise_model – The noise model as a list of process dicts, each with keys “name”, “strength”, “sites”, and “matrix” (for 1-site and adjacent 2-site processes) or “factors” (for long-range 2-site processes).

  • dt – Time step for the evolution, used to scale the jump probabilities.

  • sim_params – Simulation parameters, needed for splitting merged tensors (e.g., SVD threshold, bond dimension).

Returns:

Normalized probabilities corresponding to applicable processes

stochastic_process(state: MPS, noise_model: NoiseModel | None, dt: float, sim_params: AnalogSimParams | StrongSimParams | WeakSimParams, rng: Generator | None = None) MPS[source]

Perform a stochastic process on the given state, simulating a quantum jump.

This function randomly determines whether a quantum jump occurs in the given timestep based on the system state and noise model. If a jump is triggered, the function samples the specific jump process according to the calculated probability distribution and applies the corresponding operator to the MPS. Both single-site and nearest-neighbor two-site jump processes are supported, with appropriate tensor contractions and normalization to ensure physical validity.

Parameters:
  • state – The current Matrix Product MPS, left-canonical at site 0.

  • noise_model – The noise model, or None for no jumps.

  • dt – The time step for the evolution.

  • sim_params – Simulation parameters (for splitting tensors, required for 2-site jumps).

  • rng – The random number generator to use. If None, valid global rng or new generator is used.

Returns:

The updated Matrix Product MPS after the stochastic process.

Return type:

MPS

Raises:

ValueError – If a 2-site jump is not nearest-neighbor, or if the jump operator does not act on 1 or 2 sites.