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

Commit fccf790

Browse files
committed
Remove f-strings
1 parent 03eaef7 commit fccf790

1 file changed

Lines changed: 44 additions & 34 deletions

File tree

qiskit/advanced/terra/programming_with_pulses/gathering_system_information.ipynb

Lines changed: 44 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,14 @@
7474
"config = backend.configuration()\n",
7575
"\n",
7676
"# Basic Features\n",
77-
"print(f\"This backend is called {config.backend_name}, and is on version {config.backend_version}. \"\n",
78-
" f\"It has {config.n_qubits} qubit{'' if config.n_qubits == 1 else 's'}. It \"\n",
79-
" f\"{'supports' if config.open_pulse else 'does not support'} OpenPulse programs. The basis \"\n",
80-
" f\"gates supported on this device are {config.basis_gates}.\")"
77+
"print(\"This backend is called {0}, and is on version {1}. It has {2} qubit{3}. It \"\n",
78+
" \"{4} OpenPulse programs. The basis gates supported on this device are {5}.\"\n",
79+
" \"\".format(config.backend_name,\n",
80+
" config.backend_version,\n",
81+
" config.n_qubits,\n",
82+
" '' if config.n_qubits == 1 else 's',\n",
83+
" 'supports' if config.open_pulse else 'does not support',\n",
84+
" config.basis_gates))"
8185
]
8286
},
8387
{
@@ -312,12 +316,18 @@
312316
" ns = 1e9\n",
313317
" GHz = 1e-9\n",
314318
"\n",
315-
" print(f\"Qubit {qubit} has a \\n\"\n",
316-
" f\" - T1 time of {properties.t1(qubit) * us} microseconds\\n\"\n",
317-
" f\" - T2 time of {properties.t2(qubit) * us} microseconds\\n\"\n",
318-
" f\" - U2 gate error of {properties.gate_error('u2', qubit)}\\n\"\n",
319-
" f\" - U2 gate duration of {properties.gate_length('u2', qubit) * ns} nanoseconds\\n\"\n",
320-
" f\" - resonant frequency of {properties.frequency(qubit) * GHz} GHz\")\n",
319+
" print(\"Qubit {0} has a \\n\"\n",
320+
" \" - T1 time of {1} microseconds\\n\"\n",
321+
" \" - T2 time of {2} microseconds\\n\"\n",
322+
" \" - U2 gate error of {3}\\n\"\n",
323+
" \" - U2 gate duration of {4} nanoseconds\\n\"\n",
324+
" \" - resonant frequency of {5} GHz\".format(\n",
325+
" qubit,\n",
326+
" properties.t1(qubit) * us,\n",
327+
" properties.t2(qubit) * us,\n",
328+
" properties.gate_error('u2', qubit),\n",
329+
" properties.gate_length('u2', qubit) * ns,\n",
330+
" properties.frequency(qubit) * GHz))\n",
321331
"\n",
322332
"describe_qubit(0, props)"
323333
]
@@ -378,8 +388,8 @@
378388
"q0_meas_freq = defaults.meas_freq_est[0] # Hz\n",
379389
"\n",
380390
"GHz = 1e-9\n",
381-
"print(f\"DriveChannel(0) defaults to a modulation frequency of {q0_freq*GHz} GHz.\")\n",
382-
"print(f\"MeasureChannel(0) defaults to a modulation frequency of {q0_meas_freq*GHz} GHz.\")"
391+
"print(\"DriveChannel(0) defaults to a modulation frequency of {} GHz.\".format(q0_freq * GHz))\n",
392+
"print(\"MeasureChannel(0) defaults to a modulation frequency of {} GHz.\".format(q0_meas_freq * GHz))"
383393
]
384394
},
385395
{
@@ -401,26 +411,26 @@
401411
"output_type": "stream",
402412
"text": [
403413
"<InstructionScheduleMap(1Q instructions:\n",
404-
" q0: {'u3', 'u1', 'MEAS', 'id', 'u2', 'x'}\n",
405-
" q1: {'u3', 'u1', 'MEAS', 'id', 'u2', 'x'}\n",
406-
" q2: {'u3', 'u1', 'MEAS', 'id', 'u2', 'x'}\n",
407-
" q3: {'u3', 'u1', 'MEAS', 'id', 'u2', 'x'}\n",
408-
" q4: {'u3', 'u1', 'MEAS', 'id', 'u2', 'x'}\n",
409-
" q5: {'u3', 'u1', 'MEAS', 'id', 'u2', 'x'}\n",
410-
" q6: {'u3', 'u1', 'MEAS', 'id', 'u2', 'x'}\n",
411-
" q7: {'u3', 'u1', 'MEAS', 'id', 'u2', 'x'}\n",
412-
" q8: {'u3', 'u1', 'MEAS', 'id', 'u2', 'x'}\n",
413-
" q9: {'u3', 'u1', 'MEAS', 'id', 'u2', 'x'}\n",
414-
" q10: {'u3', 'u1', 'MEAS', 'id', 'u2', 'x'}\n",
415-
" q11: {'u3', 'u1', 'MEAS', 'id', 'u2', 'x'}\n",
416-
" q12: {'u3', 'u1', 'MEAS', 'id', 'u2', 'x'}\n",
417-
" q13: {'u3', 'u1', 'MEAS', 'id', 'u2', 'x'}\n",
418-
" q14: {'u3', 'u1', 'MEAS', 'id', 'u2', 'x'}\n",
419-
" q15: {'u3', 'u1', 'MEAS', 'id', 'u2', 'x'}\n",
420-
" q16: {'u3', 'u1', 'MEAS', 'id', 'u2', 'x'}\n",
421-
" q17: {'u3', 'u1', 'MEAS', 'id', 'u2', 'x'}\n",
422-
" q18: {'u3', 'u1', 'MEAS', 'id', 'u2', 'x'}\n",
423-
" q19: {'u3', 'u1', 'MEAS', 'id', 'u2', 'x'}\n",
414+
" q0: {'MEAS', 'x', 'u2', 'u3', 'id', 'u1'}\n",
415+
" q1: {'MEAS', 'x', 'u2', 'u3', 'id', 'u1'}\n",
416+
" q2: {'MEAS', 'x', 'u2', 'u3', 'id', 'u1'}\n",
417+
" q3: {'MEAS', 'x', 'u2', 'u3', 'id', 'u1'}\n",
418+
" q4: {'MEAS', 'x', 'u2', 'u3', 'id', 'u1'}\n",
419+
" q5: {'MEAS', 'x', 'u2', 'u3', 'id', 'u1'}\n",
420+
" q6: {'MEAS', 'x', 'u2', 'u3', 'id', 'u1'}\n",
421+
" q7: {'MEAS', 'x', 'u2', 'u3', 'id', 'u1'}\n",
422+
" q8: {'MEAS', 'x', 'u2', 'u3', 'id', 'u1'}\n",
423+
" q9: {'MEAS', 'x', 'u2', 'u3', 'id', 'u1'}\n",
424+
" q10: {'MEAS', 'x', 'u2', 'u3', 'id', 'u1'}\n",
425+
" q11: {'MEAS', 'x', 'u2', 'u3', 'id', 'u1'}\n",
426+
" q12: {'MEAS', 'x', 'u2', 'u3', 'id', 'u1'}\n",
427+
" q13: {'MEAS', 'x', 'u2', 'u3', 'id', 'u1'}\n",
428+
" q14: {'MEAS', 'x', 'u2', 'u3', 'id', 'u1'}\n",
429+
" q15: {'MEAS', 'x', 'u2', 'u3', 'id', 'u1'}\n",
430+
" q16: {'MEAS', 'x', 'u2', 'u3', 'id', 'u1'}\n",
431+
" q17: {'MEAS', 'x', 'u2', 'u3', 'id', 'u1'}\n",
432+
" q18: {'MEAS', 'x', 'u2', 'u3', 'id', 'u1'}\n",
433+
" q19: {'MEAS', 'x', 'u2', 'u3', 'id', 'u1'}\n",
424434
"Multi qubit instructions:\n",
425435
" (0, 1): {'cx'}\n",
426436
" (1, 0): {'cx'}\n",
@@ -573,8 +583,8 @@
573583
{
574584
"data": {
575585
"text/html": [
576-
"<h3>Version Information</h3><table><tr><th>Qiskit Software</th><th>Version</th></tr><tr><td>Qiskit</td><td>0.15.0</td></tr><tr><td>Terra</td><td>0.13.0.dev0+560ea27</td></tr><tr><td>Aer</td><td>0.4.0</td></tr><tr><td>Ignis</td><td>0.2.0</td></tr><tr><td>Aqua</td><td>0.6.4</td></tr><tr><td>IBM Q Provider</td><td>0.4.6</td></tr><tr><th>System information</th></tr><tr><td>Python</td><td>3.7.6 (default, Dec 30 2019, 19:38:28) \n",
577-
"[Clang 11.0.0 (clang-1100.0.33.16)]</td></tr><tr><td>OS</td><td>Darwin</td></tr><tr><td>CPUs</td><td>6</td></tr><tr><td>Memory (Gb)</td><td>32.0</td></tr><tr><td colspan='2'>Mon Feb 24 14:14:50 2020 EST</td></tr></table>"
586+
"<h3>Version Information</h3><table><tr><th>Qiskit Software</th><th>Version</th></tr><tr><td>Qiskit</td><td>0.15.0</td></tr><tr><td>Terra</td><td>0.13.0.dev0+c9584a3</td></tr><tr><td>Aer</td><td>0.4.0</td></tr><tr><td>Ignis</td><td>0.2.0</td></tr><tr><td>Aqua</td><td>0.6.4</td></tr><tr><td>IBM Q Provider</td><td>0.4.6</td></tr><tr><th>System information</th></tr><tr><td>Python</td><td>3.7.6 (default, Dec 30 2019, 19:38:28) \n",
587+
"[Clang 11.0.0 (clang-1100.0.33.16)]</td></tr><tr><td>OS</td><td>Darwin</td></tr><tr><td>CPUs</td><td>6</td></tr><tr><td>Memory (Gb)</td><td>32.0</td></tr><tr><td colspan='2'>Tue Feb 25 11:37:20 2020 EST</td></tr></table>"
578588
],
579589
"text/plain": [
580590
"<IPython.core.display.HTML object>"

0 commit comments

Comments
 (0)