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

Add fake generic and modify tests #10266

Merged
merged 65 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from 63 commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
060d56b
Added a FakeGeneric BackendV2 backend, this is just a bare minimum wo…
MozammilQ Jun 6, 2023
ae26ee5
All FakeBackends (like FakeMelbourne, FakeBoeblingen ,etc) is replace…
MozammilQ Jun 8, 2023
c15254e
relocated FakeGeneric in fake_provider directory; replaced if-elif wi…
MozammilQ Jun 11, 2023
7f544d4
added tests for FakeGeneric
MozammilQ Jun 12, 2023
c864645
This commit just reformats test_transpiler.py fake_generic.py and tes…
MozammilQ Jun 12, 2023
1531e84
Update qiskit/providers/fake_provider/fake_generic.py
MozammilQ Jul 1, 2023
bf91f35
Update qiskit/providers/fake_provider/fake_generic.py
MozammilQ Jul 1, 2023
c34316a
Update test/python/providers/fake_provider/test_fake_generic.py
MozammilQ Jul 1, 2023
dc24618
Update test/python/providers/fake_provider/test_fake_generic.py
MozammilQ Jul 1, 2023
0e57867
Merge branch 'main' into add_FakeGeneric_and_modify_tests
ElePT Oct 2, 2023
02099a0
Fix some tests
ElePT Oct 2, 2023
680c3ce
Add calibration schedules, fix transpiler tests
ElePT Oct 2, 2023
6131e31
Fix lint
ElePT Oct 3, 2023
04914f2
Refactor, add pulse functionality
ElePT Oct 5, 2023
2523707
Latest updates to FakeGeneric
ElePT Oct 10, 2023
7ec720d
Fix some unit tests
ElePT Oct 10, 2023
8ce51ee
Fix some unit tests
ElePT Oct 11, 2023
5592167
Fix tests, lint, refactor
ElePT Oct 11, 2023
f2f3320
Remove unused inputs
ElePT Oct 11, 2023
22de937
Make calibrations optional
ElePT Oct 11, 2023
550234b
Attempt to speed up test: only add calibrations if option enabled
ElePT Oct 11, 2023
4fdf780
Revert some tests to V1
ElePT Oct 16, 2023
d2c1ba9
Fix conflict
ElePT Oct 17, 2023
177953b
Refactor FakeGeneric
ElePT Oct 18, 2023
96c46e1
Update unit test
ElePT Oct 19, 2023
242d5fb
Rename supported instructions to operations, fix tests
ElePT Nov 13, 2023
e8305e3
Restore vf2postlayout test to V1
ElePT Nov 23, 2023
be2393b
Add pulse test to validate pulse capabilities of new fake backend
ElePT Nov 23, 2023
a6b3fe6
Update docs, fix lint
ElePT Nov 23, 2023
fbd1aad
Avoid set for basis gates to allow reproducibility in the error/durat…
ElePT Nov 24, 2023
349141c
Merge branch 'main' into add_FakeGeneric_and_modify_tests
ElePT Nov 28, 2023
6f3bb4b
Update calibrations
ElePT Nov 30, 2023
c9c72e1
Merge branch 'main' of https://github.com/ElePT/qiskit-terra into add…
ElePT Nov 30, 2023
cacd296
Merge branch 'add_FakeGeneric_and_modify_tests' of https://github.com…
ElePT Nov 30, 2023
ba14dc1
Fix transpiler test
ElePT Nov 30, 2023
5b87345
Add run test to confirm noise defaults
ElePT Dec 4, 2023
01343ad
Add CZ to basis gates, dtm, update backend names, fix docs
ElePT Dec 7, 2023
982deb7
Remove GenericTarget, add default for basis_gates, remove supported_o…
ElePT Jan 17, 2024
d69c01d
Merge branch 'main' into add_FakeGeneric_and_modify_tests
ElePT Jan 17, 2024
09bc015
Apply review comments, modify calibrate_instructions to avoid public …
ElePT Jan 22, 2024
e0c5aa7
New name proposal
ElePT Jan 22, 2024
6b0817a
Fix conflict
ElePT Jan 22, 2024
12e253d
Fix lint and test
ElePT Jan 22, 2024
0db8035
Fix comment
ElePT Jan 22, 2024
abef228
Apply Kevin's suggestions to extract defaults from class
ElePT Jan 23, 2024
0d303bb
Make defaults private
ElePT Jan 23, 2024
9e276e9
Fix lint
ElePT Jan 23, 2024
e98f059
Revert previous 3 comments.
ElePT Jan 24, 2024
d44a517
Privatize GenericFakeBackend
ElePT Jan 24, 2024
a54fb64
Remove from docs
ElePT Jan 24, 2024
99c643f
Revert privatization
ElePT Jan 25, 2024
de63a9d
Apply review comments
ElePT Jan 25, 2024
fca016a
Add reno
ElePT Jan 25, 2024
de5bc0e
Fix lint
ElePT Jan 25, 2024
099143f
Apply suggestions from Matt's code review
ElePT Jan 26, 2024
54496db
Apply comments from code review
ElePT Jan 27, 2024
0e00b22
Fix conflict
ElePT Jan 27, 2024
fe37393
Fix lint
ElePT Jan 27, 2024
a36acaf
Rename to GenericBackendV2 and adjust docs.
ElePT Jan 29, 2024
f1816ea
Fix lint
ElePT Jan 29, 2024
741831e
Apply comments from code review
ElePT Jan 29, 2024
ee588cc
It's not 2023 anymore
ElePT Jan 29, 2024
93cdb36
Merge branch 'main' into add_FakeGeneric_and_modify_tests
ElePT Jan 29, 2024
cba3eba
Fix conflict
ElePT Jan 29, 2024
72d1dee
Fix test conflict.
kevinhartman Jan 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 9 additions & 6 deletions qiskit/providers/fake_provider/__init__.py
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the interest of time we should leave this for after the release candidate is shipped, but I think it would be good to get some proper top-level documentation and examples written for how people should build and use these backends. We want to show people best practices for testing their compilation / whatever workloads before shipping them off to real hardware.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This code is part of Qiskit.
#
# (C) Copyright IBM 2022.
# (C) Copyright IBM 2022, 2024.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
Expand All @@ -20,10 +20,11 @@
Overview
========

