qognitive / fast-pauli

Python/C++ library for optimized operations on Pauli matrices and Pauli strings
https://qognitive-fast-pauli.readthedocs-hosted.com/en/latest/
BSD 2-Clause "Simplified" License
10 stars 0 forks source link

Remove pattern `std::mdspan<> const ...` #40

Open jamesETsmith opened 1 month ago

jamesETsmith commented 1 month ago

General

We should remove the pattern std::mdspan<...> const .... For views, the const here doesn't prevent people from modifying the underlying data, just the view itself, which isn't usually a useful restriction.

stand-by commented 1 month ago

I'd suggest to modify our use cases to std::mdspan<const T> where possible. This would preserve the constness of elements and provide “read only” access