From 64b164409bddcde5b6b25ca6a3e5587b0178e2b1 Mon Sep 17 00:00:00 2001 From: Raynel Sanchez <87539502+raynelfss@users.noreply.github.com> Date: Wed, 11 Dec 2024 11:38:46 -0500 Subject: [PATCH] Fix: Docstrings and "no no" in release note --- crates/circuit/src/packed_instruction.rs | 8 ++------ .../notes/fix-packed-instruction-f2620d5aff61269d.yaml | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/crates/circuit/src/packed_instruction.rs b/crates/circuit/src/packed_instruction.rs index 1181139a206d..934f0b0a4b63 100644 --- a/crates/circuit/src/packed_instruction.rs +++ b/crates/circuit/src/packed_instruction.rs @@ -537,8 +537,6 @@ impl PackedInstruction { } } - // Getters - /// Retrieves an immutable reference to the instruction's underlying operation. pub fn op(&self) -> &PackedOperation { &self.op @@ -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")] @@ -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 } @@ -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 { diff --git a/releasenotes/notes/fix-packed-instruction-f2620d5aff61269d.yaml b/releasenotes/notes/fix-packed-instruction-f2620d5aff61269d.yaml index cce8c8e24df5..d5f8ac793544 100644 --- a/releasenotes/notes/fix-packed-instruction-f2620d5aff61269d.yaml +++ b/releasenotes/notes/fix-packed-instruction-f2620d5aff61269d.yaml @@ -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.