Skip to content

Commit

Permalink
Remove pulse defaults for old fake 20q backends (Qiskit/qiskit#8665)
Browse files Browse the repository at this point in the history
* Remove pulse defaults for old fake 20q backends

The pulse defaults payload for the almaden, johannesburg, and singapore
fake backends are collectively taking up > 50% of the total disk
footprint of an installed copy of Qiskit. This is because the pusle
defaults for these backends predate the use the of parameterized pulse
definitions and contain arrays of sampled waveforms for the pulse
definitions. This exceedingly large file size slows down the entire
package and and makes it slower to install. When weighing the potential
value these defaults files provide for simulating and compiling with
pulse awareness for long retired devices against the real cost of
having the files included in the package there isn't a reason to keep
the files in the tree any longer. This commit removes the pulse
defaults files for these fake backends to greatly shrink the installed
package size of qiskit-terra.

* Update releasenotes/notes/remove-pulse-defs-old-20q-4ed46085b4a15678.yaml

* Update tests and docs

Several tests and docs were relying on the pulse data being present in
the fake backends. This commit updates the tests and docs to avoid this
and either rely on different fake backends that use parametric pulses or
not rely on a fake backend at all. In one case a bug is fixed the
assembler which was causing the tests to incorrectly pass because the
use of pulse backends without parametric pulses was masking incorrect
behavior.

* Revert passmanager config string test changes

* Remove self.maxDiff in str test

* Fix missing backtick

Co-authored-by: Jake Lishman <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Sep 29, 2022
1 parent ca5bb94 commit e39265d
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 15 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"""

import os
from qiskit.providers.fake_provider import fake_pulse_backend, fake_backend
from qiskit.providers.fake_provider import fake_qasm_backend, fake_backend


class FakeAlmadenV2(fake_backend.FakeBackendV2):
Expand All @@ -35,11 +35,10 @@ class FakeAlmadenV2(fake_backend.FakeBackendV2):
dirname = os.path.dirname(__file__)
conf_filename = "conf_almaden.json"
props_filename = "props_almaden.json"
defs_filename = "defs_almaden.json"
backend_name = "fake_almaden_v2"


class FakeAlmaden(fake_pulse_backend.FakePulseBackend):
class FakeAlmaden(fake_qasm_backend.FakeQasmBackend):
"""A fake Almaden backend.
.. code-block:: text
Expand All @@ -56,5 +55,4 @@ class FakeAlmaden(fake_pulse_backend.FakePulseBackend):
dirname = os.path.dirname(__file__)
conf_filename = "conf_almaden.json"
props_filename = "props_almaden.json"
defs_filename = "defs_almaden.json"
backend_name = "fake_almaden"

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"""

import os
from qiskit.providers.fake_provider import fake_pulse_backend, fake_backend
from qiskit.providers.fake_provider import fake_qasm_backend, fake_backend


class FakeJohannesburgV2(fake_backend.FakeBackendV2):
Expand All @@ -35,11 +35,10 @@ class FakeJohannesburgV2(fake_backend.FakeBackendV2):
dirname = os.path.dirname(__file__)
conf_filename = "conf_johannesburg.json"
props_filename = "props_johannesburg.json"
defs_filename = "defs_johannesburg.json"
backend_name = "fake_johannesburg_v2"


class FakeJohannesburg(fake_pulse_backend.FakePulseBackend):
class FakeJohannesburg(fake_qasm_backend.FakeQasmBackend):
"""A fake Johannesburg backend.
.. code-block:: text
Expand All @@ -56,5 +55,4 @@ class FakeJohannesburg(fake_pulse_backend.FakePulseBackend):
dirname = os.path.dirname(__file__)
conf_filename = "conf_johannesburg.json"
props_filename = "props_johannesburg.json"
defs_filename = "defs_johannesburg.json"
backend_name = "fake_johannesburg"

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"""

import os
from qiskit.providers.fake_provider import fake_pulse_backend, fake_backend
from qiskit.providers.fake_provider import fake_qasm_backend, fake_backend


class FakeSingaporeV2(fake_backend.FakeBackendV2):
Expand All @@ -35,11 +35,10 @@ class FakeSingaporeV2(fake_backend.FakeBackendV2):
dirname = os.path.dirname(__file__)
conf_filename = "conf_singapore.json"
props_filename = "props_singapore.json"
defs_filename = "defs_singapore.json"
backend_name = "fake_singapore_v2"


class FakeSingapore(fake_pulse_backend.FakePulseBackend):
class FakeSingapore(fake_qasm_backend.FakeQasmBackend):
"""A fake Singapore backend.
.. code-block:: text
Expand All @@ -56,5 +55,4 @@ class FakeSingapore(fake_pulse_backend.FakePulseBackend):
dirname = os.path.dirname(__file__)
conf_filename = "conf_singapore.json"
props_filename = "props_singapore.json"
defs_filename = "defs_singapore.json"
backend_name = "fake_singapore"

0 comments on commit e39265d

Please sign in to comment.