8c271d54da8f609c9b56e9d0ab98d453b3e4f81c,tensorly/metrics/tests/test_entropy.py,,,#,8
Before Change
from ..entropy import vonNeumann_entropy
from ...decomposition import parafac
state = npr.rand(8, 1).astype(np.float32)
state = state/npl.norm(state)
mat_pure = tl.tensor(np.matmul(state, np.transpose(state)))
After Change
state1 = state1/tl.norm(state1)
state2 = tl.tensor([[0.84250089, 0.43429687, 0.26551928, 0.18262211, 0.55584835, 0.2565509 , 0.33197401, 0.97741178]])
state2 = state2/tl.norm(state2)
mat_mixed = tl.tensor((tl.dot(tl.transpose(state1), state1) + tl.dot(tl.transpose(state2), state2))/2.)
actual_vne = 0.5546
def test_vonNeumann_entropy_pure_state():
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances Project Name: tensorly/tensorly
Commit Name: 8c271d54da8f609c9b56e9d0ab98d453b3e4f81c
Time: 2021-03-08
Author: taylorpatti@g.harvard.edu
File Name: tensorly/metrics/tests/test_entropy.py
Class Name:
Method Name:
Project Name: geomstats/geomstats
Commit Name: 836d807557d140b2634174733c6fb55f691b6d8c
Time: 2018-12-13
Author: ninamio78@gmail.com
File Name: tests/test_special_orthogonal_group.py
Class Name: TestSpecialOrthogonalGroupMethods
Method Name: test_skew_matrix_from_vector
Project Name: geomstats/geomstats
Commit Name: 626523c8e86f35f215e482bb49bd6b1359b4a0e0
Time: 2018-12-12
Author: ninamio78@gmail.com
File Name: tests/test_special_orthogonal_group.py
Class Name: TestSpecialOrthogonalGroupMethods
Method Name: test_skew_matrix_from_vector