deltakit.explorer.visualisation.correlation_matrix#
- deltakit.explorer.visualisation.correlation_matrix(matrix: ndarray[tuple[int, ...], dtype[_ScalarType_co]], qubit_to_detector_mapping: QubitCoordinateToDetectorMapping, labels: Sequence[str] = ())#
Plot a given correlation matrix as a heatmap.
- Parameters:
matrix (npt.NDArray) – correlation matrix.
qubit_to_detector_mapping (QubitCoordinateToDetectorMapping) – {qubit_coordinate_tuple_1: [det_1, det_2, det_2, …], }
labels (Sequence[str]) – labels to the qubits.
- Returns:
The plt object containing the drawn heatmap.
- Return type:
matplotlib.plt
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()