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
283 stars 209 forks source link

Gmsh renderer fails to render design and launch GUI on MacOS #845

Open AbeerVaishnav13 opened 2 years ago

AbeerVaishnav13 commented 2 years ago

Information

What is the current behavior?

When we render a design from Metal to Gmsh using the QGmshRenderer, it fails to render the design and launch Gmsh GUI if Metal GUI is open. Moreover the behaviour is random and it sometimes works and sometimes doesn't.

Steps to reproduce the problem

from qiskit_metal import designs, MetalGUI
from qiskit_metal.qlibrary.qubits.transmon_pocket import TransmonPocket
from qiskit_metal.renderers.renderer_gmsh.gmsh_renderer import QGmshRenderer

design = designs.MultiPlanar({}, True)
gui = MetalGUI(design)
q1 = TransmonPocket(design, 'Q1')
gui.rebuild()

gmsh = QGmshRenderer(design)
gmsh.render_design()
gmsh.launch_gui()

What is the expected behavior?

The Gmsh renderer should render and mesh the design properly and then open the Gmsh GUI to show the rendered design.

Suggested solutions

One possible solution is to modify the conda installation file -- environment.yml, as follows for MacOS.

name: qiskit-metal
channels:
  - conda-forge
dependencies:
  - python>=3.9
  - addict
  - descartes
  - gdspy>=1.5.2
  - geopandas
  - ipython
  - matplotlib
  - numpy
  - pandas
  - pint
  - pyepr-quantum>=0.8.5.7
  - pygments
  - pyside2
  - qutip
  - scipy
  - shapely
  - jupyter
  - scqubits
  - gmsh
  - python-gmsh
  - pip
  - pip:
      - pyaedt

But still the problem only gets solved with render_design and the launch_gui call fails. We need to find out the reason of this and think of a better fix.

Bug to PR --> #815