The fake provider module contains fake providers and fake backends classes. The fake backends are
built to mimic the behaviors of IBM Quantum systems using system snapshots. The system snapshots
contain important information about the quantum system such as coupling map, basis gates, qubit
properties (T1, T2, error rate, etc.) which are useful for testing the transpiler and performing
The fake provider module contains fake providers, fake backends and other simulated backend
implementations. The fake backends are built to mimic the behaviors of IBM Quantum systems
using system snapshots. The system snapshots contain important information about the quantum
system such as coupling map, basis gates, qubit properties (T1, T2, error rate, etc.) which
are useful for testing the transpiler and performing
noisy simulation of the system.

Example Usage
Expand Down Expand Up @@ -210,6 +211,7 @@
FakeBackendV2
FakeBackend5QV2
FakeMumbaiFractionalCX
GenericBackendV2

Fake Backend Base Classes
=========================
Expand Down Expand Up @@ -241,10 +243,11 @@
# Standard fake backends with IBM Quantum systems snapshots
from .backends import *

# Special fake backends for special testing perpurposes
# Special fake backends for special testing purposes
from .fake_qasm_simulator import FakeQasmSimulator
from .fake_openpulse_2q import FakeOpenPulse2Q
from .fake_openpulse_3q import FakeOpenPulse3Q
from .fake_1q import Fake1Q
from .fake_backend_v2 import FakeBackendV2, FakeBackend5QV2
from .fake_mumbai_v2 import FakeMumbaiFractionalCX
from .generic_backend_v2 import GenericBackendV2