matrix

TimeEvolDensityMatrix.matrix(shot='all', t_idx='all', basis='product', frame='lab', in_qubit_subspace=False)

Return the time-evolved density matrix in a specific basis and frame.

Parameters:
  • shot (str | int | List[int]) – Specify the shot by its index or indices, or use 'all'.

  • t_idx (str | int | List[int]) – Specify the time by its index or indices, or use 'all'.

  • basis (str) – Specify the basis, must be either 'product' or 'eigen'.

  • frame (str) – Specify the frame, must be either 'lab' or 'rotating'. The rotating-frame transform uses model.rotating_frame_operator(), and is therefore controlled by the model’s rotating_frame_hamiltonian.

  • in_qubit_subspace (bool) – If True, the density matrix is projected to the model’s qubit subspace after the basis/frame transforms.

Return type:

ndarray | Array

Returns:

Time-evolved density matrices for the selected shots and time points. The returned array has shape (n_shots, n_times, dim, dim) unless a subset is requested.

Hint

Use it, for example, as:

result.time_evol_density_matrix.matrix(
    shot=0,
    t_idx=[0, -1],
    basis='eigen',
    frame='rotating',
)