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 + 1Pauli strings (two whenn = 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 about2 / (2n + 1)or near 1 are unreachable; the closest set found is returned.seed (int | None) – Tie-breaking seed. The default is deterministic;
Nonegives a different valid set each call.
- Returns:
An optimal universal generator set for \(\mathfrak{su}(2^{n})\).
- Return type:
- Raises:
ValueError – If
n < 1orfractionis outside[0, 1].