qadence icon indicating copy to clipboard operation
qadence copied to clipboard

[Enhance] Add 'backend' argument to product_state

Open dominikandreasseitz opened this issue 11 months ago • 0 comments

Description:

Refactor [product_state]((https://github.com/pasqal-io/qadence/blob/main/qadence/states.py#L187), such that it accepts a backend: str argument and returns a product state in the backends native representation. A native representation uses native types for the backend in question.

Implementation:

  1. This can for example be achieved by simply using product_block and calling qadence.run on it using the particular requested backend.

  2. Add tests which ensure that your implementation works for the backends pyqtorch and horqrux

dominikandreasseitz avatar Mar 21 '24 15:03 dominikandreasseitz