diff --git a/qiskit/test/mock/props_vigo.json b/qiskit/test/mock/props_vigo.json new file mode 100644 index 000000000000..0209a6723cbf --- /dev/null +++ b/qiskit/test/mock/props_vigo.json @@ -0,0 +1 @@ +{"gates": [{"name": "id_0", "gate": "id", "parameters": [{"name": "gate_error", "date": "2019-10-16T06:08:27+00:00", "value": 0.00043827201384123726, "unit": ""}, {"name": "gate_length", "date": "2019-10-16T06:22:30+00:00", "value": 35.55555555555556, "unit": "ns"}], "qubits": [0]}, {"name": "u1_0", "gate": "u1", "parameters": [{"name": "gate_error", "date": "2019-10-16T06:08:27+00:00", "value": 0.0, "unit": ""}, {"name": "gate_length", "date": "2019-10-16T06:22:30+00:00", "value": 0.0, "unit": "ns"}], "qubits": [0]}, {"name": "u2_0", "gate": "u2", "parameters": [{"name": "gate_error", "date": "2019-10-16T06:08:27+00:00", "value": 0.00043827201384123726, "unit": ""}, {"name": "gate_length", "date": "2019-10-16T06:22:30+00:00", "value": 35.55555555555556, "unit": "ns"}], "qubits": [0]}, {"name": "u3_0", "gate": "u3", "parameters": [{"name": "gate_error", "date": "2019-10-16T06:08:27+00:00", "value": 0.0008765440276824745, "unit": ""}, {"name": "gate_length", "date": "2019-10-16T06:22:30+00:00", "value": 71.11111111111111, "unit": "ns"}], "qubits": [0]}, {"name": "id_1", "gate": "id", "parameters": [{"name": "gate_error", "date": "2019-10-16T06:08:27+00:00", "value": 0.0005034477534859994, "unit": ""}, {"name": "gate_length", "date": "2019-10-16T06:22:30+00:00", "value": 35.55555555555556, "unit": "ns"}], "qubits": [1]}, {"name": "u1_1", "gate": "u1", "parameters": [{"name": "gate_error", "date": "2019-10-16T06:08:27+00:00", "value": 0.0, "unit": ""}, {"name": "gate_length", "date": "2019-10-16T06:22:30+00:00", "value": 0.0, "unit": "ns"}], "qubits": [1]}, {"name": "u2_1", "gate": "u2", "parameters": [{"name": "gate_error", "date": "2019-10-16T06:08:27+00:00", "value": 0.0005034477534859994, "unit": ""}, {"name": "gate_length", "date": "2019-10-16T06:22:30+00:00", "value": 35.55555555555556, "unit": "ns"}], "qubits": [1]}, {"name": "u3_1", "gate": "u3", "parameters": [{"name": "gate_error", "date": "2019-10-16T06:08:27+00:00", "value": 0.0010068955069719987, "unit": ""}, {"name": "gate_length", "date": "2019-10-16T06:22:30+00:00", "value": 71.11111111111111, "unit": "ns"}], "qubits": [1]}, {"name": "id_2", "gate": "id", "parameters": [{"name": "gate_error", "date": "2019-10-16T06:08:27+00:00", "value": 0.00034326438431702425, "unit": ""}, {"name": "gate_length", "date": "2019-10-16T06:22:30+00:00", "value": 35.55555555555556, "unit": "ns"}], "qubits": [2]}, {"name": "u1_2", "gate": "u1", "parameters": [{"name": "gate_error", "date": "2019-10-16T06:08:27+00:00", "value": 0.0, "unit": ""}, {"name": "gate_length", "date": "2019-10-16T06:22:30+00:00", "value": 0.0, "unit": "ns"}], "qubits": [2]}, {"name": "u2_2", "gate": "u2", "parameters": [{"name": "gate_error", "date": "2019-10-16T06:08:27+00:00", "value": 0.00034326438431702425, "unit": ""}, {"name": "gate_length", "date": "2019-10-16T06:22:30+00:00", "value": 35.55555555555556, "unit": "ns"}], "qubits": [2]}, {"name": "u3_2", "gate": "u3", "parameters": [{"name": "gate_error", "date": "2019-10-16T06:08:27+00:00", "value": 0.0006865287686340485, "unit": ""}, {"name": "gate_length", "date": "2019-10-16T06:22:30+00:00", "value": 71.11111111111111, "unit": "ns"}], "qubits": [2]}, {"name": "id_3", "gate": "id", "parameters": [{"name": "gate_error", "date": "2019-10-16T06:08:27+00:00", "value": 0.0005198394690553291, "unit": ""}, {"name": "gate_length", "date": "2019-10-16T06:22:30+00:00", "value": 35.55555555555556, "unit": "ns"}], "qubits": [3]}, {"name": "u1_3", "gate": "u1", "parameters": [{"name": "gate_error", "date": "2019-10-16T06:08:27+00:00", "value": 0.0, "unit": ""}, {"name": "gate_length", "date": "2019-10-16T06:22:30+00:00", "value": 0.0, "unit": "ns"}], "qubits": [3]}, {"name": "u2_3", "gate": "u2", "parameters": [{"name": "gate_error", "date": "2019-10-16T06:08:27+00:00", "value": 0.0005198394690553291, "unit": ""}, {"name": "gate_length", "date": "2019-10-16T06:22:30+00:00", "value": 35.55555555555556, "unit": "ns"}], "qubits": [3]}, {"name": "u3_3", "gate": "u3", "parameters": [{"name": "gate_error", "date": "2019-10-16T06:08:27+00:00", "value": 0.0010396789381106582, "unit": ""}, {"name": "gate_length", "date": "2019-10-16T06:22:30+00:00", "value": 71.11111111111111, "unit": "ns"}], "qubits": [3]}, {"name": "id_4", "gate": "id", "parameters": [{"name": "gate_error", "date": "2019-10-16T06:08:27+00:00", "value": 0.0007731054928936085, "unit": ""}, {"name": "gate_length", "date": "2019-10-16T06:22:30+00:00", "value": 35.55555555555556, "unit": "ns"}], "qubits": [4]}, {"name": "u1_4", "gate": "u1", "parameters": [{"name": "gate_error", "date": "2019-10-16T06:08:27+00:00", "value": 0.0, "unit": ""}, {"name": "gate_length", "date": "2019-10-16T06:22:30+00:00", "value": 0.0, "unit": "ns"}], "qubits": [4]}, {"name": "u2_4", "gate": "u2", "parameters": [{"name": "gate_error", "date": "2019-10-16T06:08:27+00:00", "value": 0.0007731054928936085, "unit": ""}, {"name": "gate_length", "date": "2019-10-16T06:22:30+00:00", "value": 35.55555555555556, "unit": "ns"}], "qubits": [4]}, {"name": "u3_4", "gate": "u3", "parameters": [{"name": "gate_error", "date": "2019-10-16T06:08:27+00:00", "value": 0.001546210985787217, "unit": ""}, {"name": "gate_length", "date": "2019-10-16T06:22:30+00:00", "value": 71.11111111111111, "unit": "ns"}], "qubits": [4]}, {"name": "cx0_1", "gate": "cx", "parameters": [{"name": "gate_error", "date": "2019-10-16T06:10:23+00:00", "value": 0.009675280360838395, "unit": ""}, {"name": "gate_length", "date": "2019-10-16T06:22:30+00:00", "value": 348.4444444444444, "unit": "ns"}], "qubits": [0, 1]}, {"name": "cx1_0", "gate": "cx", "parameters": [{"name": "gate_error", "date": "2019-10-16T06:10:23+00:00", "value": 0.009675280360838395, "unit": ""}, {"name": "gate_length", "date": "2019-10-16T06:22:30+00:00", "value": 348.4444444444444, "unit": "ns"}], "qubits": [1, 0]}, {"name": "cx1_2", "gate": "cx", "parameters": [{"name": "gate_error", "date": "2019-10-16T06:14:23+00:00", "value": 0.006942447193059004, "unit": ""}, {"name": "gate_length", "date": "2019-10-16T06:22:30+00:00", "value": 227.55555555555554, "unit": "ns"}], "qubits": [1, 2]}, {"name": "cx1_3", "gate": "cx", "parameters": [{"name": "gate_error", "date": "2019-10-16T06:18:28+00:00", "value": 0.012781729903015071, "unit": ""}, {"name": "gate_length", "date": "2019-10-16T06:22:30+00:00", "value": 462.2222222222222, "unit": "ns"}], "qubits": [1, 3]}, {"name": "cx2_1", "gate": "cx", "parameters": [{"name": "gate_error", "date": "2019-10-16T06:14:23+00:00", "value": 0.006942447193059004, "unit": ""}, {"name": "gate_length", "date": "2019-10-16T06:22:30+00:00", "value": 227.55555555555554, "unit": "ns"}], "qubits": [2, 1]}, {"name": "cx3_1", "gate": "cx", "parameters": [{"name": "gate_error", "date": "2019-10-16T06:18:28+00:00", "value": 0.012781729903015071, "unit": ""}, {"name": "gate_length", "date": "2019-10-16T06:22:30+00:00", "value": 462.2222222222222, "unit": "ns"}], "qubits": [3, 1]}, {"name": "cx3_4", "gate": "cx", "parameters": [{"name": "gate_error", "date": "2019-10-16T06:22:30+00:00", "value": 0.0070733452899932325, "unit": ""}, {"name": "gate_length", "date": "2019-10-16T06:22:30+00:00", "value": 270.22222222222223, "unit": "ns"}], "qubits": [3, 4]}, {"name": "cx4_3", "gate": "cx", "parameters": [{"name": "gate_error", "date": "2019-10-16T06:22:30+00:00", "value": 0.0070733452899932325, "unit": ""}, {"name": "gate_length", "date": "2019-10-16T06:22:30+00:00", "value": 270.22222222222223, "unit": "ns"}], "qubits": [4, 3]}], "backend_name": "ibmq_vigo", "backend_version": "1.0.1", "last_update_date": "2019-10-16T06:22:30+00:00", "general": [], "qubits": [[{"name": "T1", "date": "2019-10-16T06:06:08+00:00", "value": 70.68917259689157, "unit": "\u00b5s"}, {"name": "T2", "date": "2019-08-09T16:59:15+00:00", "value": 18.38638524492989, "unit": "\u00b5s"}, {"name": "frequency", "date": "2019-10-16T06:22:30+00:00", "value": 4.79596103128903, "unit": "GHz"}, {"name": "readout_error", "date": "2019-10-16T06:05:50+00:00", "value": 0.07899999999999996, "unit": ""}, {"name": "prob_meas0_prep1", "date": "2019-10-16T06:05:50+00:00", "value": 0.06399999999999995, "unit": ""}, {"name": "prob_meas1_prep0", "date": "2019-10-16T06:05:50+00:00", "value": 0.094, "unit": ""}], [{"name": "T1", "date": "2019-10-16T06:06:08+00:00", "value": 98.60468683197823, "unit": "\u00b5s"}, {"name": "T2", "date": "2019-10-16T06:07:38+00:00", "value": 134.22307255375856, "unit": "\u00b5s"}, {"name": "frequency", "date": "2019-10-16T06:22:30+00:00", "value": 4.940048118160465, "unit": "GHz"}, {"name": "readout_error", "date": "2019-10-16T06:05:50+00:00", "value": 0.013000000000000012, "unit": ""}, {"name": "prob_meas0_prep1", "date": "2019-10-16T06:05:50+00:00", "value": 0.022, "unit": ""}, {"name": "prob_meas1_prep0", "date": "2019-10-16T06:05:50+00:00", "value": 0.0040000000000000036, "unit": ""}], [{"name": "T1", "date": "2019-10-16T06:06:08+00:00", "value": 138.11865391954476, "unit": "\u00b5s"}, {"name": "T2", "date": "2019-10-15T06:08:31+00:00", "value": 108.00879361397641, "unit": "\u00b5s"}, {"name": "frequency", "date": "2019-10-16T06:22:30+00:00", "value": 4.833249502714023, "unit": "GHz"}, {"name": "readout_error", "date": "2019-10-16T06:05:50+00:00", "value": 0.017000000000000015, "unit": ""}, {"name": "prob_meas0_prep1", "date": "2019-10-16T06:05:50+00:00", "value": 0.02200000000000002, "unit": ""}, {"name": "prob_meas1_prep0", "date": "2019-10-16T06:05:50+00:00", "value": 0.012, "unit": ""}], [{"name": "T1", "date": "2019-10-16T06:06:08+00:00", "value": 65.73158590716808, "unit": "\u00b5s"}, {"name": "T2", "date": "2019-10-16T06:06:59+00:00", "value": 71.33222205581698, "unit": "\u00b5s"}, {"name": "frequency", "date": "2019-10-16T06:22:30+00:00", "value": 4.807990365982154, "unit": "GHz"}, {"name": "readout_error", "date": "2019-10-16T06:05:50+00:00", "value": 0.019000000000000017, "unit": ""}, {"name": "prob_meas0_prep1", "date": "2019-10-16T06:05:50+00:00", "value": 0.028000000000000025, "unit": ""}, {"name": "prob_meas1_prep0", "date": "2019-10-16T06:05:50+00:00", "value": 0.01, "unit": ""}], [{"name": "T1", "date": "2019-10-16T06:06:08+00:00", "value": 121.30447979603545, "unit": "\u00b5s"}, {"name": "T2", "date": "2019-10-15T06:09:21+00:00", "value": 48.84570520106248, "unit": "\u00b5s"}, {"name": "frequency", "date": "2019-10-16T06:22:30+00:00", "value": 4.749898910235787, "unit": "GHz"}, {"name": "readout_error", "date": "2019-10-16T06:05:50+00:00", "value": 0.020000000000000018, "unit": ""}, {"name": "prob_meas0_prep1", "date": "2019-10-16T06:05:50+00:00", "value": 0.03, "unit": ""}, {"name": "prob_meas1_prep0", "date": "2019-10-16T06:05:50+00:00", "value": 0.010000000000000009, "unit": ""}]]} \ No newline at end of file diff --git a/qiskit/test/mock/props_vigo.py b/qiskit/test/mock/props_vigo.py deleted file mode 100644 index 26dd752fc6cf..000000000000 --- a/qiskit/test/mock/props_vigo.py +++ /dev/null @@ -1,62 +0,0 @@ -# -*- coding: utf-8 -*- - -# This code is part of Qiskit. -# -# (C) Copyright IBM 2019. -# -# 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 Vigo device (5 qubit). -""" - -import os -import json - -from qiskit.providers.models import (GateConfig, QasmBackendConfiguration, - BackendProperties) -from .fake_backend import FakeBackend - - -class FakeVigo(FakeBackend): - """A fake 5 qubit backend.""" - - def __init__(self): - """ - 0 ↔ 1 ↔ 3 ↔ 4 - ↕ - 2 - """ - cmap = [[0, 1], [1, 0], [1, 2], [1, 3], [2, 1], [3, 1], [3, 4], [4, 3]] - - configuration = QasmBackendConfiguration( - backend_name='fake_vigo', - backend_version='0.0.0', - n_qubits=5, - basis_gates=['u1', 'u2', 'u3', 'cx', 'id'], - simulator=False, - local=True, - conditional=False, - open_pulse=False, - memory=False, - max_shots=65536, - gates=[GateConfig(name='TODO', parameters=[], qasm_def='TODO')], - coupling_map=cmap, - ) - - super().__init__(configuration) - - def properties(self): - """Returns a snapshot of device properties as recorded on 8/30/19. - """ - dirname = os.path.dirname(__file__) - filename = "props_vigo.json" - with open(os.path.join(dirname, filename), "r") as f_prop: - props = json.load(f_prop) - return BackendProperties.from_dict(props)