@@ -34,7 +34,9 @@ struct Args {
3434 // Manifold orientation options
3535 uint64_t det_order_seed;
3636 size_t num_det_orders = 10 ;
37- bool det_order_bfs = true ;
37+ bool det_order_bfs = false ;
38+ bool det_order_index = false ;
39+ bool det_order_coordinate = false ;
3840
3941 // Sampling options
4042 size_t sample_num_shots = 0 ;
@@ -88,6 +90,12 @@ struct Args {
8890 throw std::invalid_argument (" Must provide at least one of --circuit or --dem" );
8991 }
9092
93+ int det_order_flags = int (det_order_bfs) + int (det_order_index) + int (det_order_coordinate);
94+ if (det_order_flags > 1 ) {
95+ throw std::invalid_argument (
96+ " Only one of --det-order-bfs, --det-order-index, or --det-order-coordinate may be set." );
97+ }
98+
9199 int num_data_sources = int (sample_num_shots > 0 ) + int (!in_fname.empty ());
92100 if (num_data_sources != 1 ) {
93101 throw std::invalid_argument (" Requires exactly 1 source of shots." );
@@ -180,8 +188,13 @@ struct Args {
180188 std::cout << " )" << std::endl;
181189 }
182190 }
183- config.det_orders =
184- build_det_orders (config.dem , num_det_orders, det_order_bfs, det_order_seed);
191+ DetOrder order = DetOrder::DetBFS;
192+ if (det_order_index) {
193+ order = DetOrder::DetIndex;
194+ } else if (det_order_coordinate) {
195+ order = DetOrder::DetCoordinate;
196+ }
197+ config.det_orders = build_det_orders (config.dem , num_det_orders, order, det_order_seed);
185198 }
186199
187200 if (sample_num_shots > 0 ) {
@@ -296,21 +309,18 @@ int main(int argc, char* argv[]) {
296309 .metavar (" N" )
297310 .default_value (size_t (1 ))
298311 .store_into (args.num_det_orders );
299- program.add_argument (" --no-det-order-bfs" )
300- .help (" Disable BFS-based detector ordering and use geometric orientation" )
301- .default_value (true )
302- .implicit_value (false )
303- .store_into (args.det_order_bfs );
304312 program.add_argument (" --det-order-bfs" )
305- .action ([&](auto const &) {
306- std::cout << " BFS-based detector ordering is the default now; "
307- " --det-order-bfs is ignored."
308- << std::endl;
309- })
310- .default_value (true )
311- .implicit_value (true )
312- .store_into (args.det_order_bfs )
313- .hidden ();
313+ .help (" Use BFS-based detector ordering (default if no method specified)" )
314+ .flag ()
315+ .store_into (args.det_order_bfs );
316+ program.add_argument (" --det-order-index" )
317+ .help (" Randomly choose increasing or decreasing detector index order" )
318+ .flag ()
319+ .store_into (args.det_order_index );
320+ program.add_argument (" --det-order-coordinate" )
321+ .help (" Random geometric detector orientation ordering" )
322+ .flag ()
323+ .store_into (args.det_order_coordinate );
314324 program.add_argument (" --det-order-seed" )
315325 .help (
316326 " Seed used when initializing the random detector traversal "
0 commit comments