pyriemann_qiskit.utils.hyper_params_factory.gen_z_feature_map

pyriemann_qiskit.utils.hyper_params_factory.gen_z_feature_map(reps=2)[source]

Return a callable that generates a ZFeatureMap.

A feature map encodes data into a quantum state. A ZFeatureMap is a first-order Pauli-Z evolution circuit (no entanglement). See [1] for more details.

Parameters:

reps (int (default 2)) – The number of repeated circuits, greater or equal to 1.

Returns:

ret – A callable that takes into arguments:

  • the number of features

  • the prefix string for the parameters

And returns an instance of ZFeatureMap.

Return type:

Callable[[int, str], ZFeatureMap]

Raises:

ValueError – Raised if reps is lower than 1.

References

Notes

Added in version 0.2.0.

Changed in version 0.4.0: Possibility to specify parameter prefix.