Skip to content

Commit

Permalink
Add doc string for width in Rust
Browse files Browse the repository at this point in the history
  • Loading branch information
jlapeyre committed Jun 4, 2024
1 parent 2ffac76 commit 16755cd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/circuit/src/circuit_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,11 @@ impl CircuitData {
self.clbits_native.len()
}

/// Return the width of the circuit. This is the number of qubits plus the
/// number of clbits.
///
/// Returns:
/// int: The width of the circuit.
pub fn width(&self) -> usize {
self.num_qubits() + self.num_clbits()
}
Expand Down

0 comments on commit 16755cd

Please sign in to comment.