XanaduAI / MrMustard

A differentiable bridge between phase space and Fock space
https://mrmustard.readthedocs.io/
Apache License 2.0
78 stars 27 forks source link

Rich wires #523

Open ziofil opened 4 days ago

ziofil commented 4 days ago

Wires have been challenging to maintain due to evolving requirements.

This PR introduces a better abstraction for Wire that stores a collection of QuantumWire and ClassicalWire dataclasses. Metadata can be added to these dataclasses without modifying the Wires object’s handling of indices and dictionaries. Many methods, like __matmul__, are greatly simplified.