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.


  • initial_state_vector (np.ndarray or Tensor) – The initial state vector ψ|\psi\rangle(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, Hs(t)H_{\rm s}(t)
  • lindblad_terms (list [ tuple [ float , np.ndarray or Tensor or scipy.sparse.spmatrix ] ]) – A list of pairs, (γj,Lj)(\gamma_j, L_j), representing the positive decay rate γj\gamma_j and the Lindblad operator LjL_j for each coupling channel jj
  • 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 TT specifying the times {ti}\{t_i\}
  • 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.


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



Graph.density_matrix_evolution_pwc : State evolution of an open quantum system.

Graph.steady_state : Compute the steady state of open quantum system.


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

dρs(t)dt=i[Hs(t),ρs(t)]+jγjD[Lj]ρs(t), \frac{{\rm d}\rho_{\rm s}(t)}{{\rm d}t} = -i [H_{\rm s}(t), \rho_{\rm s}(t)] + \sum_j \gamma_j {\mathcal D}[L_j] \rho_{\rm s}(t) ,

where D{\mathcal D}

D[X]ρ:=XρX12(XXρ+ρXX) {\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 XX

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

ρ(t)=1Mk=1Mψ~k(t)ψ~k(t). \rho(t) = \frac{1}{M} \sum_{k=1}^M |\tilde\psi_k(t) \rangle\langle \tilde\psi_k(t) | .


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

[2] G. Lindblad, Commun. Math. Phys. 48, 119 (1976).

Was this useful?