Exemplo n.º 1
0
 def test_mitigate_depolarizing_noise_split_channel(self, input,
                                                    expected_output):
     """Test mitigation of depolarizing noise in kernel matrix estimating individual
     noise rates per datapoint."""
     output = kern.mitigate_depolarizing_noise(input, self.num_wires,
                                               "split_channel")
     assert np.allclose(output, expected_output)
Exemplo n.º 2
0
 def test_mitigate_depolarizing_noise_average(self, input, use_entries,
                                              expected_output):
     """Test mitigation of depolarizing noise in kernel matrix averaging a single noise rate."""
     output = kern.mitigate_depolarizing_noise(input, self.num_wires,
                                               "average", use_entries)
     assert np.allclose(output, expected_output)