spyrit.core.meas.DynamicHadamSplit2d.vectorize
- DynamicHadamSplit2d.vectorize(input: tensor) tensor
Flatten the measured dimensions.
The tensor is flattened at the indicated self.meas_dims dimensions. The collapsed dimensions are then moved to the last dimension of the output tensor. The time dimension is moved to the second-to-last position.
- Input:
input (
torch.tensor): A tensor whose dimensions given byself.meas_dimshave shapeself.meas_shape.- Output:
torch.tensor: A tensor of shape (*, self.M, self.meas_shape) where * denotes all the dimensions of the input tensor not included inself.meas_dims.- See also:
For the opposite operation use
unvectorize().