Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Raynel Sanchez <87539502+raynelfss@users.noreply.github.com>
  • Loading branch information
sbrandhsn and raynelfss authored Aug 16, 2024
1 parent db89660 commit 6a5f389
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions crates/accelerate/src/commutation_checker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -659,12 +659,11 @@ impl ToPyObject for CommutationCacheEntry {
py,
k.0.iter()
.map(|q| q.map(|t| t.0))
.collect::<Vec<Option<u32>>>(),
);
let params0 =
PyTuple::new_bound(py, k.1 .0.iter().map(|pk| pk.0).collect::<Vec<f64>>());
PyTuple::new_bound(py, k.1 .0.iter().map(|pk| pk.0));
let params1 =
PyTuple::new_bound(py, k.1 .1.iter().map(|pk| pk.0).collect::<Vec<f64>>());
PyTuple::new_bound(py, k.1 .1.iter().map(|pk| pk.0));
out_dict
.set_item(
PyTuple::new_bound(py, [qubits, PyTuple::new_bound(py, [params0, params1])]),
Expand Down

0 comments on commit 6a5f389

Please sign in to comment.