TensorNetwork icon indicating copy to clipboard operation
TensorNetwork copied to clipboard

Add Cholesky decomposition

Open alewis opened this issue 5 years ago • 17 comments

We should support the Cholesky decomposition per https://numpy.org/doc/stable/reference/generated/numpy.linalg.cholesky.html#numpy.linalg.cholesky, adding a pivot argument in the same way as qr and svd.

alewis avatar Oct 12 '20 15:10 alewis

Hello, can this issue be assigned to me?

Dbhasin1 avatar Oct 25 '20 11:10 Dbhasin1

Sure thing!

mganahl avatar Oct 25 '20 11:10 mganahl

Hi @Dbhasin1,

The function and tests first need to be added to the various backends, which live in tensornetwork/backends/blah. The first is the AbstractBackend, a base class that just throws NotImplementedError. The others all wrap functions from other numerical packages, the idea being to provide a means to quickly switch between these.

Inside the backend files you will see many other functions, such as qr. Our QR differs from e.g. NumPy's by the presence of a pivot argument that matricizes the input. Cholesky should have a similar mechanism.

Once added to the backends, the function should also be added to the tn.Tensor interface, which lives in tensornetwork/tensor.py with functions defined in tensornetwork/linalg/blah

alewis avatar Oct 25 '20 15:10 alewis

Hello there @alewis I'm interested in working on this issue has a PR been done? If not I would like to work on this.

LuiGiovanni avatar Dec 05 '20 22:12 LuiGiovanni

Hello, please ignore this PR I made a mistake, the changes implemented for the Cholesky decomposition will be from a different PR.

LuiGiovanni avatar Dec 06 '20 08:12 LuiGiovanni

Hello, I am sorry for the mess but #886 is the correct PR I was working on disregard #885 thank you.

LuiGiovanni avatar Dec 06 '20 18:12 LuiGiovanni

@alewis @mganahl I have added the NotImplementedError function and it's respective test and made a PR for you to review.

LuiGiovanni avatar Dec 06 '20 22:12 LuiGiovanni

Looks good! Just a small fix.

alewis avatar Dec 07 '20 17:12 alewis

@alewis Alright I have made the fix, just waiting on the testing. Also, I will start implementing the Cholesky decomposition, quick question, why does Jax not have it's own decompositions file? Oh, could you add me as an assignee for this issue? Thank you

LuiGiovanni avatar Dec 07 '20 19:12 LuiGiovanni

it uses the numpy decompositions.py file

mganahl avatar Dec 07 '20 21:12 mganahl

Ok, I see, then I will start adding the function to that file and work my way from there, thank you!

LuiGiovanni avatar Dec 07 '20 21:12 LuiGiovanni

hey is this still open? can I work on this?

themnvrao76 avatar Aug 25 '21 03:08 themnvrao76

Is this issue still open? Can I work on it?

prat1999 avatar Aug 25 '21 13:08 prat1999

Hi, can I work on this? I'm new so can someone guide me?

dhivyasreedhar avatar Aug 25 '21 17:08 dhivyasreedhar

Can I work on this issue?

priorigratia avatar Aug 28 '21 22:08 priorigratia

Hello, Can I use this issue as my first contribution? I'm new so please can someone guide me?

ankitasankars avatar Aug 29 '21 13:08 ankitasankars

@prat1999 already opened a PR on this (maybe you guys can work together on this)

mganahl avatar Sep 07 '21 10:09 mganahl