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
276 stars 205 forks source link

812 handler ls - allow for future usage for layers on a chip. #813

Closed priti-ashvin-shah-ibm closed 2 years ago

priti-ashvin-shah-ibm commented 2 years ago

What are the issues this pull addresses (issue numbers / links)?

Closes #812 when merged.

Did you add tests to cover your changes (yes/no)?

no

Did you update the documentation accordingly (yes/no)?

There are docstrings with the code.

Did you read the CONTRIBUTING document (yes/no)?

yes

Summary

Details and comments

To use this class, this is an example.


import qiskit_metal as metal
from qiskit_metal import designs, draw
from qiskit_metal import MetalGUI, Dict, open_docs
from qiskit_metal.toolbox_metal.layer_stack_handler import LayerStackHandler
design = designs.DesignPlanar()

#lsh = LayerStackHandler(design)
lsh = LayerStackHandler(design, "../resources/layer_stack_data_example.csv")
print(lsh.ls_df)

material, fill, z_coord, thickness, chip_name = lsh.get_properties_for_layer_datatype(
    ['material', 'fill', 'z_coord', 'thickness', 'chip_name'], 1)

print(f'{material},{fill},{z_coord},{thickness}, {chip_name}')

material, fill, z_coord, chip_name, thickness = lsh.get_properties_for_layer_datatype(
    ['material', 'fill', 'z_coord', 'chip_name', 'thickness'], 4, 0)

print(f'{material},{fill},{z_coord},{chip_name},{thickness}')