get_z_basis_m#
- iqm.qaoa.tree_calculation.generate_basis.get_z_basis_m(m)#
Generate an array containing the Z basis on a qubit.
Basically, this function is the same as
get_z_basis(), but instead of specifying p, here one specifies the length of the basis elements directly. Effectively, the function implements the following line of code, but in a numba-compatible way. .. code-block:: pythonreturn np.array(list(itertools.product([-1, 1], repeat=2 * m)), dtype=np.int8)