From 8df4f39fe011d66fcfbbe814b0efa89ed2fa39b3 Mon Sep 17 00:00:00 2001 From: desilo-hanyul <95674196+hanyul-ryu@users.noreply.github.com> Date: Tue, 12 Dec 2023 16:01:30 +0900 Subject: [PATCH] Update csprng.py Rationalized length calculation. --- src/liberate/csprng/csprng.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/liberate/csprng/csprng.py b/src/liberate/csprng/csprng.py index 8de672a..b7d41a7 100644 --- a/src/liberate/csprng/csprng.py +++ b/src/liberate/csprng/csprng.py @@ -230,7 +230,7 @@ def randbytes(self, shares=None, repeats=0, length=None, reshape=False): if length is None: L = self.L else: - L = length + L = length // 16 # Set the target states. target_states = [] @@ -261,7 +261,7 @@ def randint(self, amax=3, shift=0, repeats=0, length=None): if length is None: L = self.L else: - L = length + L = length // 4 # Calculate shares. # If repeats are greater than 0, those channels are @@ -298,7 +298,7 @@ def discrete_gaussian(self, non_repeats=0, repeats=1, length=None): if length is None: L = self.L else: - L = length + L = length // 4 # Set the target states. target_states = []