@@ -105,16 +105,17 @@ All paramaters are aligned with their respective papers.
105105- `r` - used for `:Cohen` 
106106- `improve_cycles` - used for `IBM` 
107107- `remove_and_improve_cycles` - used for `IBM`, supersedes previous parameter 
108+ - `log_checking` - set to false to intentionally use an `L` that isn't a logical 
108109""" 
109110function  homological_measurement (S:: AbstractStabilizerCodeCSS , L:: CTMatrixTypes ; style:: Symbol  = 
110111    :Xanadu , r:: Int  =  1 , max_iters:: Int  =  50000 , cellulate:: Bool  =  false , improve_cycles:: Bool  = 
111-     true , remove_and_improve_cycles:: Bool  =  false )
112+     true , remove_and_improve_cycles:: Bool  =  false , log_checking :: Bool   =   true )
112113
113114    is_positive (r) ||  throw (DomainError (r, " Must be a positive integer." 
114115    is_positive (max_iters) ||  throw (DomainError (max_iters, " Must be a positive integer." 
115116    L_red =  _remove_empty (L, :rows )
116117    nrows (L_red) ==  1  ||  throw (ArgumentError (" Requires a single logical of the code." 
117-     is_logical (S, L_red) ||  throw (ArgumentError (" The input matrix is not a logical of the code." 
118+     is_logical (S, L_red) ||  ! log_checking  ||   throw (ArgumentError (" The input matrix is not a logical of the code." 
118119    F =  field (S)
119120    Int (order (F)) ==  2  ||  throw (ArgumentError (" Only defined for binary codes." 
120121    n =  length (S)
@@ -164,19 +165,10 @@ function homological_measurement(S::AbstractStabilizerCodeCSS, L::CTMatrixTypes;
164165        end 
165166
166167        r =  ceil (Int, 1  /  Cheeger_constant (_Flint_matrix_to_Julia_int_matrix (HX)))
167- 
168-         if  type ==  :X 
169-             return  _thickened_cone (S, HX, HZ, f1, f0, type, r)
170-         else 
171-             return  _thickened_cone (S, HZ, HX, f1, f0, type, r)
172-         end 
168+         return  _thickened_cone (S, HX, HZ, f1, f0, type, r)
173169    elseif  style ==  :Cohen 
174170        HZ =  zero_matrix (F, 0 , size (HX, 2 ))
175-         if  type ==  :X 
176-             return  _thickened_cone (S, HX, HZ, f1, f0, type, r)
177-         else 
178-             return  _thickened_cone (S, HZ, HX, f1, f0, type, r)
179-         end 
171+         return  _thickened_cone (S, HX, HZ, f1, f0, type, r)
180172    else 
181173        throw (ArgumentError (" Unknown `style` parameter $style " 
182174    end 
0 commit comments