Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrandhsn committed Aug 16, 2024
1 parent 6a5f389 commit de1ee92
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions crates/accelerate/src/commutation_checker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -655,15 +655,9 @@ impl ToPyObject for CommutationCacheEntry {
fn to_object(&self, py: Python) -> PyObject {
let out_dict = PyDict::new_bound(py);
for (k, v) in self.iter() {
let qubits = PyTuple::new_bound(
py,
k.0.iter()
.map(|q| q.map(|t| t.0))
);
let params0 =
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));
let qubits = PyTuple::new_bound(py, k.0.iter().map(|q| q.map(|t| t.0)));
let params0 = 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));
out_dict
.set_item(
PyTuple::new_bound(py, [qubits, PyTuple::new_bound(py, [params0, params1])]),
Expand Down

0 comments on commit de1ee92

Please sign in to comment.