Skip to content

Commit 0e6105c

Browse files
committed
🎨 allow getting mutable references to the ancillary and garbage vector
1 parent e661759 commit 0e6105c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/mqt-core/ir/QuantumComputation.hpp

+2
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,11 @@ class QuantumComputation {
105105
[[nodiscard]] const std::vector<bool>& getAncillary() const noexcept {
106106
return ancillary;
107107
}
108+
[[nodiscard]] std::vector<bool>& getAncillary() noexcept { return ancillary; }
108109
[[nodiscard]] const std::vector<bool>& getGarbage() const noexcept {
109110
return garbage;
110111
}
112+
[[nodiscard]] std::vector<bool>& getGarbage() noexcept { return garbage; }
111113
[[nodiscard]] std::size_t getNcbits() const noexcept { return nclassics; }
112114
[[nodiscard]] std::string getName() const noexcept { return name; }
113115
[[nodiscard]] const auto& getQuantumRegisters() const noexcept {

0 commit comments

Comments
 (0)