From ed2d9bd174d043d8794b6a04f1229db0e4adf74d Mon Sep 17 00:00:00 2001 From: Renato Mello Date: Wed, 9 Oct 2024 15:06:35 +0400 Subject: [PATCH] fix tests --- src/qibo/quantum_info/entropies.py | 4 ++-- tests/test_quantum_info_entropies.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/qibo/quantum_info/entropies.py b/src/qibo/quantum_info/entropies.py index 9e5ca1926d..6bbcb4e673 100644 --- a/src/qibo/quantum_info/entropies.py +++ b/src/qibo/quantum_info/entropies.py @@ -1017,8 +1017,8 @@ def relative_tsallis_entropy( if len(target.shape) == 1: target = backend.np.outer(target, backend.np.conj(target.T)) - trace = matrix_power(state, alpha, backend) - trace = trace @ matrix_power(target, factor, backend) + trace = matrix_power(state, alpha, backend=backend) + trace = trace @ matrix_power(target, factor, backend=backend) trace = backend.np.trace(trace) return (1 - trace) / factor diff --git a/tests/test_quantum_info_entropies.py b/tests/test_quantum_info_entropies.py index 3134ef38bb..f0ece78746 100644 --- a/tests/test_quantum_info_entropies.py +++ b/tests/test_quantum_info_entropies.py @@ -817,8 +817,8 @@ def test_relative_tsallis_entropy( if target_flag: target = backend.np.outer(target, backend.np.conj(target.T)) - target_value = matrix_power(state, alpha, backend) - target_value = target_value @ matrix_power(target, 1 - alpha, backend) + target_value = matrix_power(state, alpha, backend=backend) + target_value = target_value @ matrix_power(target, 1 - alpha, backend=backend) target_value = (1 - backend.np.trace(target_value)) / (1 - alpha) backend.assert_allclose(value, target_value)