-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document Transformations
#73
Conversation
Codecov Report
@@ Coverage Diff @@
## master #73 +/- ##
==========================================
- Coverage 78.13% 77.82% -0.32%
==========================================
Files 10 9 -1
Lines 709 699 -10
==========================================
- Hits 554 544 -10
Misses 155 155
|
transformations.jl
Transformations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! Just a couple of comments:
- It's best practice to use the infinitive for explaining functions in the documentation (e.g. use "Reduce" instead of "Reduces". Imagine that function are like verbs or actions).
- One of the main reasons why these methods were developed is because it drastically reduces the problem size of contraction path search. We should mention it.
- Reducing the maximum rank of the Tensor Network is not what it solves, but reducing the rank (or better, size) of the involved tensors.
- It would a good idea to cite the paper by Johnnie Gray and maybe say that we have taken inspiration? from
quimb
. - I think it would be great to put small examples inside the docstrings for each
Transformation
, so users can really appreciate each of them.
docs/src/transformations.md
Outdated
# Examples | ||
```julia-repl | ||
julia> tn = TensorNetwork(...) | ||
julia> transformed_tn = transform(tn, Tenet.RankSimplification) | ||
|
||
julia> fig = Figure() | ||
julia> ax1 = Axis(fig[1, 1]; title="Original TensorNetwork") | ||
julia> p1 = plot!(ax1, tn; node_size=5.) | ||
julia> ax2 = Axis(fig[1, 2], title="Transformed TensorNetwork") | ||
julia> p2 = plot!(ax2, tn2; node_size=5.) | ||
julia> ax1.titlesize=20 | ||
julia> ax2.titlesize=20 | ||
``` | ||
```@raw html | ||
<figure> | ||
<img width=500 src="../assets/transformation.svg" alt="Before and after transformation in a Tensor Network"> | ||
</figure> | ||
``` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer to put examples inside the docstrings of the different Transformation
s, so the user can check their effect.
(Use small examples)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we show a visual representation for each transformation? Maybe this would be too much
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this would be a good idea, but using very small tensor networks. Similar to what they do in the paper with the diagrams.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can help with this if you need help.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will try to create some examples, I will let you know!
Co-authored-by: Sergio Sánchez Ramírez <15837247+mofeing@users.noreply.github.com>
Co-authored-by: Sergio Sánchez Ramírez <15837247+mofeing@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jofrevalles please, revise these requests.
Co-authored-by: Sergio Sánchez Ramírez <15837247+mofeing@users.noreply.github.com>
@mofeing thanks for the comments, now the docs work as expected |
I prefer multiple smaller examples and leave the RQC for the examples, but it's good enough right now. I will change it in the future. |
Summary
This PR aims to enhance the documentation for the
transformations.jl
module, providing more detailed descriptions of each available transformation and including a visual example to demonstrate the impact of the transformations on a tensor network.