quark.torch.algorithm.rotation.hadamard
#
Module Contents#
Functions#
- quark.torch.algorithm.rotation.hadamard.random_hadamard_matrix(size: int) torch.Tensor #
Generate a random Hadamard matrix of size size.
- quark.torch.algorithm.rotation.hadamard.get_hadamard_matrices(n: int) tuple[torch.Tensor, torch.Tensor | None, int] #
Get the Hadamard matrix and its dimension for a given input size.
- quark.torch.algorithm.rotation.hadamard.hardmard_transform(X: torch.Tensor, H1: torch.Tensor, H2: torch.Tensor | None, K: int, scaled: bool = False) torch.Tensor #
Apply Hadamard matrix to the input tensor.