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
272 stars 201 forks source link

2D layers (thickness=0) in Gmsh give problems while rendering #846

Closed AbeerVaishnav13 closed 1 year ago

AbeerVaishnav13 commented 1 year ago

Information

What is the current behavior?

When the layer thickness is given as zero, the following errors occur:

  1. A rectangle should be drawn instead of a box for the layer
  2. Subtract dimension should be 2 instead of 3
  3. An error occurs while fragmenting because the dimension is not properly set.

Steps to reproduce the problem

Set the design.ls.ls_df["thickness"][0] = '0um', and then render the design normally in QGmshRenderer.

What is the expected behavior?

When thickness=0, the renderer should just draw a 2D sheet (rectangle in Gmsh)

Suggested solutions

We need check the thickness of the layer during each of the above operations and separate dim=2 and dim=3 stuff for each.

Bug to PR --> https://github.com/Qiskit/qiskit-metal/pull/815