MrMustard
MrMustard copied to clipboard
Quadrature methods for circuit components and states
Context: We would like convenience methods for evaluating the quadrature basis representation of circuit components and states.
Description of the Change:
- renames the
quadrature
method for circuit components toquadrature_triple
- adds a new
quadrature
method for circuit components with 1 or 2 wires to evaluate the quadrature basis function over an array of points. This works for Bargmann and Fock representations, batched or unbatched. - adds a new
quadrature_distribution
method for Ket and DM to evaluate the quadrature basis probability distribution over an array of points. This works for Bargmann and Fock representations, batched or unbatched.
Benefits:
- Convenient methods for users
- Quadrature methods now work for Fock representation
Possible Drawbacks:
- Only 1 and 2 wire objects for now
Related GitHub Issues: