TensorNetwork icon indicating copy to clipboard operation
TensorNetwork copied to clipboard

Add tutorials for basic operations

Open chaserileyroberts opened this issue 6 years ago • 25 comments

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

Some nice things to have include:

  • Quantum computing example
  • SAT solver example
  • FFT example
  • MERA
  • DMRG

chaserileyroberts avatar Oct 04 '19 18:10 chaserileyroberts

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

Aamir1551 avatar Oct 11 '19 20:10 Aamir1551

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 [email protected]

chaserileyroberts avatar Oct 11 '19 21:10 chaserileyroberts

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

Aamir1551 avatar Oct 11 '19 21:10 Aamir1551

Awesome! That sounds perfect.

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

chaserileyroberts avatar Oct 11 '19 21:10 chaserileyroberts

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

Aamir1551 avatar Oct 14 '19 19:10 Aamir1551

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.

chaserileyroberts avatar Oct 14 '19 19:10 chaserileyroberts

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.

Aamir1551 avatar Oct 14 '19 19:10 Aamir1551

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

chaserileyroberts avatar Oct 14 '19 19:10 chaserileyroberts

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

Thanks

Aamir1551 avatar Oct 14 '19 20:10 Aamir1551

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

chaserileyroberts avatar Oct 14 '19 20:10 chaserileyroberts

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

Are there any improvements required before publishing? Thanks

Aamir1551 avatar Oct 22 '19 21:10 Aamir1551

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

Aamir1551 avatar Oct 23 '19 10:10 Aamir1551

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!

sebgrijalva avatar Nov 22 '19 15:11 sebgrijalva

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 [email protected]

Thanks for your support!

Aamir1551 avatar Nov 22 '19 20:11 Aamir1551

Yes! Basically all of what Aamir said

chaserileyroberts avatar Nov 22 '19 20:11 chaserileyroberts

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!

byronho24 avatar Dec 11 '19 11:12 byronho24

That'd be great! Email me if you need any help. [email protected]

chaserileyroberts avatar Dec 11 '19 17:12 chaserileyroberts

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!

olgOk avatar Jan 20 '20 09:01 olgOk

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 avatar Feb 03 '20 20:02 sebgrijalva

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

sebgrijalva avatar Feb 03 '20 21:02 sebgrijalva

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.

limapedro avatar Feb 16 '20 19:02 limapedro

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

chaserileyroberts avatar Feb 16 '20 19:02 chaserileyroberts

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

parthduggal avatar Aug 19 '21 12:08 parthduggal

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?

alewis avatar Aug 24 '21 15:08 alewis

okay i'll try and add tutorials as mentioned above

parthduggal avatar Aug 24 '21 16:08 parthduggal