def test_reset_sampling_opt(self, method, device):
     """Test sampling optimization"""
     backend = self.backend(method=method, device=device)
     shots = 4000
     circuits = ref_reset.reset_circuits_sampling_optimization()
     targets = ref_reset.reset_counts_sampling_optimization(shots)
     result = backend.run(circuits, shots=shots).result()
     self.assertSuccess(result)
     self.compare_counts(result, circuits, targets, delta=0.05 * shots)
Beispiel #2
0
 def test_reset_sampling_opt(self):
     """Test sampling optimization"""
     shots = 4000
     circuits = ref_reset.reset_circuits_sampling_optimization()
     targets = ref_reset.reset_counts_sampling_optimization(shots)
     qobj = assemble(circuits, self.SIMULATOR, shots=shots)
     result = self.SIMULATOR.run(
         qobj, **self.BACKEND_OPTS).result()
     self.assertSuccess(result)
     self.compare_counts(result, circuits, targets, delta=0.05 * shots)
Beispiel #3
0
 def test_reset_sampling_opt(self):
     """Test sampling optimization"""
     shots = 2000
     circuits = ref_reset.reset_sampling_optimization()
     targets = ref_reset.reset_counts_sampling_optimization(shots)
     qobj = compile(circuits, self.SIMULATOR, shots=shots)
     result = self.SIMULATOR.run(
         qobj, backend_options=self.BACKEND_OPTS).result()
     self.is_completed(result)
     self.compare_counts(result, circuits, targets, delta=0.05 * shots)