Skip to content

Commit

Permalink
Fix: Adapt to Qiskit#13033
Browse files Browse the repository at this point in the history
  • Loading branch information
raynelfss committed Aug 27, 2024
1 parent 4d12377 commit fec6da4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions crates/circuit/src/dag_circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6203,8 +6203,8 @@ impl DAGCircuit {
dag: StableDiGraph::with_capacity(num_nodes, num_edges),
qregs: PyDict::new_bound(py).unbind(),
cregs: PyDict::new_bound(py).unbind(),
qargs_cache: IndexedInterner::with_capacity(num_qubits),
cargs_cache: IndexedInterner::with_capacity(num_clbits),
qargs_interner: Interner::with_capacity(num_qubits),
cargs_interner: Interner::with_capacity(num_clbits),
qubits: BitData::with_capacity(py, "qubits".to_string(), num_qubits),
clbits: BitData::with_capacity(py, "clbits".to_string(), num_clbits),
global_phase: Param::Float(0.),
Expand Down
8 changes: 4 additions & 4 deletions crates/circuit/src/interner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ where
}

pub fn with_capacity(capacity: usize) -> Self {
Self {
entries: Vec::with_capacity(capacity),
index_lookup: HashMap::with_capacity(capacity),
}
Self(IndexSet::with_capacity_and_hasher(
capacity,
::ahash::RandomState::new(),
))
}
}

Expand Down

0 comments on commit fec6da4

Please sign in to comment.