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

Fix the .geo_unrolled file to include a warning and add 'SetFactory' method #857

Closed AbeerVaishnav13 closed 2 years ago

AbeerVaishnav13 commented 2 years ago

Information

What is the current behavior?

The exported .geo_unrolled file includes mesh size fields as well which makes it hard for the user to handle all the cases.

Steps to reproduce the problem

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

design = designs.Multiplanar()
q1 = TransmonPocket(design, "Q1")

gmsh = QGmshRenderer(design)
gmsh.render_design()
gmsh.export_geo_unrolled("test.geo_unrolled")
gmsh.close()

What is the expected behavior?

To not include mesh size fields in the .geo_unrolled file and set the factory method to "OpenCASCADE".

Suggested solutions

  1. Add a warning to export .geo_unrolled file before the meshing step.
    
    ...

gmsh = QGmshRenderer(design) gmsh.render_design(mesh_geoms=False) gmsh.export_geo_unrolled("test.geo_unrolled") gmsh.add_mesh() gmsh.close()



2. Add a `SetFactory("OpenCASCADE");` at the top of the exported file manually.