deltakit.explorer.plotting.correlation_matrix#
- deltakit.explorer.plotting.correlation_matrix(matrix: ndarray[tuple[Any, ...], dtype[floating]] | Sequence[Sequence[float]], qubit_to_detector_mapping: QubitCoordinateToDetectorMapping | dict[tuple[float, ...], list[int]], labels: Sequence[str] = ())#
Plot a given correlation matrix as a heatmap.
- Parameters:
matrix – correlation matrix to plot.
qubit_to_detector_mapping – Mapping of detectors to qubit coordinates.
labels – labels to the qubits.
- Returns:
The plt object containing the drawn heatmap.
- Return type:
matplotlib.plt
- Raises:
ImportError – If seaborn is not installed - please install Visualisation extras.
Examples
Collect the data for a correlation matrix plot:
matrix, mapping = client.get_correlation_matrix( detectors, stim_circuit, use_default_noise_model_edges=True, ) plt = correlation_matrix(matrix, mapping) plt.show()