# jump_trajectory_evolution_pwc

`Graph.jump_trajectory_evolution_pwc(initial_state_vector, hamiltonian, lindblad_terms, max_time_step, trajectory_count, sample_times=None, seed=None, *, name=None)`

Calculate the state evolution of an open system described by the GKS–Lindblad master equation using a jump-based trajectory method.

This function calculates multiple pure-state trajectories starting from an initial pure state and returns the average density matrix over all trajectories.

Note that regardless of their original formats, both hamiltonian and lindblad_terms are internally converted to a dense representation, so there is no computational advantage in using a sparse representation with this method.

### Parameters

**initial_state_vector**(*np.ndarray**or**Tensor*) – The initial state vector $|\psi\rangle$ as a`(D,)`

array or Tensor, or batch of initial state vectors as a`(B, D)`

array or Tensor.**hamiltonian**(*Pwc**or**SparsePwc*) – A piecewise-constant function representing the system Hamiltonian, $H_{\rm s}(t)$, for the entire evolution duration, with Hilbert space dimension D.**lindblad_terms**(*list**[**tuple**[**float**,**np.ndarray**or**Tensor**or**scipy.sparse.spmatrix**]**]*) – A list of pairs, $(\gamma_j, L_j)$, representing the positive decay rate $\gamma_j$ and the Lindblad operator $L_j$ for each coupling channel $j$. You must provide at least one Lindblad term.**max_time_step**(*float*) – The maximum time step to use in the integration. Each PWC segment will be subdivided into steps that are, at most, this value. A smaller value for the maximum time step will more accurately sample the jump processes, but also lead to a slower computation.**trajectory_count**(*int*) – The number of quantum trajectories to run.**sample_times**(*np.ndarray**or**None**,**optional*) – A 1D array like object of length $T$ specifying the times $\{t_i\}$ at which this function calculates system states. Must be ordered and contain at least one element. If omitted only the evolved density matrix at the final time of the system Hamiltonian is returned. Note that increasing the density of sample times does not affect the computation precision of this function, but might slow down the calculation.**seed**(*int**or**None**,**optional*) – A seed for the random number generator. Defaults to None, in which case a random value for the seed is used.**name**(*str**,**optional*) – The name of the node.

### Returns

The time-evolved density matrix, with shape `(D, D)`

or `(T, D, D)`

,
depending on whether you provided sample times.
If you provide a batch of initial states, the shape is `(B, T, D, D)`

or `(B, D, D)`

.

### Return type

### SEE ALSO

`Graph.density_matrix_evolution_pwc`

: State evolution of an open quantum system.

`Graph.steady_state`

: Compute the steady state of open quantum system.

## Notes

Under the Markovian approximation, the dynamics of an open quantum system can be described
by the GKS–Lindblad master equation ^{1} ^{2}

where ${\mathcal D}$ is a superoperator describing the decoherent process in the system evolution and defined as

${\mathcal D}[X]\rho := X \rho X^\dagger - \frac{1}{2}\left( X^\dagger X \rho + \rho X^\dagger X \right)$for any system operator $X$.

This function solves the GKS–Lindblad master equation with an initial pure state $\rho_{\rm s}(0) = |\psi\rangle\langle\psi|$, by calculating multiple quantum trajectories performing quantum jumps, $|\tilde\psi_k(t)\rangle$, and averaging the result:

$\rho(t) = \frac{1}{M} \sum_{k=1}^M |\tilde\psi_k(t) \rangle\langle \tilde\psi_k(t) | .$## References

[1] V. Gorini, A. Kossakowski, and E. C. G. Sudarshan, J. Math. Phys. 17, 821 (1976).