Refactors apply_gate and related functions _apply_1q_gate and _apply_2q_gate both from MPS and TTN algorithms so that it exposes a method apply_unitary that allows users to make use of these algorithms without having a list of pytket.Commands.
Refactors CuTensorNetHandle so that there is an explicit destroy method, for users that do not wish to (or cannot) use the with-statement syntactic sugar.
Related issues
This is necessary for integration with PECOS.
Checklist
[x] I have run the tests on a device with GPUs.
[x] I have performed a self-review of my code.
[x] I have commented hard-to-understand parts of my code.
[x] I have made corresponding changes to the public API documentation.
[ ] I have added tests that prove my fix is effective or that my feature works.
[x] I have updated the changelog with any user-facing changes.
Description
apply_gate
and related functions_apply_1q_gate
and_apply_2q_gate
both fromMPS
andTTN
algorithms so that it exposes a methodapply_unitary
that allows users to make use of these algorithms without having a list ofpytket.Command
s.CuTensorNetHandle
so that there is an explicitdestroy
method, for users that do not wish to (or cannot) use thewith
-statement syntactic sugar.Related issues
This is necessary for integration with PECOS.
Checklist