Skip to content

Commit

Permalink
test: fix non-deterministic badger test (#245)
Browse files Browse the repository at this point in the history
We shouldn't check the optimised circuit vs a fixed output.

This fixes some spurious test failures:

https://github.com/CQCL/tket2/actions/runs/6876784637/job/18703089884?pr=244
  • Loading branch information
aborgna-q committed Nov 15, 2023
1 parent 5d213b7 commit f2d4c7e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tket2/src/optimiser/badger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -480,8 +480,7 @@ mod tests {

#[rstest]
fn rz_rz_cancellation_parallel(rz_rz: Hugr, badger_opt: DefaultBadgerOptimiser) {
let opt_rz = badger_opt.optimise(&rz_rz, Some(0), 2.try_into().unwrap(), false, 4);
// No optimization done due to the zero timeout.
assert_eq!(gates(&opt_rz), vec![T2Op::RzF64, T2Op::RzF64]);
let mut opt_rz = badger_opt.optimise(&rz_rz, Some(0), 2.try_into().unwrap(), false, 4);
opt_rz.update_validate(&REGISTRY).unwrap();
}
}

0 comments on commit f2d4c7e

Please sign in to comment.