Skip to content

Commit 828e246

Browse files
committed
Add helper
1 parent 80f5064 commit 828e246

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/axiomatic/pic_helpers.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import iklayout
2+
3+
4+
def plot_circuit(component):
5+
"""
6+
Show the interactive component layout with iKlayout.
7+
See: https://pypi.org/project/iklayout/
8+
9+
In order to make this interactive, ensure that you have enabled
10+
interactive widgets. This can be done with %matplotlib widget in
11+
Jupyter notebooks.
12+
13+
Args:
14+
component: GDS factory Component object.
15+
See https://gdsfactory.github.io/gdsfactory/_autosummary/gdsfactory.Component.html
16+
"""
17+
path = component.write_gds().absolute()
18+
19+
return iklayout.show(path)

0 commit comments

Comments
 (0)