Skip to content
This repository was archived by the owner on Aug 21, 2023. It is now read-only.

Commit d6eaa6d

Browse files
authored
get gate lengths directly from backend
getting gate lengths directly from backend is now supported on all devices, so i removed the use of gate_times (which was deprecated in favor of gate_lengths anyway in the case that someone wants to manually specify the gate lengths) i also removed a stray reference to Melbourne since it appears this was most recently run on Essex.
1 parent 63f6d52 commit d6eaa6d

1 file changed

Lines changed: 3 additions & 27 deletions

File tree

qiskit/advanced/aer/2_device_noise_simulation.ipynb

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
"cell_type": "markdown",
103103
"metadata": {},
104104
"source": [
105-
"We will use the `ibmq_16_melbourne` device for this tutorial. We may get the properties of the backend using the `properties` method, the information in the returned `BackendProperties` object will be used to automatically generate a noise model for the device that can be used by the Qiskit Aer `QasmSimulator`. We will also want to get the `coupling_map` for the device from its `configuration` to use when compiling circuits for simulation to most closely mimic the gates that will be executed on a real device."
105+
"We will use the `ibmq_essex` device for this tutorial. We may get the properties of the backend using the `properties` method, the information in the returned `BackendProperties` object will be used to automatically generate a noise model for the device that can be used by the Qiskit Aer `QasmSimulator`. We will also want to get the `coupling_map` for the device from its `configuration` to use when compiling circuits for simulation to most closely mimic the gates that will be executed on a real device."
106106
]
107107
},
108108
{
@@ -189,9 +189,7 @@
189189
"\n",
190190
"For the readout errors the probability that the recorded classical bit value will be flipped from the true outcome after a measurement is given by the qubit `readout_errors`.\n",
191191
"\n",
192-
"Let us construct the device noise model.\n",
193-
"\n",
194-
"**Note:** *Since the devices don't currently provide the gate times for gates we will manually provide them for the gates we are interested in using with the optional `gate_times` argument for `basic_device_noise_model`.*"
192+
"Let us construct the device noise model.\n"
195193
]
196194
},
197195
{
@@ -214,33 +212,11 @@
214212
" Qubits with noise: [0, 1, 2, 3, 4]\n",
215213
" Specific qubit errors: [('id', [0]), ('id', [1]), ('id', [2]), ('id', [3]), ('id', [4]), ('u2', [0]), ('u2', [1]), ('u2', [2]), ('u2', [3]), ('u2', [4]), ('u3', [0]), ('u3', [1]), ('u3', [2]), ('u3', [3]), ('u3', [4]), ('cx', [0, 1]), ('cx', [1, 0]), ('cx', [1, 2]), ('cx', [1, 3]), ('cx', [2, 1]), ('cx', [3, 1]), ('cx', [3, 4]), ('cx', [4, 3]), ('measure', [0]), ('measure', [1]), ('measure', [2]), ('measure', [3]), ('measure', [4])]\n"
216214
]
217-
},
218-
{
219-
"name": "stderr",
220-
"output_type": "stream",
221-
"text": [
222-
"C:\\Users\\PaulNation\\Anaconda3\\lib\\site-packages\\qiskit\\providers\\aer\\noise\\device\\models.py:114: DeprecationWarning: gate_times kwarg is deprecated and will be removed in a future release. Use gate_lengths kwarg instead.\n",
223-
" DeprecationWarning)\n"
224-
]
225215
}
226216
],
227217
"source": [
228-
"# List of gate times for ibmq_14_melbourne device\n",
229-
"# Note that the None parameter for u1, u2, u3 is because gate\n",
230-
"# times are the same for all qubits\n",
231-
"gate_times = [\n",
232-
" ('u1', None, 0), ('u2', None, 100), ('u3', None, 200),\n",
233-
" ('cx', [1, 0], 678), ('cx', [1, 2], 547), ('cx', [2, 3], 721),\n",
234-
" ('cx', [4, 3], 733), ('cx', [4, 10], 721), ('cx', [5, 4], 800),\n",
235-
" ('cx', [5, 6], 800), ('cx', [5, 9], 895), ('cx', [6, 8], 895),\n",
236-
" ('cx', [7, 8], 640), ('cx', [9, 8], 895), ('cx', [9, 10], 800),\n",
237-
" ('cx', [11, 10], 721), ('cx', [11, 3], 634), ('cx', [12, 2], 773),\n",
238-
" ('cx', [13, 1], 2286), ('cx', [13, 12], 1504), ('cx', [], 800)\n",
239-
"]\n",
240-
"\n",
241218
"# Construct the noise model from backend properties\n",
242-
"# and custom gate times\n",
243-
"noise_model = noise.device.basic_device_noise_model(properties, gate_times=gate_times)\n",
219+
"noise_model = noise.device.basic_device_noise_model(properties)\n",
244220
"print(noise_model)"
245221
]
246222
},

0 commit comments

Comments
 (0)