2.14 Get them all with MixedRoute

💡 Using this tutorial without the Qt GUI

This tutorial uses the desktop MetalGUI. To follow along on Colab, Binder, JupyterHub, or any environment where Qt isn’t available, replace any ``gui.rebuild()`` / ``gui.screenshot()`` call with ``qm.view(design)`` — it renders the design to a matplotlib Figure you can display inline or save with fig.savefig(...).

See 1.4 Headless quick view for a complete runnable walkthrough and `docs/headless-usage.rst <../../docs/headless-usage.rst>`__ for the full reference.

Creates 2 transmon pockets facing each other.

Anchors are user-specified points through which the Routing must pass.

Between anchors you can specify different connection algorythms.

[1]:
%reload_ext autoreload
%autoreload 2
[2]:
from qiskit_metal import designs
from qiskit_metal import MetalGUI, Dict

design = designs.DesignPlanar()
gui = MetalGUI(design)
11:15PM 15s WARNING [_maybe_warn_lite_flip]: [FutureWarning] quantum-metal v0.7.0 will move PySide6, qdarkstyle, pyaedt, pyEPR-quantum, and gmsh out of base dependencies into opt-in extras. To preserve the current v0.6.x install behaviour, run `pip install 'quantum-metal[full]'` before upgrading. See ROADMAP.md and docs/migration-to-v0.7.0.rst for details. Set QISKIT_METAL_SUPPRESS_LITE_FLIP_WARNING=1 to silence.
[3]:
# enable rebuild of the same component
design.overwrite_enabled = True
design.delete_all_components()
[4]:
design.delete_all_components()  # needed only for rebuilds. will get a warning
from qiskit_metal.qlibrary.qubits.transmon_pocket import TransmonPocket

optionsQ = dict(
    pad_width="425 um",
    pocket_height="650um",
    connection_pads=dict(  # pin connectors
        a=dict(loc_W=+1, loc_H=+1),
        b=dict(loc_W=-1, loc_H=+1, pad_height="30um"),
        c=dict(loc_W=+1, loc_H=-1, pad_width="200um"),
        d=dict(loc_W=-1, loc_H=-1, pad_height="50um"),
    ),
)

q0 = TransmonPocket(
    design, "Q0", options=dict(pos_x="-5.0mm", pos_y="0.0mm", **optionsQ)
)
q1 = TransmonPocket(
    design, "Q1", options=dict(pos_x="5.0mm", pos_y="0.0mm", **optionsQ)
)

gui.rebuild()
gui.autoscale()

Single CPW using one meander and 3 simple segments

[5]:
from qiskit_metal.qlibrary.tlines.mixed_path import RouteMixed
import numpy as np
from collections import OrderedDict

ops = dict(fillet="90um")
[6]:
anchors = OrderedDict()
anchors[0] = np.array([-3.0, 1.0])
anchors[1] = np.array([0, 2])
anchors[2] = np.array([3.0, 1])
anchors[3] = np.array([4.0, 0.5])

between_anchors = OrderedDict()  # S, M, PF
between_anchors[0] = "S"
between_anchors[1] = "M"
between_anchors[2] = "S"
between_anchors[3] = "M"
between_anchors[4] = "S"

jogsS = OrderedDict()
jogsS[0] = ["R", "200um"]
jogsS[1] = ["R", "200um"]
jogsS[2] = ["L", "200um"]
jogsS[3] = ["L", "500um"]
jogsS[4] = ["R", "200um"]

jogsE = OrderedDict()
jogsE[0] = ["L", "200um"]
jogsE[1] = ["L", "200um"]
jogsE[2] = ["R", "200um"]
jogsE[3] = ["R", "500um"]
jogsE[4] = ["L", "200um"]


optionsR = {
    "pin_inputs": {
        "start_pin": {"component": "Q0", "pin": "b"},
        "end_pin": {"component": "Q1", "pin": "a"},
    },
    "total_length": "32mm",
    "chip": "main",
    "layer": "1",
    "trace_width": "cpw_width",
    "step_size": "0.25mm",
    "anchors": anchors,
    "between_anchors": between_anchors,
    "advanced": {"avoid_collision": "true"},
    "meander": {"spacing": "200um", "asymmetry": "0um"},
    "snap": "true",
    "lead": {
        "start_straight": "0.3mm",
        "end_straight": "0.3mm",
        "start_jogged_extension": jogsS,
        "end_jogged_extension": jogsE,
    },
    **ops,
}

qa = RouteMixed(design, "line", optionsR)

gui.rebuild()
gui.autoscale()

Single CPW using the pathfinder segments

[7]:
anchors = OrderedDict()
anchors[0] = np.array([-3.0, -1.0])
anchors[1] = np.array([0.2, -2])
anchors[2] = np.array([3.0, -1.7])

