Пример #1
0
    def test_noise_model_from_backend_almaden(self):
        circ = QuantumCircuit(2)
        circ.x(0)
        circ.x(1)
        circ.measure_all()

        backend = mock.FakeAlmaden()
        noise_model = NoiseModel.from_backend(backend)
        circ = transpile(circ, backend, optimization_level=0)
        result = AerSimulator().run(circ, noise_model=noise_model).result()
        self.assertTrue(result.success)
Пример #2
0
    def test_noise_model_from_backend_almaden(self):
        circ = QuantumCircuit(2)
        circ.x(0)
        circ.x(1)
        circ.measure_all()

        backend = mock.FakeAlmaden()
        noise_model = NoiseModel.from_backend(backend)
        qobj = assemble(transpile(circ, backend), backend)
        sim = QasmSimulator()
        result = sim.run(qobj, noise_model=noise_model).result()
        self.assertTrue(result.success)