Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use generic backend for testing #1344

Merged
merged 1 commit into from
May 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions scripts/nb-tester/qiskit_docs_notebook_tester/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
MOCKING_CODE = """\
import warnings
from qiskit_ibm_runtime import QiskitRuntimeService
from qiskit_ibm_runtime.fake_provider import FakeKyoto
from qiskit.providers.fake_provider import GenericBackendV2

def patched_least_busy(self, *args, **kwarg):
return FakeKyoto()
return GenericBackendV2(num_qubits=5, control_flow=True)

QiskitRuntimeService.least_busy = patched_least_busy

Expand Down Expand Up @@ -164,7 +164,7 @@ async def execute_notebook(path: Path, args: argparse.Namespace, config: Config)
"""
is_patched = not args.submit_jobs and matches(path, config.notebooks_that_submit_jobs)
if is_patched:
print(f"▶️ Executing {path} (with least_busy patched to return FakeKyoto)")
print(f"▶️ Executing {path} (with least_busy patched to return fake backend)")
else:
print(f"▶️ Executing {path}")
possible_exceptions = (
Expand Down
Loading