estimator.nd.SparseTernary.split_balanced

estimator.nd.SparseTernary.split_balanced#

SparseTernary.split_balanced(new_n, new_hw=None)[source]#

Split the +1 and -1 entries in a balanced way, and return 2 SparseTernary distributions: one of dimension new_n and the other of dimension n - new_n.

Parameters:
  • new_n – dimension of the first noise distribution

  • new_hw – hamming weight of the first noise distribution. If none, we take the most likely weight.

Returns:

tuple of (SparseTernary, SparseTernary)