Skip to content

Commit

Permalink
Fix: Adapt to Qiskit#12730
Browse files Browse the repository at this point in the history
  • Loading branch information
raynelfss committed Jul 24, 2024
1 parent c2eebed commit e1aa330
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/accelerate/src/basis/basis_translator/basis_search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ pub(crate) fn basis_search(
let mut cost_tot = 0;
let borrowed_cost = opt_cost_map.borrow();
for instruction in edge_data.rule.circuit.data.iter() {
cost_tot += borrowed_cost[&(instruction.op.name(), instruction.op.num_qubits())];
let instruction_op = instruction.op.view();
cost_tot += borrowed_cost[&(instruction_op.name(), instruction_op.num_qubits())];
}
Ok(cost_tot
- borrowed_cost[&(edge_data.source.name.as_str(), edge_data.source.num_qubits)])
Expand Down

0 comments on commit e1aa330

Please sign in to comment.