between_anchors = OrderedDict()  # S, M, PF
between_anchors[0] = "S"
between_anchors[1] = "S"
between_anchors[2] = "PF"
between_anchors[3] = "S"

jogsS = OrderedDict()
jogsS[0] = ["L", "200um"]
jogsS[1] = ["L", "200um"]
jogsS[2] = ["R", "200um"]
jogsS[3] = ["R", "500um"]
jogsS[4] = ["L", "200um"]

jogsE = OrderedDict()
jogsE[0] = ["R", "200um"]
jogsE[1] = ["R", "200um"]
jogsE[2] = ["L", "200um"]
jogsE[3] = ["L", "500um"]
jogsE[4] = ["R", "200um"]


optionsR = {
    "pin_inputs": {
        "start_pin": {"component": "Q0", "pin": "d"},
        "end_pin": {"component": "Q1", "pin": "c"},
    },
    "total_length": "22mm",
    "chip": "main",
    "layer": "1",
    "trace_width": "cpw_width",
    "step_size": "0.25mm",
    "anchors": anchors,
    "between_anchors": between_anchors,
    "advanced": {"avoid_collision": "true"},
    "meander": {"spacing": "200um", "asymmetry": "0um"},
    "snap": "true",
    "lead": {
        "start_straight": "0.3mm",
        "end_straight": "0.3mm",
        "start_jogged_extension": jogsS,
        "end_jogged_extension": jogsE,
    },
    **ops,
}

qb = RouteMixed(design, "line2", optionsR)

gui.rebuild()
gui.autoscale()
[ ]:
# gui.screenshot()
[8]:
# create an obstacle
TransmonPocket(design, options=dict(pos_x="1.0mm", pos_y="-2.0mm", **optionsQ))
TransmonPocket(design, options=dict(pos_x="1.0mm", pos_y="-1.0mm", **optionsQ))
TransmonPocket(design, options=dict(pos_x="-2.0mm", pos_y="-1.0mm", **optionsQ))

gui.rebuild()
gui.autoscale()
[9]:
gui.screenshot()
../../_images/tut_2-From-components-to-chip_2.14-Get-them-all-with-MixedRoute_14_0.png
[10]:
anchors = OrderedDict()
anchors[0] = np.array([0.0, -1.5])

between_anchors = OrderedDict()  # S, M, PF
between_anchors[0] = "S"
between_anchors[1] = "PF"

jogsS = OrderedDict()
jogsS[0] = ["R", "200um"]
jogsS[1] = ["R", "200um"]
jogsS[2] = ["L", "200um"]
jogsS[3] = ["L", "500um"]

jogsE = OrderedDict()
jogsE[0] = ["L", "200um"]
jogsE[1] = ["L", "200um"]
jogsE[2] = ["R", "200um"]
jogsE[3] = ["R", "500um"]

optionsR = {
    "pin_inputs": {
        "start_pin": {"component": "Q0", "pin": "c"},
        "end_pin": {"component": "Q1", "pin": "d"},
    },
    "total_length": "12mm",
    "chip": "main",
    "layer": "1",
    "trace_width": "cpw_width",
    "step_size": "0.25mm",
    "anchors": anchors,
    "between_anchors": between_anchors,
    "advanced": {"avoid_collision": "true"},
    "meander": {"spacing": "200um", "asymmetry": "0um"},
    "snap": "true",
    "lead": {
        "start_straight": "0.3mm",
        "end_straight": "0.3mm",
        "start_jogged_extension": jogsS,
        "end_jogged_extension": jogsE,
    },
    **ops,
}

qc = RouteMixed(design, "line3", optionsR)

gui.rebuild()
gui.autoscale()
[11]:
gui.screenshot()
../../_images/tut_2-From-components-to-chip_2.14-Get-them-all-with-MixedRoute_16_0.png


For more information, review the Introduction to Quantum Computing and Quantum Hardware lectures below

  • Superconducting Qubits I: Quantizing a Harmonic Oscillator, Josephson Junctions Part 1
Lecture Video Lecture Notes Lab
  • Superconducting Qubits I: Quantizing a Harmonic Oscillator, Josephson Junctions Part 2
Lecture Video Lecture Notes Lab
  • Superconducting Qubits I: Quantizing a Harmonic Oscillator, Josephson Junctions Part 3
Lecture Video Lecture Notes Lab
  • Superconducting Qubits II: Circuit Quantum Electrodynamics, Readout and Calibration Methods Part 1
Lecture Video Lecture Notes Lab
  • Superconducting Qubits II: Circuit Quantum Electrodynamics, Readout and Calibration Methods Part 2
Lecture Video Lecture Notes Lab
  • Superconducting Qubits II: Circuit Quantum Electrodynamics, Readout and Calibration Methods Part 3
Lecture Video Lecture Notes Lab