qmctorch.utils.algebra_utils module
- qmctorch.utils.algebra_utils.btrace(M)[source]
Computes the trace of batched matrices
- Parameters:
M (torch.tensor) – matrices of size (Na, Nb, … Nx, N, N)
- Returns:
trace of matrices (Na, Nb, … Nx)
- Return type:
torch.tensor
Example
>>> m = torch.rand(100,5,5) >>> tr = btrace(m)
- qmctorch.utils.algebra_utils.bproj(M, P)[source]
Project batched marices using P^T M P
- Parameters:
M (torch.tensor) – batched matrices size (…, N, M)
P (torch.tensor) – Porjectors size (…, N, M)
- Returns:
Projected matrices
- Return type:
torch.tensor
- qmctorch.utils.algebra_utils.bdet2(M)[source]
Computes the determinant of batched 2x2 matrices
- Parameters:
M (torch.tensor) – input matrices
- Returns:
determinants of the matrices
- Return type:
torch.tensor