Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 2 additions & 0 deletions qiskit/providers/fake_provider/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@
FakeNairobiV2
FakeOurenseV2
FakeParisV2
FakePerthV2
FakePoughkeepsieV2
FakeQuitoV2
FakeRochesterV2
Expand Down Expand Up @@ -189,6 +190,7 @@
FakeNairobi
FakeOurense
FakeParis
FakePerth
FakePoughkeepsie
FakeQuito
FakeRochester
Expand Down
2 changes: 2 additions & 0 deletions qiskit/providers/fake_provider/backends/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
from .nairobi import FakeNairobiV2
from .ourense import FakeOurenseV2
from .paris import FakeParisV2
from .perth import FakePerthV2
from .poughkeepsie import FakePoughkeepsieV2
from .quito import FakeQuitoV2
from .rochester import FakeRochesterV2
Expand Down Expand Up @@ -87,6 +88,7 @@
from .nairobi import FakeNairobi
from .ourense import FakeOurense
from .paris import FakeParis
from .perth import FakePerth
from .poughkeepsie import FakePoughkeepsie
from .quito import FakeQuito
from .rochester import FakeRochester
Expand Down
16 changes: 16 additions & 0 deletions qiskit/providers/fake_provider/backends/perth/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This code is part of Qiskit.
#
# (C) Copyright IBM 2022.
#
# 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
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative works of this code must retain this
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

"""Mock perth backend"""
Comment thread
1ucian0 marked this conversation as resolved.
Outdated

