qiskit-community / qiskit-metal

Quantum Hardware Design. Open-source project for engineers and scientists to design superconducting quantum devices with ease.
https://qiskit-community.github.io/qiskit-metal/
Apache License 2.0
270 stars 201 forks source link

Old HFSS Renderers have trouble with rendering designs w/ `MultiPlanar`. Something to do w/ junction rendering. #961

Open clarkmiyamoto opened 1 year ago

clarkmiyamoto commented 1 year ago

Information

What is the current behavior?

When running the code below, we get a com error ending w/ a failed creation of a junction from the qgeometry table. This is weird as there are no junctions in our design.

I noticed that I was using MultiPlanar designs, and when I switched it to Planar, everything ran smoothly.

Steps to reproduce the problem

from qiskit_metal import draw, Dict, designs, MetalGUI
from qiskit_metal.designs.design_multiplanar import MultiPlanar

# Design
design = MultiPlanar()
gui = metal.MetalGUI(design)
design.overwrite_enabled = True

otg_opts = Dict(pos_x = '-1250um',
                pos_y = '1200um',
                orientation = '90',
                # width = cpw_width)
)
otg1 = OpenToGround(design, 'otg1', options = otg_opts)

clt1_opts = Dict(prime_width = cpw_width,
                prime_gap = '5.1um',
                second_width = cpw_width,
                second_gap = '5.1um',
                coupling_space = '7.9um',
                coupling_length = '225um',
                open_termination = False,
                orientation = '-90',
                pos_y = '1200um',)
                # down_length = '50um')

clt1 = CoupledLineTee(design, 'clt1', clt1_opts)

cpw1_opts = Dict(pin_inputs = Dict(start_pin = Dict(component = 'clt1',
                                                    pin = 'second_end'),
                                   end_pin = Dict(component = 'otg1',
                                               pin = 'open')),
                lead = Dict(start_straight = '50um'),
                fillet = '49.9um',
                total_length = '3815um',
                trace_width = cpw_width,
                meander = Dict(spacing = '100um'),
                trace_gap = '5.1um')
cpw1 = RouteMeander(design, 'cpw1', options = cpw1_opts)

# HFSS Analysis
from qiskit_metal.analyses.simulation import ScatteringImpedanceSim
em1 = ScatteringImpedanceSim(design, "hfss")

# Start HFSS Renderer
hfss = em1.renderer
hfss.start()

# render the design
hfss.clean_active_design()
hfss.render_design(selection=['cpw1'])

What is the expected behavior?

Should just render design to ANSYS.

Suggested solutions

Apon initializing the old ansys renderer, perform a check which flags a user if they're using a MultiPlanar design instead of a Planar Design. However I'm unsure if this will scale properly, will need to add checks for when people add new design types. Also unsure how FlipChip works, if that needs to be support.

Would appreciate feedback before attempting solution.