paulie.application.get_optimal_su2_n.get_optimal_universal_generators#

paulie.application.get_optimal_su2_n.get_optimal_universal_generators(n, fraction=0.706, seed=0)#

Get an optimal universal generator set for \(\mathfrak{su}(2^{n})\).

Returns 2n + 1 Pauli strings (two when n = 1) generating \(\mathfrak{su}(2^{n})\), cached per (n, fraction, seed).

Parameters:
  • n (int) – Number of qubits, i.e. the exponent in \(\mathfrak{su}(2^{n})\).

  • fraction (float) – Wanted fraction of anticommuting pairs, in [0, 1]. Values below about 2 / (2n + 1) or near 1 are unreachable; the closest set found is returned.

  • seed (int | None) – Tie-breaking seed. The default is deterministic; None gives a different valid set each call.

Returns:

An optimal universal generator set for \(\mathfrak{su}(2^{n})\).

Return type:

PauliStringCollection

Raises:

ValueError – If n < 1 or fraction is outside [0, 1].