Skip to content

Commit

Permalink
Use FakeJob from qiskit_experiments.test instead of Qiskit
Browse files Browse the repository at this point in the history
  • Loading branch information
wshanks committed Feb 2, 2024
1 parent e2c6ec1 commit db6f49f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test/framework/test_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,18 @@
"""Tests for base experiment framework."""

import pickle
from itertools import product
from test.fake_experiment import FakeExperiment, FakeAnalysis
from test.base import QiskitExperimentsTestCase
from itertools import product

import ddt

from qiskit import QuantumCircuit
from qiskit.providers.fake_provider import FakeJob
from qiskit.providers.jobstatus import JobStatus
from qiskit.exceptions import QiskitError
from qiskit_ibm_runtime.fake_provider import FakeVigoV2

from qiskit_experiments.database_service import Qubit
from qiskit_experiments.exceptions import AnalysisError
from qiskit_experiments.framework import (
ExperimentData,
Expand All @@ -33,7 +34,7 @@
AnalysisStatus,
)
from qiskit_experiments.test.fake_backend import FakeBackend
from qiskit_experiments.database_service import Qubit
from qiskit_experiments.test.utils import FakeJob


@ddt.ddt
Expand Down Expand Up @@ -287,7 +288,7 @@ class MyBackend(FakeVigoV2):
"""A backend that works with `MyJob`"""

def run(self, run_input, **options):
return MyJob(self, "jobid", None)
return MyJob(self)

class MyJob(FakeJob):
"""A job with status ERROR, that errors when the result is queried"""
Expand Down

0 comments on commit db6f49f

Please sign in to comment.