google / TensorNetwork

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

Contraction path node #872

Closed mganahl closed 4 years ago

mganahl commented 4 years ago

Add contract_path and path_solver for use with Node

mganahl commented 4 years ago

Hey @Thenerdstation pls have a look at this. This is something that we needed for a long time. Tests will be added after your had a chance to look at this. This should be pulled in ASAP because I'd make it part of a presentation

chaserileyroberts commented 4 years ago

Also yes please add tests

mganahl commented 4 years ago

Looks good. Only concern is passing in the algorithm as a string feels dirty, but I don't expect us to add a ton more so this should be fine for now.

It's not beautiful, but the advantage is that the user doesn't have to pull in a module for that.

chaserileyroberts commented 4 years ago

It's not beautiful, but the advantage is that the user doesn't have to pull in a module for that.

Agreed. Simplicity is a virtue.

chaserileyroberts commented 4 years ago

Test + passing build and I'll merge this in.

If you also want, I can also push version 0.4.3 once this is in

mganahl commented 4 years ago

If you also want, I can also push version 0.4.3 once this is in

That would be great!

codecov-io commented 4 years ago

Codecov Report

Merging #872 into master will decrease coverage by 0.07%. The diff coverage is 73.61%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #872      +/-   ##
==========================================
- Coverage   98.21%   98.13%   -0.08%     
==========================================
  Files         129      129              
  Lines       22311    22377      +66     
==========================================
+ Hits        21913    21960      +47     
- Misses        398      417      +19     
Impacted Files Coverage Δ
...k/contractors/opt_einsum_paths/path_contractors.py 75.92% <42.42%> (-14.87%) :arrow_down:
tensornetwork/contractors/__init__.py 100.00% <100.00%> (ø)
...ors/opt_einsum_paths/path_contractors_node_test.py 98.83% <100.00%> (+0.28%) :arrow_up:
...ensornetwork/contractors/opt_einsum_paths/utils.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a367602...a38f709. Read the comment docs.