def plot_pauli_transfer_matrix(self, ax): """ Plot the elements of the Pauli transfer matrix. :param matplotlib.Axes ax: A matplotlib Axes object to plot into. """ title = "Estimated process" ut.plot_pauli_transfer_matrix(self.r_est, ax, self.pauli_basis.labels, title)
def test_visualization(): ax = Axes3D(figure()) # Without axis. ut.state_histogram(grove.tomography.operator_utils.GS, title="test") # With axis. ut.state_histogram(grove.tomography.operator_utils.GS, ax, "test") assert ax.get_title() == "test" ptX = grove.tomography.operator_utils.PAULI_BASIS.transfer_matrix( qt.to_super(grove.tomography.operator_utils.QX)).toarray() ax = Mock() with patch("matplotlib.pyplot.colorbar"): ut.plot_pauli_transfer_matrix( ptX, ax, grove.tomography.operator_utils.PAULI_BASIS.labels, "bla") assert ax.imshow.called assert ax.set_xlabel.called assert ax.set_ylabel.called