qutip / qutip-tensorflow

TensorFlow linear-algebra backend for QuTiP
BSD 3-Clause "New" or "Revised" License
15 stars 9 forks source link

TensorFLow backend - Tensor #6

Closed AGaliciaMartinez closed 3 years ago

AGaliciaMartinez commented 3 years ago

Implementation of DenseTensor class that wraps around a tensorflow.Tensor object. Although all the methods have been implemented to have a working class, only copy, to_array and __init__ are properly tested. The rest of the methods will be changed when added the specializations. Tests were adapted from QuTiP 5.0.

coveralls commented 3 years ago

Pull Request Test Coverage Report for Build 1007866042


Changes Missing Coverage Covered Lines Changed/Added Lines %
src/qutip_tensorflow/core/data/dense_tensor.py 33 41 80.49%
<!-- Total: 36 44 81.82% -->
Totals Coverage Status
Change from base Build 1003986490: -16.7%
Covered Lines: 40
Relevant Lines: 48

💛 - Coveralls
AGaliciaMartinez commented 3 years ago

This is ready for review. I was wondering whether the name of the class should be DenseTensor, TfTensor or TensorflowTensor.

AGaliciaMartinez commented 3 years ago

@Ericgig I decided to stop this PR and use PR #8 instead. PR #8 also contains code related to the "to" and "create" methods. I implemented there all the changes you suggested here. Even though I'm closing this PR, if there is any continuation on the conversation we were having It probably is better to have it here. If there is something new lets move it to PR #8.

Regarding to the DenseTensor methods, I am planning to include a benchmark with the PR that will add the specialisation for these methods.