From c02e49ee3cb152206d3e13ddbf3c1dbcf3e1a632 Mon Sep 17 00:00:00 2001 From: Joaquin Matres <4514346+joamatab@users.noreply.github.com> Date: Fri, 12 Jul 2024 08:38:22 -0400 Subject: [PATCH] fix more tests --- .../test_pdk_settings_ring_double_heater_.yml | 4 +- .../test_pdk_settings_ring_single_heater_.yml | 4 +- .../test_pdk_settings_straight_.yml | 16 ++-- ...st_pdk_settings_via_stack_heater_mtop_.yml | 11 +-- tests/test_netlists.py | 4 +- .../test_netlists_coupler_ring_.yml | 50 +++++------ .../test_netlists_ring_double_.yml | 82 +++++++++---------- .../test_netlists_ring_single_.yml | 66 +++++++-------- .../test_netlists/test_netlists_straight_.yml | 4 +- .../test_netlists_terminator_short_.yml | 6 +- ubcpdk/components.py | 75 +++++++++++++++-- 11 files changed, 186 insertions(+), 136 deletions(-) diff --git a/tests/test_components/test_pdk_settings_ring_double_heater_.yml b/tests/test_components/test_pdk_settings_ring_double_heater_.yml index aa777d6b..c12ec2a1 100644 --- a/tests/test_components/test_pdk_settings_ring_double_heater_.yml +++ b/tests/test_components/test_pdk_settings_ring_double_heater_.yml @@ -1,5 +1,5 @@ info: {} -name: ring_double_heater_G0p2_7039e197 +name: ring_double_heater_G0p2_2d50a6d4 settings: bend: bend_euler coupler_ring: coupler_ring @@ -11,7 +11,7 @@ settings: length_y: 0.2 radius: 10 straight: straight - via_stack: Fvia_stack_Mgdsfactorypcomponentspvia_stack_SS10_10_LM1_HEATER_M2_ROUTER_VNone_None + via_stack: via_stack_heater_mtop via_stack_offset: - 1 - 0 diff --git a/tests/test_components/test_pdk_settings_ring_single_heater_.yml b/tests/test_components/test_pdk_settings_ring_single_heater_.yml index 7c9351d0..b34ad584 100644 --- a/tests/test_components/test_pdk_settings_ring_single_heater_.yml +++ b/tests/test_components/test_pdk_settings_ring_single_heater_.yml @@ -1,5 +1,5 @@ info: {} -name: ring_double_heater_G0p2_9606c000 +name: ring_double_heater_G0p2_8e96fef6 settings: bend: bend_euler coupler_ring: coupler_ring @@ -11,7 +11,7 @@ settings: length_y: 0.01 radius: 10 straight: straight - via_stack: Fvia_stack_Mgdsfactorypcomponentspvia_stack_SS10_10_LM1_HEATER_M2_ROUTER_VNone_None + via_stack: via_stack_heater_mtop via_stack_offset: - 1 - 0 diff --git a/tests/test_components/test_pdk_settings_straight_.yml b/tests/test_components/test_pdk_settings_straight_.yml index 13d9498a..8afb1c75 100644 --- a/tests/test_components/test_pdk_settings_straight_.yml +++ b/tests/test_components/test_pdk_settings_straight_.yml @@ -1,14 +1,12 @@ -function: straight info: - length: 1.0 - route_info_length: 1.0 - route_info_type: xs_sc - route_info_weight: 1.0 - route_info_xs_sc_length: 1.0 + length: 1 + route_info_length: 1 + route_info_type: xs_34e31a19 + route_info_weight: 1 + route_info_xs_34e31a19_length: 1 width: 0.5 -module: ubcpdk.components -name: straight__ubcpdkpcomponents +name: straight_L1_N2_CSxs_sc settings: cross_section: xs_sc - length: 1.0 + length: 1 npoints: 2 diff --git a/tests/test_components/test_pdk_settings_via_stack_heater_mtop_.yml b/tests/test_components/test_pdk_settings_via_stack_heater_mtop_.yml index a53ecf4b..a832ec9c 100644 --- a/tests/test_components/test_pdk_settings_via_stack_heater_mtop_.yml +++ b/tests/test_components/test_pdk_settings_via_stack_heater_mtop_.yml @@ -1,17 +1,8 @@ info: xsize: 10 ysize: 10 -name: via_stack_S10_10_LM1_HE_f3e2bc80 +name: via_stack_heater_mtop_S10_10 settings: - correct_size: true - layers: - - M1_HEATER - - M2_ROUTER size: - 10 - 10 - slot_horizontal: false - slot_vertical: false - vias: - - null - - null diff --git a/tests/test_netlists.py b/tests/test_netlists.py index 37b36d08..1b920d18 100644 --- a/tests/test_netlists.py +++ b/tests/test_netlists.py @@ -29,6 +29,7 @@ "ebeam_BondPad", "add_fiber_array", "add_pads_top", + "add_pads_bot", } cell_names = cells.keys() - skip_test @@ -67,7 +68,7 @@ def test_netlists( if __name__ == "__main__": component_type = "straight_heater_metal" component_type = "gc_te1310_broadband" - component_type = "ring_single" + component_type = "ring_double" connection_error_types = { "optical": ["width_mismatch", "shear_angle_mismatch", "orientation_mismatch"] } @@ -80,6 +81,7 @@ def test_netlists( ) yaml_str = OmegaConf.to_yaml(n, sort_keys=True) c1.delete() + gf.clear_cache() # print(yaml_str) c2 = gf.read.from_yaml(yaml_str) n2 = c2.get_netlist(allow_multiple=True) diff --git a/tests/test_netlists/test_netlists_coupler_ring_.yml b/tests/test_netlists/test_netlists_coupler_ring_.yml index 1bb6aa90..31142495 100644 --- a/tests/test_netlists/test_netlists_coupler_ring_.yml +++ b/tests/test_netlists/test_netlists_coupler_ring_.yml @@ -1,5 +1,5 @@ instances: - coupler90_G0p2_R5_Bbend_7f6b3237_-6625_2725: + coupler90_G0p2_R10_Bben_8e042ed7_-9375_5225: component: coupler90 info: {} settings: @@ -7,9 +7,9 @@ instances: cross_section: strip cross_section_bend: strip gap: 0.2 - radius: 5 + radius: 10 straight: straight - coupler90_G0p2_R5_Bbend_7f6b3237_2625_2725: + coupler90_G0p2_R10_Bben_8e042ed7_5375_5225: component: coupler90 info: {} settings: @@ -17,7 +17,7 @@ instances: cross_section: strip cross_section_bend: strip gap: 0.2 - radius: 5 + radius: 10 straight: straight coupler_straight_L4_G0p2_CSstrip_-2000_350: component: coupler_straight @@ -26,7 +26,7 @@ instances: cross_section: strip gap: 0.2 length: 4 - straight_L3_N2_CSstrip_-10500_0: + straight_L3_N2_CSstrip_-15500_0: component: straight info: length: 3 @@ -39,7 +39,7 @@ instances: cross_section: strip length: 3 npoints: 2 - straight_L3_N2_CSstrip_6500_0: + straight_L3_N2_CSstrip_11500_0: component: straight info: length: 3 @@ -52,27 +52,27 @@ instances: cross_section: strip length: 3 npoints: 2 -name: coupler_ring +name: coupler_ring_G0p2_R10_L_4c94bf2e nets: -- p1: coupler90_G0p2_R5_Bbend_7f6b3237_-6625_2725,o1 +- p1: coupler90_G0p2_R10_Bben_8e042ed7_-9375_5225,o1 p2: coupler_straight_L4_G0p2_CSstrip_-2000_350,o1 -- p1: coupler90_G0p2_R5_Bbend_7f6b3237_-6625_2725,o2 +- p1: coupler90_G0p2_R10_Bben_8e042ed7_-9375_5225,o2 p2: coupler_straight_L4_G0p2_CSstrip_-2000_350,o2 -- p1: coupler90_G0p2_R5_Bbend_7f6b3237_-6625_2725,o4 - p2: straight_L3_N2_CSstrip_-10500_0,o2 -- p1: coupler90_G0p2_R5_Bbend_7f6b3237_2625_2725,o1 +- p1: coupler90_G0p2_R10_Bben_8e042ed7_-9375_5225,o4 + p2: straight_L3_N2_CSstrip_-15500_0,o2 +- p1: coupler90_G0p2_R10_Bben_8e042ed7_5375_5225,o1 p2: coupler_straight_L4_G0p2_CSstrip_-2000_350,o4 -- p1: coupler90_G0p2_R5_Bbend_7f6b3237_2625_2725,o2 +- p1: coupler90_G0p2_R10_Bben_8e042ed7_5375_5225,o2 p2: coupler_straight_L4_G0p2_CSstrip_-2000_350,o3 -- p1: coupler90_G0p2_R5_Bbend_7f6b3237_2625_2725,o4 - p2: straight_L3_N2_CSstrip_6500_0,o1 +- p1: coupler90_G0p2_R10_Bben_8e042ed7_5375_5225,o4 + p2: straight_L3_N2_CSstrip_11500_0,o1 placements: - coupler90_G0p2_R5_Bbend_7f6b3237_-6625_2725: + coupler90_G0p2_R10_Bben_8e042ed7_-9375_5225: mirror: true rotation: 180 x: -4 y: 0 - coupler90_G0p2_R5_Bbend_7f6b3237_2625_2725: + coupler90_G0p2_R10_Bben_8e042ed7_5375_5225: mirror: false rotation: 0 x: 0 @@ -82,18 +82,18 @@ placements: rotation: 0 x: -4 y: 0 - straight_L3_N2_CSstrip_-10500_0: + straight_L3_N2_CSstrip_-15500_0: mirror: false rotation: 0 - x: -12 + x: -17 y: 0 - straight_L3_N2_CSstrip_6500_0: + straight_L3_N2_CSstrip_11500_0: mirror: false rotation: 0 - x: 5 + x: 10 y: 0 ports: - o1: straight_L3_N2_CSstrip_-10500_0,o1 - o2: coupler90_G0p2_R5_Bbend_7f6b3237_-6625_2725,o3 - o3: coupler90_G0p2_R5_Bbend_7f6b3237_2625_2725,o3 - o4: straight_L3_N2_CSstrip_6500_0,o2 + o1: straight_L3_N2_CSstrip_-15500_0,o1 + o2: coupler90_G0p2_R10_Bben_8e042ed7_-9375_5225,o3 + o3: coupler90_G0p2_R10_Bben_8e042ed7_5375_5225,o3 + o4: straight_L3_N2_CSstrip_11500_0,o2 diff --git a/tests/test_netlists/test_netlists_ring_double_.yml b/tests/test_netlists/test_netlists_ring_double_.yml index 08fb1c7b..0200a3c8 100644 --- a/tests/test_netlists/test_netlists_ring_double_.yml +++ b/tests/test_netlists/test_netlists_ring_double_.yml @@ -1,87 +1,87 @@ instances: - coupler_ring_G0p2_R10_L_227a123a_-5_16185: + coupler_ring_G0p2_R10_L_9aa84a70_-2000_16775: component: coupler_ring info: {} settings: bend: bend_euler coupler90: coupler90 coupler_straight: coupler_straight - cross_section: Fcross_section_Mgdsfactorypcross_section_SRM5_CLNone_CONone + cross_section: strip gap: 0.2 length_extension: 3 - length_x: 0.01 + length_x: 4 radius: 10 - coupler_ring_G0p2_R10_L_227a123a_-5_5225: + coupler_ring_G0p2_R10_L_9aa84a70_-2000_5225: component: coupler_ring info: {} settings: bend: bend_euler coupler90: coupler90 coupler_straight: coupler_straight - cross_section: Fcross_section_Mgdsfactorypcross_section_SRM5_CLNone_CONone + cross_section: strip gap: 0.2 length_extension: 3 - length_x: 0.01 + length_x: 4 radius: 10 - straight_L0p01_N2_CSFcr_430c012e_-10010_10705: + straight_L0p6_N2_CSstrip_-14000_11000: component: straight info: - length: 0.01 - route_info_length: 0.01 + length: 0.6 + route_info_length: 0.6 route_info_type: xs_34e31a19 - route_info_weight: 0.01 - route_info_xs_34e31a19_length: 0.01 + route_info_weight: 0.6 + route_info_xs_34e31a19_length: 0.6 width: 0.5 settings: - cross_section: Fcross_section_Mgdsfactorypcross_section_SRM5_CLNone_CONone - length: 0.01 + cross_section: strip + length: 0.6 npoints: 2 - straight_L0p01_N2_CSFcr_430c012e_10000_10705: + straight_L0p6_N2_CSstrip_10000_11000: component: straight info: - length: 0.01 - route_info_length: 0.01 + length: 0.6 + route_info_length: 0.6 route_info_type: xs_34e31a19 - route_info_weight: 0.01 - route_info_xs_34e31a19_length: 0.01 + route_info_weight: 0.6 + route_info_xs_34e31a19_length: 0.6 width: 0.5 settings: - cross_section: Fcross_section_Mgdsfactorypcross_section_SRM5_CLNone_CONone - length: 0.01 + cross_section: strip + length: 0.6 npoints: 2 -name: ring_double_G0p2_R10_LX_199d2a0e +name: ring_double_G0p2_R10_LX4_LY0p6 nets: -- p1: coupler_ring_G0p2_R10_L_227a123a_-5_16185,o2 - p2: straight_L0p01_N2_CSFcr_430c012e_10000_10705,o1 -- p1: coupler_ring_G0p2_R10_L_227a123a_-5_16185,o3 - p2: straight_L0p01_N2_CSFcr_430c012e_-10010_10705,o2 -- p1: coupler_ring_G0p2_R10_L_227a123a_-5_5225,o2 - p2: straight_L0p01_N2_CSFcr_430c012e_-10010_10705,o1 -- p1: coupler_ring_G0p2_R10_L_227a123a_-5_5225,o3 - p2: straight_L0p01_N2_CSFcr_430c012e_10000_10705,o2 +- p1: coupler_ring_G0p2_R10_L_9aa84a70_-2000_16775,o2 + p2: straight_L0p6_N2_CSstrip_10000_11000,o1 +- p1: coupler_ring_G0p2_R10_L_9aa84a70_-2000_16775,o3 + p2: straight_L0p6_N2_CSstrip_-14000_11000,o2 +- p1: coupler_ring_G0p2_R10_L_9aa84a70_-2000_5225,o2 + p2: straight_L0p6_N2_CSstrip_-14000_11000,o1 +- p1: coupler_ring_G0p2_R10_L_9aa84a70_-2000_5225,o3 + p2: straight_L0p6_N2_CSstrip_10000_11000,o2 placements: - coupler_ring_G0p2_R10_L_227a123a_-5_16185: + coupler_ring_G0p2_R10_L_9aa84a70_-2000_16775: mirror: false rotation: 180 - x: -0.01 - y: 21.41 - coupler_ring_G0p2_R10_L_227a123a_-5_5225: + x: -4 + y: 22 + coupler_ring_G0p2_R10_L_9aa84a70_-2000_5225: mirror: false rotation: 0 x: 0 y: 0 - straight_L0p01_N2_CSFcr_430c012e_-10010_10705: + straight_L0p6_N2_CSstrip_-14000_11000: mirror: false rotation: 90 - x: -10.01 + x: -14 y: 10.7 - straight_L0p01_N2_CSFcr_430c012e_10000_10705: + straight_L0p6_N2_CSstrip_10000_11000: mirror: false rotation: 270 x: 10 - y: 10.71 + y: 11.3 ports: - o1: coupler_ring_G0p2_R10_L_227a123a_-5_5225,o1 - o2: coupler_ring_G0p2_R10_L_227a123a_-5_5225,o4 - o3: coupler_ring_G0p2_R10_L_227a123a_-5_16185,o4 - o4: coupler_ring_G0p2_R10_L_227a123a_-5_16185,o1 + o1: coupler_ring_G0p2_R10_L_9aa84a70_-2000_5225,o1 + o2: coupler_ring_G0p2_R10_L_9aa84a70_-2000_5225,o4 + o3: coupler_ring_G0p2_R10_L_9aa84a70_-2000_16775,o4 + o4: coupler_ring_G0p2_R10_L_9aa84a70_-2000_16775,o1 diff --git a/tests/test_netlists/test_netlists_ring_single_.yml b/tests/test_netlists/test_netlists_ring_single_.yml index 46172513..2adc3946 100644 --- a/tests/test_netlists/test_netlists_ring_single_.yml +++ b/tests/test_netlists/test_netlists_ring_single_.yml @@ -1,5 +1,5 @@ instances: - bend_euler_R10_CSFcross_bd306b36_-9375_16675: + bend_euler_R10_CSstrip_-9375_16675: component: bend_euler info: dy: 10 @@ -13,9 +13,9 @@ instances: route_info_weight: 16.637 route_info_xs_38f6dd83_length: 16.637 settings: - cross_section: Fcross_section_Mgdsfactorypcross_section_SRM5_CLNone_CONone + cross_section: strip radius: 10 - bend_euler_R10_CSFcross_bd306b36_5375_16675: + bend_euler_R10_CSstrip_5375_16675: component: bend_euler info: dy: 10 @@ -29,21 +29,21 @@ instances: route_info_weight: 16.637 route_info_xs_38f6dd83_length: 16.637 settings: - cross_section: Fcross_section_Mgdsfactorypcross_section_SRM5_CLNone_CONone + cross_section: strip radius: 10 - coupler_ring_G0p2_R10_L_dd40017f_-2000_5225: + coupler_ring_G0p2_R10_L_9aa84a70_-2000_5225: component: coupler_ring info: {} settings: bend: bend_euler coupler90: coupler90 coupler_straight: coupler_straight - cross_section: Fcross_section_Mgdsfactorypcross_section_SRM5_CLNone_CONone + cross_section: strip gap: 0.2 length_extension: 3 length_x: 4 radius: 10 - straight_L0p6_N2_CSFcro_a6504e23_-14000_11000: + straight_L0p6_N2_CSstrip_-14000_11000: component: straight info: length: 0.6 @@ -53,10 +53,10 @@ instances: route_info_xs_34e31a19_length: 0.6 width: 0.5 settings: - cross_section: Fcross_section_Mgdsfactorypcross_section_SRM5_CLNone_CONone + cross_section: strip length: 0.6 npoints: 2 - straight_L0p6_N2_CSFcro_a6504e23_10000_11000: + straight_L0p6_N2_CSstrip_10000_11000: component: straight info: length: 0.6 @@ -66,10 +66,10 @@ instances: route_info_xs_34e31a19_length: 0.6 width: 0.5 settings: - cross_section: Fcross_section_Mgdsfactorypcross_section_SRM5_CLNone_CONone + cross_section: strip length: 0.6 npoints: 2 - straight_L4_N2_CSFcross_107b0643_-2000_21300: + straight_L4_N2_CSstrip_-2000_21300: component: straight info: length: 4 @@ -79,54 +79,54 @@ instances: route_info_xs_34e31a19_length: 4 width: 0.5 settings: - cross_section: Fcross_section_Mgdsfactorypcross_section_SRM5_CLNone_CONone + cross_section: strip length: 4 npoints: 2 -name: ring_single_G0p2_R10_LX_8bd4db3e +name: ring_single_G0p2_R10_LX4_LY0p6 nets: -- p1: bend_euler_R10_CSFcross_bd306b36_-9375_16675,o1 - p2: straight_L4_N2_CSFcross_107b0643_-2000_21300,o2 -- p1: bend_euler_R10_CSFcross_bd306b36_-9375_16675,o2 - p2: straight_L0p6_N2_CSFcro_a6504e23_-14000_11000,o2 -- p1: bend_euler_R10_CSFcross_bd306b36_5375_16675,o1 - p2: straight_L0p6_N2_CSFcro_a6504e23_10000_11000,o1 -- p1: bend_euler_R10_CSFcross_bd306b36_5375_16675,o2 - p2: straight_L4_N2_CSFcross_107b0643_-2000_21300,o1 -- p1: coupler_ring_G0p2_R10_L_dd40017f_-2000_5225,o2 - p2: straight_L0p6_N2_CSFcro_a6504e23_-14000_11000,o1 -- p1: coupler_ring_G0p2_R10_L_dd40017f_-2000_5225,o3 - p2: straight_L0p6_N2_CSFcro_a6504e23_10000_11000,o2 +- p1: bend_euler_R10_CSstrip_-9375_16675,o1 + p2: straight_L4_N2_CSstrip_-2000_21300,o2 +- p1: bend_euler_R10_CSstrip_-9375_16675,o2 + p2: straight_L0p6_N2_CSstrip_-14000_11000,o2 +- p1: bend_euler_R10_CSstrip_5375_16675,o1 + p2: straight_L0p6_N2_CSstrip_10000_11000,o1 +- p1: bend_euler_R10_CSstrip_5375_16675,o2 + p2: straight_L4_N2_CSstrip_-2000_21300,o1 +- p1: coupler_ring_G0p2_R10_L_9aa84a70_-2000_5225,o2 + p2: straight_L0p6_N2_CSstrip_-14000_11000,o1 +- p1: coupler_ring_G0p2_R10_L_9aa84a70_-2000_5225,o3 + p2: straight_L0p6_N2_CSstrip_10000_11000,o2 placements: - bend_euler_R10_CSFcross_bd306b36_-9375_16675: + bend_euler_R10_CSstrip_-9375_16675: mirror: false rotation: 180 x: -4 y: 21.3 - bend_euler_R10_CSFcross_bd306b36_5375_16675: + bend_euler_R10_CSstrip_5375_16675: mirror: false rotation: 90 x: 10 y: 11.3 - coupler_ring_G0p2_R10_L_dd40017f_-2000_5225: + coupler_ring_G0p2_R10_L_9aa84a70_-2000_5225: mirror: false rotation: 0 x: 0 y: 0 - straight_L0p6_N2_CSFcro_a6504e23_-14000_11000: + straight_L0p6_N2_CSstrip_-14000_11000: mirror: false rotation: 90 x: -14 y: 10.7 - straight_L0p6_N2_CSFcro_a6504e23_10000_11000: + straight_L0p6_N2_CSstrip_10000_11000: mirror: false rotation: 270 x: 10 y: 11.3 - straight_L4_N2_CSFcross_107b0643_-2000_21300: + straight_L4_N2_CSstrip_-2000_21300: mirror: false rotation: 180 x: 0 y: 21.3 ports: - o1: coupler_ring_G0p2_R10_L_dd40017f_-2000_5225,o1 - o2: coupler_ring_G0p2_R10_L_dd40017f_-2000_5225,o4 + o1: coupler_ring_G0p2_R10_L_9aa84a70_-2000_5225,o1 + o2: coupler_ring_G0p2_R10_L_9aa84a70_-2000_5225,o4 diff --git a/tests/test_netlists/test_netlists_straight_.yml b/tests/test_netlists/test_netlists_straight_.yml index d9afa4b0..a64f2ab7 100644 --- a/tests/test_netlists/test_netlists_straight_.yml +++ b/tests/test_netlists/test_netlists_straight_.yml @@ -1,5 +1,5 @@ -connections: {} instances: {} -name: straight__ubcpdkpcomponents +name: straight_L1_N2_CSxs_sc +nets: [] placements: {} ports: {} diff --git a/tests/test_netlists/test_netlists_terminator_short_.yml b/tests/test_netlists/test_netlists_terminator_short_.yml index 6321d7dd..c6585a57 100644 --- a/tests/test_netlists/test_netlists_terminator_short_.yml +++ b/tests/test_netlists/test_netlists_terminator_short_.yml @@ -1,15 +1,15 @@ instances: - Unnamed_281_5000_0: + Unnamed_34_5000_0: component: null info: {} settings: {} name: terminator_short nets: [] placements: - Unnamed_281_5000_0: + Unnamed_34_5000_0: mirror: false rotation: 0 x: 0 y: 0 ports: - o1: Unnamed_281_5000_0,o1 + o1: Unnamed_34_5000_0,o1 diff --git a/ubcpdk/components.py b/ubcpdk/components.py index 18a1f65f..a5968194 100644 --- a/ubcpdk/components.py +++ b/ubcpdk/components.py @@ -608,6 +608,13 @@ def spiral( spacing: float = 3.0, n_loops: int = 6, ) -> gf.Component: + """Returns spiral component. + + Args: + length: length. + spacing: spacing. + n_loops: number of loops. + """ return gf.c.spiral( length=length, spacing=spacing, @@ -617,15 +624,67 @@ def spiral( ) -ring_single = partial( - gf.components.ring_single, - cross_section=tech.xs_sc, - bend=bend, -) -ring_double = partial( - gf.components.ring_double, - cross_section=tech.xs_sc, +coupler90 = partial(gf.components.coupler90, bend=bend_euler, straight=straight) +coupler_straight = partial( + gf.components.coupler_straight, gap=0.2, cross_section="strip" ) + + +@gf.cell +def coupler_ring( + gap: float = 0.2, + radius: float = 10.0, + length_x: float = 4.0, + length_extension: float = 3, + bend=bend, + cross_section="strip", + **kwargs, +) -> Component: + return gf.components.coupler_ring( + gap=gap, + radius=radius, + length_x=length_x, + length_extension=length_extension, + bend=bend, + cross_section=cross_section, + **kwargs, + ) + + +@gf.cell +def ring_single( + gap: float = 0.2, + radius: float = 10.0, + length_x: float = 4.0, + length_y: float = 0.6, +) -> Component: + return gf.components.ring_single( + gap=gap, + radius=radius, + length_x=length_x, + length_y=length_y, + cross_section="strip", + bend=bend, + ) + + +@gf.cell +def ring_double( + gap: float = 0.2, + radius: float = 10.0, + length_x: float = 4.0, + length_y: float = 0.6, +) -> Component: + return gf.components.ring_double( + gap=gap, + radius=radius, + length_x=length_x, + length_y=length_y, + cross_section="strip", + bend=bend, + ) + + ring_double_heater = partial( gf.components.ring_double_heater, via_stack="via_stack_heater_mtop",