You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/tutorials/google/start.ipynb
+58-15
Original file line number
Diff line number
Diff line change
@@ -346,6 +346,62 @@
346
346
"print(hw_circuit)"
347
347
]
348
348
},
349
+
{
350
+
"cell_type": "markdown",
351
+
"source": [
352
+
"Among these best practices, we will highlight two important ones.\n",
353
+
"\n",
354
+
"First, if your circuit uses more than one qubit, you can map the circuit onto the grid of the quantum processor in a way that accounts for its topology. You can do this as follows:"
355
+
],
356
+
"metadata": {
357
+
"id": "e-tOIGJD9c9_"
358
+
}
359
+
},
360
+
{
361
+
"cell_type": "code",
362
+
"source": [
363
+
"device_graph = device.metadata.nx_graph\n",
364
+
"router = cirq.RouteCQC(device_graph)\n",
365
+
"hw_circuit = router(circuit)\n",
366
+
"print(hw_circuit)"
367
+
],
368
+
"metadata": {
369
+
"id": "LQh5D_Mx9hvk"
370
+
},
371
+
"execution_count": null,
372
+
"outputs": []
373
+
},
374
+
{
375
+
"cell_type": "markdown",
376
+
"source": [
377
+
"Second, if your quantum processor is calibrated to do a specific set of gates, you will need to transform your circuit into that gateset. For example, for a CZ gateset, you can do the following."
0 commit comments