Skip to content

Commit 89a217c

Browse files
authored
Merge pull request #12 from Axiomatic-AI/add-iklayout-2
Add iklayout
2 parents 80f5064 + 4874a7b commit 89a217c

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

.fernignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# Specify files that shouldn't be modified by Fern
22
src/axiomatic/axtract.py
3-
src/axiomatic/magic.py
3+
src/axiomatic/magic.py
4+
src/axiomatic/pic_helpers.py

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 # type: ignore
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)