seemps.register.circuit.LocalRotationsLayer#

class seemps.register.circuit.LocalRotationsLayer[source]#

Bases: ParameterizedCircuit

Layer of local rotations acting on the each qubit with the same generator and possibly different angles.

Parameters:
register_sizeint

Number of qubits on which to operate.

operatorstr | 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_parametersSequence[Real] | None

A list or a vector of angles to use if no other one is provided.

strategyStrategy

Truncation and simplification strategy (Defaults to DEFAULT_STRATEGY)

Examples

>>> state = random_uniform_mps(2, 3)
>>> U = LocalRotationsLayer(register_size=state.size, operator="Sz")
>>> Ustate = U @ state