コード例 #1
0
 def test_measure_deterministic_multi_qubit_without_sampling(self):
     """Test QasmSimulator multi-qubit measure with deterministic counts without sampling"""
     shots = 100
     qobj = ref_measure.measure_circuits_qobj_deterministic(
         allow_sampling=False)
     qobj.config.shots = shots
     circuits = [experiment.header.name for experiment in qobj.experiments]
     targets = ref_measure.measure_counts_qobj_deterministic(shots)
     result = self.SIMULATOR.run(
         qobj, backend_options=self.BACKEND_OPTS).result()
     self.is_completed(result)
     self.compare_counts(result, circuits, targets, delta=0)
コード例 #2
0
 def test_measure_deterministic_multi_qubit_without_sampling(self):
     """Test ExtendedStabilizer multi-qubit measure with deterministic counts without sampling"""
     shots = 100
     qobj = ref_measure.measure_circuits_qobj_deterministic(
         allow_sampling=False)
     qobj.config.shots = shots
     circuits = [experiment.header.name for experiment in qobj.experiments]
     targets = ref_measure.measure_counts_qobj_deterministic(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)