SolovayKitaevDecomposition¶
- class SolovayKitaevDecomposition(basic_approximations=None)[source]¶
Bases:
object
The Solovay Kitaev discrete decomposition algorithm.
This class is called recursively by the transpiler pass, which is why it is separeted. See
qiskit.transpiler.passes.SolovayKitaev
for more information.- Parameters
basic_approximations (str | dict[str, np.ndarray] | list[GateSequence] | None) – A specification of the basic SU(2) approximations in terms of discrete gates. At each iteration this algorithm, the remaining error is approximated with the closest sequence of gates in this set. If a
str
, this specifies a.npy
filename from which to load the approximation. If adict
, then this contains{gates: effective_SO3_matrix}
pairs, e.g.{"h t": np.array([[0, 0.7071, -0.7071], [0, -0.7071, -0.7071], [-1, 0, 0]]}
. If a list, this contains the same information as the dict, but already converted toGateSequence
objects, which contain the SO(3) matrix and gates.
Methods
Finds gate in
self._basic_approximations
that best representssequence
.Load basic approximations.
Run the algorithm.