Skip to content

Remove interior mutability#68

Merged
Aerylia merged 1 commit into
mainfrom
66-remove-interior-mutability
Oct 14, 2025
Merged

Remove interior mutability#68
Aerylia merged 1 commit into
mainfrom
66-remove-interior-mutability

Conversation

@Ectras

@Ectras Ectras commented Sep 25, 2025

Copy link
Copy Markdown
Collaborator

Removes all interior mutability (i.e. RwLocks). This in particular concerns the PauliString struct where the x and z bitvecs were mutable before and the angles in PauliPolynomial that were mutable before.

As motivated in the corresponding issue, interior mutability has a runtime overhead, especially when ensuring thread-safety (RwLock). Also, it bends the Rust rules a bit; while sometimes necessary, it's always nicer if one can manage without such tricks.

Closes #66.

@Ectras Ectras linked an issue Sep 25, 2025 that may be closed by this pull request
@Aerylia Aerylia merged commit 9c2ace5 into main Oct 14, 2025
2 checks passed
@Ectras Ectras deleted the 66-remove-interior-mutability branch October 15, 2025 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove interior mutability

2 participants