Coverage for qpdk / samples / route_with_airbridges.py: 100%

2 statements  

« prev     ^ index     » next       coverage.py v7.13.4, created at 2026-03-14 10:27 +0000

1# --- 

2# jupyter: 

3# jupytext: 

4# text_representation: 

5# extension: .py 

6# format_name: percent 

7# format_version: '1.3' 

8# jupytext_version: 1.17.3 

9# --- 

10 

11# %% [markdown] 

12# # Routing with Airbridges Example 

13# 

14# This example demonstrates how to use airbridges in quantum circuit routing to prevent slot mode propagation and reduce crosstalk between transmission lines. 

15 

16# %% 

17import gdsfactory as gf 

18 

19from qpdk import PDK, cells, tech 

20 

21# %% [markdown] 

22# ## Main Example 

23# 

24# Creates two launcher components and routes between them using coplanar waveguides with airbridges. 

25 

26# %% 

27if __name__ == "__main__": 

28 PDK.activate() 

29 

30 # Create a component to demonstrate routing with airbridges 

31 c = gf.Component() 

32 

33 # Create two launcher components for connection 

34 launcher1 = c << cells.launcher() 

35 launcher1.move((-300, 0)) 

36 launcher2 = c << cells.launcher() 

37 launcher2.rotate(270) 

38 

39 # Position the second launcher in a simpler way 

40 launcher2.move((1000, 1000)) 

41 

42 # Create CPW cross-section with airbridges 

43 cpw_with_bridges = cells.cpw_with_airbridges( 

44 airbridge_spacing=60.0, # Airbridge every 60 µm 

45 airbridge_padding=20.0, # 20 µm from start to first airbridge 

46 ) 

47 

48 # Route between the launchers using the CPW with airbridges 

49 route = tech.route_bundle( 

50 c, 

51 [launcher1.ports["o1"]], 

52 [launcher2.ports["o1"]], 

53 cross_section=cpw_with_bridges, 

54 waypoints=[(500, 0), (500, 800)], 

55 ) 

56 

57 c.show() 

58 

59 print("Routing with airbridges example created successfully!")