pygsti.algorithms.write_fixed_hamming_weight_code

pygsti.algorithms.write_fixed_hamming_weight_code(n, k)

This is an auxiliary function (probably to be deprecated soon) for the fixedNum mode of optimize_integer_fiducials_slack. It generates a string that, when executed, creates an exhaustive array of binary vectors of fixed length and Hamming weight.

Parameters:
  • n (int) – The length of each bit string.
  • k (int) – The hamming weight of each bit string.
  • Returns
  • ----------
  • code (str) – A string that is to be written to disk, run, then deleted. When executed, the resulting file will write to disk (as a pickle object) the array bitVecMat; this is the array of binary vectors of a fixed length n and fixed Hamming weight k.