from .fake_perth import FakePerthV2
from .fake_perth import FakePerth
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"backend_name": "ibm_perth", "backend_version": "1.1.26", "n_qubits": 7, "basis_gates": ["id", "rz", "sx", "x", "cx", "reset"], "gates": [{"name": "id", "parameters": [], "qasm_def": "gate id q { U(0, 0, 0) q; }", "coupling_map": [[0], [1], [2], [3], [4], [5], [6]]}, {"name": "rz", "parameters": ["theta"], "qasm_def": "gate rz(theta) q { U(0, 0, theta) q; }", "coupling_map": [[0], [1], [2], [3], [4], [5], [6]]}, {"name": "sx", "parameters": [], "qasm_def": "gate sx q { U(pi/2, 3*pi/2, pi/2) q; }", "coupling_map": [[0], [1], [2], [3], [4], [5], [6]]}, {"name": "x", "parameters": [], "qasm_def": "gate x q { U(pi, 0, pi) q; }", "coupling_map": [[0], [1], [2], [3], [4], [5], [6]]}, {"name": "cx", "parameters": [], "qasm_def": "gate cx q0, q1 { CX q0, q1; }", "coupling_map": [[0, 1], [1, 0], [1, 2], [1, 3], [2, 1], [3, 1], [3, 5], [4, 5], [5, 3], [5, 4], [5, 6], [6, 5]]}, {"name": "reset", "parameters": null, "qasm_def": null}], "local": false, "simulator": false, "conditional": false, "open_pulse": true, "memory": true, "max_shots": 100000, "coupling_map": [[0, 1], [1, 0], [1, 2], [1, 3], [2, 1], [3, 1], [3, 5], [4, 5], [5, 3], [5, 4], [5, 6], [6, 5]], "dynamic_reprate_enabled": true, "supported_instructions": ["reset", "u2", "acquire", "shiftf", "rz", "x", "u3", "setf", "id", "u1", "play", "cx", "delay", "sx", "measure"], "rep_delay_range": [0.0, 500.0], "default_rep_delay": 250.0, "max_experiments": 300, "sample_name": "family: Falcon, revision: 5.11, segment: H", "n_registers": 1, "credits_required": true, "online_date": "2021-07-22T04:00:00+00:00", "description": "7 qubit device", "dt": 0.2222222222222222, "dtm": 0.2222222222222222, "processor_type": {"family": "Falcon", "revision": "5.11", "segment": "H"}, "parametric_pulses": ["gaussian", "gaussian_square", "drag", "constant"], "allow_q_object": true, "clops": 2891, "measure_esp_enabled": true, "multi_meas_enabled": true, "parallel_compilation": false, "quantum_volume": 32, "qubit_channel_mapping": [["u0", "d0", "u1", "m0"], ["u0", "u2", "m1", "u4", "u5", "u3", "u1", "d1"], ["d2", "u4", "u2", "m2"], ["u6", "u8", "u5", "u3", "m3", "d3"], ["u9", "m4", "u7", "d4"], ["d5", "u6", "u8", "u7", "u11", "u10", "m5", "u9"], ["u10", "d6", "m6", "u11"]], "supported_features": ["qobj", "qasm3"], "timing_constraints": {"acquire_alignment": 16, "granularity": 16, "min_length": 64, "pulse_alignment": 16}, "uchannels_enabled": true, "url": "None", "input_allowed": ["job", "runtime", "qasm3"], "allow_object_storage": true, "pulse_num_channels": 9, "pulse_num_qubits": 3, "live_data": false, "n_uchannels": 12, "u_channel_lo": [[{"q": 1, "scale": [1.0, 0.0]}], [{"q": 0, "scale": [1.0, 0.0]}], [{"q": 2, "scale": [1.0, 0.0]}], [{"q": 3, "scale": [1.0, 0.0]}], [{"q": 1, "scale": [1.0, 0.0]}], [{"q": 1, "scale": [1.0, 0.0]}], [{"q": 5, "scale": [1.0, 0.0]}], [{"q": 5, "scale": [1.0, 0.0]}], [{"q": 3, "scale": [1.0, 0.0]}], [{"q": 4, "scale": [1.0, 0.0]}], [{"q": 6, "scale": [1.0, 0.0]}], [{"q": 5, "scale": [1.0, 0.0]}]], "meas_levels": [1, 2], "qubit_lo_range": [[4.657546043297998, 5.657546043297998], [4.533691457253806, 5.533691457253806], [4.362635459406973, 5.362635459406973], [4.625269059177807, 5.625269059177807], [4.659221243756982, 5.659221243756982], [4.478609543928158, 5.478609543928158], [4.656651195298073, 5.656651195298073]], "meas_lo_range": [[6.663115502, 7.663115502], [6.6164476510000005, 7.6164476510000005], [6.84928468, 7.84928468], [6.719581694, 7.719581694], [6.637153809000001, 7.637153809000001], [6.78180398, 7.78180398], [6.6522457170000004, 7.6522457170000004]], "meas_kernels": ["hw_qmfk"], "discriminators": ["quadratic_discriminator", "hw_qmfk", "linear_discriminator"], "rep_times": [1000.0], "meas_map": [[0, 1, 2, 3, 4, 5, 6]], "acquisition_latency": [], "conditional_latency": [], "hamiltonian": {"description": "Qubits are modeled as Duffing oscillators. In this case, the system includes higher energy states, i.e. not just |0> and |1>. The Pauli operators are generalized via the following set of transformations:\n\n$(\\mathbb{I}-\\sigma_{i}^z)/2 \\rightarrow O_i \\equiv b^\\dagger_{i} b_{i}$,\n\n$\\sigma_{+} \\rightarrow b^\\dagger$,\n\n$\\sigma_{-} \\rightarrow b$,\n\n$\\sigma_{i}^X \\rightarrow b^\\dagger_{i} + b_{i}$.\n\nQubits are coupled through resonator buses. The provided Hamiltonian has been projected into the zero excitation subspace of the resonator buses leading to an effective qubit-qubit flip-flop interaction. The qubit resonance frequencies in the Hamiltonian are the cavity dressed frequencies and not exactly what is returned by the backend defaults, which also includes the dressing due to the qubit-qubit interactions.\n\nQuantities are returned in angular frequencies, with units 2*pi*GHz.\n\nWARNING: Currently not all system Hamiltonian information is available to the public, missing values have been replaced with 0.\n", "h_latex": "\\begin{align} \\mathcal{H}/\\hbar = & \\sum_{i=0}^{6}\\left(\\frac{\\omega_{q,i}}{2}(\\mathbb{I}-\\sigma_i^{z})+\\frac{\\Delta_{i}}{2}(O_i^2-O_i)+\\Omega_{d,i}D_i(t)\\sigma_i^{X}\\right) \\\\ & + J_{0,1}(\\sigma_{0}^{+}\\sigma_{1}^{-}+\\sigma_{0}^{-}\\sigma_{1}^{+}) + J_{1,2}(\\sigma_{1}^{+}\\sigma_{2}^{-}+\\sigma_{1}^{-}\\sigma_{2}^{+}) + J_{4,5}(\\sigma_{4}^{+}\\sigma_{5}^{-}+\\sigma_{4}^{-}\\sigma_{5}^{+}) + J_{5,6}(\\sigma_{5}^{+}\\sigma_{6}^{-}+\\sigma_{5}^{-}\\sigma_{6}^{+}) \\\\ & + J_{1,3}(\\sigma_{1}^{+}\\sigma_{3}^{-}+\\sigma_{1}^{-}\\sigma_{3}^{+}) + J_{3,5}(\\sigma_{3}^{+}\\sigma_{5}^{-}+\\sigma_{3}^{-}\\sigma_{5}^{+}) \\\\ & + \\Omega_{d,0}(U_{0}^{(0,1)}(t))\\sigma_{0}^{X} + \\Omega_{d,1}(U_{1}^{(1,0)}(t)+U_{3}^{(1,3)}(t)+U_{2}^{(1,2)}(t))\\sigma_{1}^{X} \\\\ & + \\Omega_{d,2}(U_{4}^{(2,1)}(t))\\sigma_{2}^{X} + \\Omega_{d,3}(U_{5}^{(3,1)}(t)+U_{6}^{(3,5)}(t))\\sigma_{3}^{X} \\\\ & + \\Omega_{d,4}(U_{7}^{(4,5)}(t))\\sigma_{4}^{X} + \\Omega_{d,5}(U_{8}^{(5,3)}(t)+U_{10}^{(5,6)}(t)+U_{9}^{(5,4)}(t))\\sigma_{5}^{X} \\\\ & + \\Omega_{d,6}(U_{11}^{(6,5)}(t))\\sigma_{6}^{X} \\\\ \\end{align}", "h_str": ["_SUM[i,0,6,wq{i}/2*(I{i}-Z{i})]", "_SUM[i,0,6,delta{i}/2*O{i}*O{i}]", "_SUM[i,0,6,-delta{i}/2*O{i}]", "_SUM[i,0,6,omegad{i}*X{i}||D{i}]", "jq0q1*Sp0*Sm1", "jq0q1*Sm0*Sp1", "jq1q2*Sp1*Sm2", "jq1q2*Sm1*Sp2", "jq4q5*Sp4*Sm5", "jq4q5*Sm4*Sp5", "jq5q6*Sp5*Sm6", "jq5q6*Sm5*Sp6", "jq1q3*Sp1*Sm3", "jq1q3*Sm1*Sp3", "jq3q5*Sp3*Sm5", "jq3q5*Sm3*Sp5", "omegad1*X0||U0", "omegad0*X1||U1", "omegad3*X1||U3", "omegad2*X1||U2", "omegad1*X2||U4", "omegad1*X3||U5", "omegad5*X3||U6", "omegad5*X4||U7", "omegad3*X5||U8", "omegad6*X5||U10", "omegad4*X5||U9", "omegad5*X6||U11"], "osc": {}, "qub": {"0": 3, "1": 3, "2": 3, "3": 3, "4": 3, "5": 3, "6": 3}, "vars": {"delta0": -2.145861830262288, "delta1": -2.1637323700183813, "delta2": -2.1819772957619166, "delta3": -2.1390595390914435, "delta4": -2.094603727927117, "delta5": -2.1741205452449366, "delta6": -2.1391380255788, "jq0q1": 0.0002985095697687125, "jq1q2": 0.009124660333764169, "jq1q3": 0.00034451952437060125, "jq3q5": 0.013805491337781944, "jq4q5": 0.019157791111464737, "jq5q6": 0.01878865253626694, "omegad0": 1.17768084688185, "omegad1": 0.8944154423214405, "omegad2": 1.2751647891733031, "omegad3": 1.1539312808524558, "omegad4": 1.0470469563014095, "omegad5": 1.0320368101206865, "omegad6": 1.002098104679006, "wq0": 32.40581752035219, "wq1": 31.62761620509251, "wq2": 30.552839672716356, "wq3": 32.20301524796814, "wq4": 32.416343115262656, "wq5": 31.281526336593462, "wq6": 32.4001950245469}}, "channels": {"acquire0": {"operates": {"qubits": [0]}, "purpose": "acquire", "type": "acquire"}, "acquire1": {"operates": {"qubits": [1]}, "purpose": "acquire", "type": "acquire"}, "acquire2": {"operates": {"qubits": [2]}, "purpose": "acquire", "type": "acquire"}, "acquire3": {"operates": {"qubits": [3]}, "purpose": "acquire", "type": "acquire"}, "acquire4": {"operates": {"qubits": [4]}, "purpose": "acquire", "type": "acquire"}, "acquire5": {"operates": {"qubits": [5]}, "purpose": "acquire", "type": "acquire"}, "acquire6": {"operates": {"qubits": [6]}, "purpose": "acquire", "type": "acquire"}, "d0": {"operates": {"qubits": [0]}, "purpose": "drive", "type": "drive"}, "d1": {"operates": {"qubits": [1]}, "purpose": "drive", "type": "drive"}, "d2": {"operates": {"qubits": [2]}, "purpose": "drive", "type": "drive"}, "d3": {"operates": {"qubits": [3]}, "purpose": "drive", "type": "drive"}, "d4": {"operates": {"qubits": [4]}, "purpose": "drive", "type": "drive"}, "d5": {"operates": {"qubits": [5]}, "purpose": "drive", "type": "drive"}, "d6": {"operates": {"qubits": [6]}, "purpose": "drive", "type": "drive"}, "m0": {"operates": {"qubits": [0]}, "purpose": "measure", "type": "measure"}, "m1": {"operates": {"qubits": [1]}, "purpose": "measure", "type": "measure"}, "m2": {"operates": {"qubits": [2]}, "purpose": "measure", "type": "measure"}, "m3": {"operates": {"qubits": [3]}, "purpose": "measure", "type": "measure"}, "m4": {"operates": {"qubits": [4]}, "purpose": "measure", "type": "measure"}, "m5": {"operates": {"qubits": [5]}, "purpose": "measure", "type": "measure"}, "m6": {"operates": {"qubits": [6]}, "purpose": "measure", "type": "measure"}, "u0": {"operates": {"qubits": [0, 1]}, "purpose": "cross-resonance", "type": "control"}, "u1": {"operates": {"qubits": [1, 0]}, "purpose": "cross-resonance", "type": "control"}, "u10": {"operates": {"qubits": [5, 6]}, "purpose": "cross-resonance", "type": "control"}, "u11": {"operates": {"qubits": [6, 5]}, "purpose": "cross-resonance", "type": "control"}, "u2": {"operates": {"qubits": [1, 2]}, "purpose": "cross-resonance", "type": "control"}, "u3": {"operates": {"qubits": [1, 3]}, "purpose": "cross-resonance", "type": "control"}, "u4": {"operates": {"qubits": [2, 1]}, "purpose": "cross-resonance", "type": "control"}, "u5": {"operates": {"qubits": [3, 1]}, "purpose": "cross-resonance", "type": "control"}, "u6": {"operates": {"qubits": [3, 5]}, "purpose": "cross-resonance", "type": "control"}, "u7": {"operates": {"qubits": [4, 5]}, "purpose": "cross-resonance", "type": "control"}, "u8": {"operates": {"qubits": [5, 3]}, "purpose": "cross-resonance", "type": "control"}, "u9": {"operates": {"qubits": [5, 4]}, "purpose": "cross-resonance", "type": "control"}}}

