iqm.benchmarks.entanglement.graph_states.plot_density_matrix#
- iqm.benchmarks.entanglement.graph_states.plot_density_matrix(matrix: ndarray, qubit_pair: Sequence[int], projection: str, negativity: Dict[str, float], backend_name: str, timestamp: str, tomography: Literal['state_tomography', 'shadow_tomography'], num_RM_samples: int | None = None, num_MoMs_samples: int | None = None) Tuple[str, Figure] #
Plots a density matrix for corresponding qubit pairs, neighbor qubit projections, and negativities.
- Parameters:
matrix (np.ndarray) – The matrix to plot.
qubit_pair (Sequence[int]) – The corresponding qubit pair.
projection (str) – The projection corresponding to the matrix to plot.
negativity (Dict[str, float]) – A dictionary with keys “value” and “uncertainty” and values being respective negativities.
backend_name (str) – The name of the backend for the corresponding experiment.
timestamp (str) – The timestamp for the corresponding experiment.
tomography (Literal["state_tomography", "shadow_tomography"]) – The type of tomography used to gather the data of the matrix to plot.
num_RM_samples (Optional[int] = None) – The number of randomized measurement samples if tomography is shadow_tomography. * Default is None if tomography is state_tomography.
num_MoMs_samples (Optional[int] = None) – The number of Median of Means used per randomized measurement if tomography is shadow_tomography. * Default is None if tomography is state_tomography.
- Returns:
The figure label and the density matrix plot figure.
- Return type:
Tuple[str, Figure]