Skip to content

Commit

Permalink
chore: better formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jselig-rigetti committed Aug 22, 2024
1 parent 3946815 commit a761d55
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions quil-rs/src/program/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,14 @@ impl Program {
let p = Program::from_instructions(cal.instructions.to_owned());
let cfg = ControlFlowGraph::from(&p);
let blocks = cfg.into_blocks();
let block = blocks.get(0)?;
Some((
gate.to_owned(),
// TODO: handle error
// NOTE: we need full program to expand calibrations
block.as_schedule_seconds(self).ok()?.duration().to_owned(),
))
let block = blocks.first()?;
// TODO: handle error
// NOTE: we need full program to expand calibrations
let duration = block.as_schedule_seconds(self).ok()?.duration().to_owned();

let gate = gate.to_owned();

Some((gate, duration))
})
.collect::<HashMap<_, _>>())
}
Expand Down

0 comments on commit a761d55

Please sign in to comment.