pasqal-io / pyqtorch

PyTorch-based state vector simulator
https://pasqal-io.github.io/pyqtorch/
Apache License 2.0
45 stars 15 forks source link

[Refact] NoiseProtocol with list of noise types #279

Closed jpmoutinho closed 2 months ago

jpmoutinho commented 2 months ago

Closes https://github.com/pasqal-io/pyqtorch/issues/252

jpmoutinho commented 2 months ago

@EthanObadia did a bit of a refactor in the NoiseProtocol to allow a single protocol to hold the info of various noise instances.

Note that for the code that you have running directly on PyQ this breaks the interface. But it should be easy to adapt. Let me know if you have any comments :)

jpmoutinho commented 2 months ago

Hey @EthanObadia, thanks for the comment :)

In fact that is kind of the intended behaviour, but it was a quick fix. The idea was just that I didn't want to spam a huge string everywhere, so for every protocol that has 2 or more noise instances it just prints the length of the protocol. Maybe you have a better idea...