google / TensorNetwork

A library for easy and efficient manipulation of tensor networks.
Apache License 2.0
1.81k stars 356 forks source link

Add tutorials for basic operations #293

Open chaserileyroberts opened 5 years ago

chaserileyroberts commented 5 years ago

To help with user adoption, we need additional tutorials beyond what we have in the README.

Some nice things to have include:

Aamir1551 commented 5 years ago

Hi I would love to work on this task as a good first issue. I'm just wondering whether the tutorials should be on a new website which we could make and maintain or we should just add these tutorials on the README file we already have. Thanks

chaserileyroberts commented 5 years ago

Awesome! We'd love more tutorials.

You have a couple of choices on how to do it,

  1. Make an .rst file like we did with the tutorial on our readthedocs.
  2. Create a colab. I like this one because it's let's people play around with the library. We've have a very basic example, but we'd certainly love more!
  3. Create a medium article.

Any/all of these options are fine by me. If you get stuck/have questions feel free to email me at chaseriley@google.com

Aamir1551 commented 5 years ago

Thanks, I'l first try creating some medium articles and then try moving on to the colab. Tensor networks are new to me, however ill start with articles about building simple tensor networks and how they work, and then move on to more compilicated networks and so forth. Thanks

chaserileyroberts commented 5 years ago

Awesome! That sounds perfect.

Comment on here a link to your articles and I'll add them to the README and our readthedocs website.

Aamir1551 commented 5 years ago

Hi i've made a medium article for tensor networks introduction. Are there any improvements necessary before this medium article is published.

Link to draft here: https://medium.com/@aamirsoni1551/tensor-networks-intro-5bfb2c770f85 Thanks

chaserileyroberts commented 5 years ago

Thanks for the tutorial!

So 2 things.

  1. You say "finally you will make an AI that uses reinforced machine learning". Tensor networks have (as of yet) never been tried in a reinforcement learning setting, and I fear that saying that will lead readers to the wrong conclusions.
  2. The article is a little basic, and doesn't discuss tensor networks at all. (Not that there is anything wrong with the basics!) When discussing matrix multiplications and traces, I think it would be a good idea to point it back to their graphical notation with a tensor network. I would also drop the discussion around how a matrix multiplication works, as I assume most of the readers already understand that. And if they don't, they'll get quickly anyway.
Aamir1551 commented 5 years ago

Wow, thanks for the quick reply.

1) Yea sure I definitely could remove that. 2) I was thinking that I should maybe make a bit of a complete tutorial that takes beginners who knows little algebra to making their own Tensor Networks. So originally, I had planned out the the tutorial to be as follows: Article 1: Tensors Introduction Article 2: Representation of Tensors and Tensor operations as graphs Article 3: Building a Tensor Network from scratch using Tensor Network Article 4: Some application of Tensor Networks

If you want we could still remove the matrix multiplication and traces and add graphs to this first article.

chaserileyroberts commented 5 years ago

I think that should be ok. Let me know when you publish this first article then!

Aamir1551 commented 5 years ago

First article has been published. Link: https://medium.com/@aamirsoni1551/tensor-networks-intro-5bfb2c770f85

Thanks

chaserileyroberts commented 5 years ago

:+1: Once you write your second article we'll include a "tutorials" section of the readme.

Aamir1551 commented 4 years ago

Draft link for the second article: https://medium.com/@aamirsoni1551/penroses-graphical-notation-fe4c2f24cf3b

Are there any improvements required before publishing? Thanks

Aamir1551 commented 4 years ago

Link to the second published article: https://medium.com/@aamirsoni1551/penroses-graphical-notation-fe4c2f24cf3b

sebgrijalva commented 4 years ago

Hello!

I'd like to contribute too with the creation of tutorials. What is the status of this issue?

Can you also comment about the "examples" folder? Does it contain code that we can readily use for learning? In principle I would be creating Colabs and .rst files.

Thanks!

Aamir1551 commented 4 years ago

Hi,

That would be awesome. I am currently working on writing a tutorial on medium that explains how tensor networks work in general to how this particular library can be used to accomplish a certain task.

Colabs and .rst files would be awesome and of huge benefit. Regarding the "examples" folder I am unsure. For that you could email chase at chaseriley@google.com

Thanks for your support!

chaserileyroberts commented 4 years ago

Yes! Basically all of what Aamir said

byronho24 commented 4 years ago

Hi!

I'd also like to contribute to this issue. I would like to contribute a tutorial on implementing some simple MPS algorithms (DMRG and/or TEBD) since I feel like MPS tutorials are still lacking and I have a little bit of expertise on the area (just finished a semester-long research project on it, but am a beginner to the TensorNetwork library). Is there already progress by others on this? If not I'll be more than happy to contribute!

Thanks!

chaserileyroberts commented 4 years ago

That'd be great! Email me if you need any help. chaseriley@google.com

olgOk commented 4 years ago

Hello!

I'd like to contribute to this issue as well. I have created SAT Solver tutorial in Google Colab and would like to hear your feedback to improve it!

Thanks!

sebgrijalva commented 4 years ago

Hello @byronho24 and @olgOk !

I've been building a basic tutorial on MPS and memory scaling as well, and I see you guys have other projects too. I'm planning on writing more tutorials in the future. Would you like to get in touch to read each other's work and also maybe discuss working on additional tutorials together?

Cheers.

sebgrijalva commented 4 years ago

Oh, BTW, here's the tutorial I've been working on, although I feel I want to expand on a couple of things and would also like some feedback to see if the structure makes sense

limapedro commented 4 years ago

I'd like to look in more details about how to implement custom Keras layers, since the performance boost is great enough, is there any sources on how to build Keras layers other than the mnist examples? Other more interesting layers such be Conv1d, Conv2D and LSTMs, Thanks in advance.

chaserileyroberts commented 4 years ago

Building custom keras layers other than ones that implement tensor networks are outside the scope of this repo. I'd recommend asking on the keras repo.

https://github.com/keras-team/keras

parthduggal commented 3 years ago

Hello, I would like to contribute here as well. Is there any more work that I can do or is this issue closed ?

alewis commented 3 years ago

This would require significant physics knowledge, but if you'd like to add tutorials on anything described above please go ahead. What did you have in mind?

parthduggal commented 3 years ago

okay i'll try and add tutorials as mentioned above