Exemplo n.º 1
0
 def test_measure_nondeterministic_multi_qubit_without_sampling(self):
     """Test QasmSimulator measure with non-deterministic counts"""
     shots = 2000
     qobj = ref_measure.measure_circuits_qobj_nondeterministic(
         allow_sampling=False)
     qobj.config.shots = shots
     circuits = [experiment.header.name for experiment in qobj.experiments]
     targets = ref_measure.measure_counts_qobj_nondeterministic(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)
 def test_measure_nondeterministic_multi_qubit_without_sampling(self):
     """Test CHimulator reset with non-deterministic counts"""
     shots = 2000
     qobj = ref_measure.measure_circuits_qobj_nondeterministic(
         allow_sampling=False)
     qobj.config.shots = shots
     circuits = [experiment.header.name for experiment in qobj.experiments]
     targets = ref_measure.measure_counts_qobj_nondeterministic(shots)
     job = QasmSimulator().run(
         qobj, backend_options={"method": "extended_stabilizer"})
     result = job.result()
     self.is_completed(result)
     self.compare_counts(result, circuits, targets, delta=0.05 * shots)