seemps.register.circuit.LocalRotationsLayer#
- class seemps.register.circuit.LocalRotationsLayer[source]#
Bases:
ParameterizedCircuitLayer of local rotations acting on the each qubit with the same generator and possibly different angles.
- Parameters:
- register_size
int Number of qubits on which to operate.
- operator
str|Operator Either the name of a generator (“Sx”, “Sy”, “Sz”) or a 2x2 matrix.
- same_parameterbool
If True, the same angle is reused by all gates and self.parameters_size=1. Otherwise, the user must provide one value for each rotation.
- default_parameters
Sequence[Real] |None A list or a vector of angles to use if no other one is provided.
- strategy
Strategy Truncation and simplification strategy (Defaults to DEFAULT_STRATEGY)
- register_size
Examples
>>> state = random_uniform_mps(2, 3) >>> U = LocalRotationsLayer(register_size=state.size, operator="Sz") >>> Ustate = U @ state