Skip to content

Commit

Permalink
Fix: Docstrings and "no no" in release note
Browse files Browse the repository at this point in the history
  • Loading branch information
raynelfss committed Dec 11, 2024
1 parent 7a6f5f1 commit 64b1644
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions crates/circuit/src/packed_instruction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -537,8 +537,6 @@ impl PackedInstruction {
}
}

// Getters

/// Retrieves an immutable reference to the instruction's underlying operation.
pub fn op(&self) -> &PackedOperation {
&self.op
Expand All @@ -565,8 +563,6 @@ impl PackedInstruction {
&self.py_op
}

// Setters

/// Retrieves a mutable reference to the instruction's underlying operation.
pub fn op_mut(&mut self) -> &mut PackedOperation {
#[cfg(feature = "cache_pygates")]
Expand All @@ -581,7 +577,7 @@ impl PackedInstruction {
&mut self.qubits
}

/// Retrieves an immutable reference to the index under which the interner has stored `clbits`.
/// Retrieves a mutable reference to the index under which the interner has stored `clbits`.
pub fn clbits_mut(&mut self) -> &mut Interned<[Clbit]> {
&mut self.clbits
}
Expand Down Expand Up @@ -731,7 +727,7 @@ impl PackedInstruction {
}

// When cloning a `PackedInstruction` we will need to delete the old cached
// `Gate` to avoid having duplicated references to the same python object.
// operation to avoid having duplicated references to the same python object.
impl Clone for PackedInstruction {
fn clone(&self) -> Self {
Self {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ fixes:
``PackedInstruction``, the principal representation of an instance of :class:`.CircuitInstruction`
in Rust, has been re-organized to discard its cached instance of a python :class:`.Gate` whenever its
operation, parameters, or extra attributes are modified. This results in ``PackedInstruction`` no
no longer having shared references between them.
longer having shared references between them.

0 comments on commit 64b1644

Please sign in to comment.