Skip to content

Commit

Permalink
Update random seed usage in rust code
Browse files Browse the repository at this point in the history
In Qiskit#9132 we updated the random seed parameters in the rust code for
sabre swap to make the seed optional and default to initializing from
entropy if it's not specified. This commit updates the usage to account
for this change on main.
  • Loading branch information
mtreinish committed Nov 15, 2022
1 parent ddaf4ef commit 87f7a57
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/sabre_layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ fn layout_trial(
neighbor_table,
distance_matrix,
heuristic,
seed,
Some(seed),
&mut pass_final_layout,
num_swap_trials,
Some(run_swap_in_parallel),
Expand All @@ -158,7 +158,7 @@ fn layout_trial(
neighbor_table,
distance_matrix,
heuristic,
seed,
Some(seed),
&mut final_layout,
num_swap_trials,
Some(run_swap_in_parallel),
Expand Down
2 changes: 1 addition & 1 deletion src/sabre_swap/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ pub fn build_swap_map_inner(
neighbor_table: &NeighborTable,
dist: &ArrayView2<f64>,
heuristic: &Heuristic,
seed: u64,
seed: Option<u64>,
layout: &mut NLayout,
num_trials: usize,
run_in_parallel: Option<bool>,
Expand Down

0 comments on commit 87f7a57

Please sign in to comment.