Closed yapolyak closed 1 week ago
OK docs also seem to be failing.
Sorry couldn't sort out all the mypy complaints - the remaining ones are solely about pytket.
An upcoming PR will need to reintroduce the ability to use mutable tensors. To do so in ExpectationValue
, the user will need to have access to an ExpectationValue
object that they keep alive and update by calling the appropriate update_tensors
method. The API will need to change accordingly and either provide a shallow wrapper of NVIDIA's ExpectationValue
object, or inform the user to make use of NVIDIA's API explicitly.
I propose we merge this PR now and defer these changes to a later PR once NVIDIA releases their new API (excepted sometime in July), since it's likely they'll be making the user experience smoother on their side, and hence the option of not wrapping ExpectationValue
being more reasonable.
Thank you guys! Sorry I didn't review it in time, but you seem to be handling it well!
Description
Implemented interface to cutensornet "high-level API", specifically to
State
,NetworkOperator
andExpectation
. Mostly based on examples such as this one, but with some bugs fixed and some uncovered features discussed here and here with cuTN authors.Note that automatic parallelisation (while not available in their examples yet) should be straightforward to achieve.
This shoud be wrapped in a pytket Backend class in a future PR. I also suppose that
Marginal
,Accessor
andSampler
objects deserve to be interfaced to in the future.Related issues
NA
Checklist