Skip to content

Commit

Permalink
Actually return optimised circuit
Browse files Browse the repository at this point in the history
  • Loading branch information
lmondada committed Sep 28, 2023
1 parent b7dd79c commit 8c22a9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/optimiser/taso/pyo3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ impl PyDefaultTasoOptimiser {
let circ_candidates_csv = fs::File::create("best_circs.csv").unwrap();

let taso_logger = TasoLogger::new(circ_candidates_csv);
self.0.optimise_with_log(
let opt_circ = self.0.optimise_with_log(
&circ,
taso_logger,
timeout,
n_threads.unwrap_or(NonZeroUsize::new(1).unwrap()),
);
let ser_circ =
SerialCircuit::encode(&circ).map_err(|e| PyTypeError::new_err(e.to_string()))?;
SerialCircuit::encode(&opt_circ).map_err(|e| PyTypeError::new_err(e.to_string()))?;
let tk1_circ = ser_circ
.to_tket1()
.map_err(|e| PyTypeError::new_err(e.to_string()))?;
Expand Down

0 comments on commit 8c22a9f

Please sign in to comment.