pyriemann_qiskit.utils.hyper_params_factory.gen_two_local¶
- pyriemann_qiskit.utils.hyper_params_factory.gen_two_local(reps=3, rotation_blocks=['ry', 'rz'], entanglement_blocks='cz')[source]¶
Return a callable that generate a TwoLocal circuit.
The two-local circuit is a parameterized circuit consisting of alternating rotation layers and entanglement layers [1].
- Parameters:
reps (int (default 3)) – Specifies how often a block consisting of a rotation layer and entanglement layer is repeated.
rotation_blocks (str | list[str]) – The gates used in the rotation layer. Valid string values are defined in gates.
entanglement_blocks (str | list[str]) – The gates used in the entanglement layer. Valid string values are defined in gates.
- Returns:
ret – An instance of a TwoLocal circuit.
- Return type:
TwoLocal
- Raises:
ValueError – Raised if
rotation_blocksorentanglement_blockscontain a non valid gate.
References