Skip to content

Commit

Permalink
Fix fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
ciaranra committed Sep 25, 2024
1 parent 4ddc85d commit 9b85eca
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions crates/benchmarks/benches/modules/helpers/rot_surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ type Layout = HashMap<usize, (usize, usize)>;
// TODO: Create a simplified function that generates the list of gates and qubits in the right
// space and time ordering.


#[allow(dead_code)]
struct RotSurface {
distance: usize,
Expand Down Expand Up @@ -48,7 +47,6 @@ fn get_pos2qid(layout: &Layout) -> HashMap<(usize, usize), usize> {
}

impl RotSurface {

#[allow(dead_code)]
pub fn new(distance: usize) -> Self {
let width = distance;
Expand Down Expand Up @@ -81,10 +79,7 @@ impl RotSurface {
}

#[allow(dead_code)]
fn generate_layout(
height: usize,
width: usize,
) -> (Layout, Vec<usize>, Vec<usize>) {
fn generate_layout(height: usize, width: usize) -> (Layout, Vec<usize>, Vec<usize>) {
let lattice_height = 2 * height;
let lattice_width = 2 * width;
let mut layout = HashMap::<usize, (usize, usize)>::new();
Expand Down Expand Up @@ -122,7 +117,10 @@ impl RotSurface {
// ancilla qubit
nid = Self::new_node(&mut layout, &nid, &mut anc_ids, (x, y));
}
} else if x == lattice_width && width % 2 == 1 && ((y != 0 && y & 4 == 0) || ((y - 2) % 4 == 0)) {
} else if x == lattice_width
&& width % 2 == 1
&& ((y != 0 && y & 4 == 0) || ((y - 2) % 4 == 0))
{
// ancilla qubit
nid = Self::new_node(&mut layout, &nid, &mut anc_ids, (x, y));
}
Expand Down

0 comments on commit 9b85eca

Please sign in to comment.