NVIDIA / cuQuantum

Home for cuQuantum Python & NVIDIA cuQuantum SDK C++ samples
https://docs.nvidia.com/cuda/cuquantum/
BSD 3-Clause "New" or "Revised" License
320 stars 63 forks source link

Functions for arithmetic operations of two tensor networks #119

Open hanfluid opened 4 months ago

hanfluid commented 4 months ago

Does cuQuantum include efficient functions for implementing arithmetic operations, i.e., addition and subtraction, on two tensor networks?

DmitryLyakh commented 4 months ago

What do you mean exactly? Addition and subtraction of entire tensor networks or something else?

hanfluid commented 4 months ago

For instance, to compute the elementwise sum of a and b, using mps_a and mps_b, where a and b represent two state vectors approximated by the Matrix Product States mps_a and mps_b, respectively.

haidarazzam commented 4 months ago

If you want to (add/subtract/sum elementwise) of one tensor, you can use the cuTENSOR library. cuQuantum performs contraction of a tensor network. if you want to add/subtract a tensor network (more than one tensor) then you might want to do it one by one using the cuTENSOR. Currently cuQuantum doesn't offer such unitary operation on a network.