@@ -195,10 +195,10 @@ def propagate_modes(
195195 ex_r : ComplexArray1D ,
196196 y : float ,
197197 z : FloatArray1D ,
198- sax_backend : sax .BackendOrDefault = "default" ,
198+ sax_backend : sax .BackendLike = "default" ,
199199) -> tuple [ComplexArray2D , FloatArray1D ]:
200200 """Propagate the modes through the cells."""
201- sax_backend = sax .validate_circuit_backend (sax_backend )
201+ actual_sax_backend = sax .into [ sax . Backend ] (sax_backend )
202202 propagations = compute_propagation_s_matrices (modes , cells )
203203 interfaces = compute_interface_s_matrices (
204204 modes ,
@@ -210,9 +210,9 @@ def propagate_modes(
210210 enforce_reciprocity = False ,
211211 )
212212
213- pairs = pi_pairs (propagations , interfaces , sax_backend )
214- l2rs = l2r_matrices (pairs , identity , sax_backend )
215- r2ls = r2l_matrices (pairs , sax_backend )
213+ pairs = pi_pairs (propagations , interfaces , actual_sax_backend )
214+ l2rs = l2r_matrices (pairs , identity , actual_sax_backend )
215+ r2ls = r2l_matrices (pairs , actual_sax_backend )
216216
217217 forwards , backwards = propagate (l2rs , r2ls , ex_l , ex_r )
218218 return plot_fields (modes , cells , forwards , backwards , y , z )
0 commit comments