qadence
qadence copied to clipboard
[Enhance] Add 'backend' argument to product_state
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:
-
This can for example be achieved by simply using
product_block
and callingqadence.run
on it using the particular requestedbackend
. -
Add tests which ensure that your implementation works for the backends
pyqtorch
andhorqrux