Large diffs are not rendered by default.

38 changes: 38 additions & 0 deletions qiskit/providers/fake_provider/backends/perth/fake_perth.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This code is part of Qiskit.
#
# (C) Copyright IBM 2022.
#
# 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
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative works of this code must retain this
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

"""
Fake Perth device (7 qubit).
"""

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


class FakePerthV2(fake_backend.FakeBackendV2):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If there is no V1 variant we don't need to mark this as V2

Suggested change
class FakePerthV2(fake_backend.FakeBackendV2):
class FakePerth(fake_backend.FakeBackendV2):

@1ucian0 1ucian0 Sep 16, 2022

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

sounds good. Done in 06a0517 . So, the type is the way to check the version?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You can either type check, or there is a .version class attribute set in the base abstract class. So you can do something like: backend.version >= 2 or something like that.

"""A fake 7 qubit backend."""

dirname = os.path.dirname(__file__)
conf_filename = "conf_perth.json"
props_filename = "props_perth.json"
defs_filename = "defs_perth.json"
backend_name = "fake_perth_v2"


class FakePerth(fake_pulse_backend.FakePulseBackend):
"""A fake 7 qubit backend."""

dirname = os.path.dirname(__file__)
conf_filename = "conf_perth.json"
props_filename = "props_perth.json"
defs_filename = "defs_perth.json"
backend_name = "fake_perth"

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions qiskit/providers/fake_provider/fake_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ def __init__(self):
FakeNairobiV2(),
FakeOurenseV2(),
FakeParisV2(),
FakePerthV2(),
FakePoughkeepsieV2(),
FakeQuitoV2(),
FakeRochesterV2(),
Expand Down Expand Up @@ -187,6 +188,7 @@ def __init__(self):
FakeOpenPulse3Q(),
FakeOurense(),
FakeParis(),
FakePerth(),
FakePoughkeepsie(),
FakeQasmSimulator(),
FakeQuito(),
Expand Down
4 changes: 4 additions & 0 deletions releasenotes/notes/ibm_perth-5b1e9308dc302e2e.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
features:
- |
The fake backend :class:`~FakePerth` was added to with the information from IBM Quantum `ibm_perth` system.
Comment thread
1ucian0 marked this conversation as resolved.
Outdated