RDCompositeBasis
The RDCompositeBasis
class represents a composite basis formed from multiple RDBasis
objects. It creates a complete basis for a composite quantum system by taking the Kronecker product of the individual basis matrices of the constituent RDBasis
objects. In other words, it builds symbolic composite basis elements as products of the basis elements from each subsystem and computes their corresponding matrix representations. This composite basis is essential for projecting operators or matrices onto a more manageable symbolic representation of the full system.
Parameters
-
bases (
list[RDBasis]
):- A list of
RDBasis
objects that are used to construct the composite basis.
- A list of
Attributes
-
bases (
list[RDBasis]
):- The original list of
RDBasis
objects forming the composite basis.
- The original list of
-
dim (
int
):- The total dimension of the composite basis, calculated as the product of the dimensions of all provided
RDBasis
objects.
- The total dimension of the composite basis, calculated as the product of the dimensions of all provided
-
basis (
ndarray
):- An array containing the symbolic composite basis elements.
-
basis_matrices (
ndarray
):- An array of matrix representations corresponding to the composite basis elements.
- Each matrix is computed as the Kronecker product of the matrices of the constituent basis elements.
-
basis_ling_alg_norm (
int
orfloat
):- A normalization factor for the composite basis.
- When there is only one composite basis element, this factor equals the composite dimension.
- Otherwise, it is computed from the trace of the product of the conjugate transpose of each basis matrix with itself.
Methods
project(self, to_be_projected)
Projects a given matrix onto the composite basis.
-
Parameters:
-
Returns:
- A symbolic expression representing the projection of the input matrix in the composite basis.
-
Raises:
- ValueError:
- If the dimensions of
to_be_projected
do not match the expected composite dimensions.
- If the dimensions of
- ValueError:
Usage Example
Below is an example demonstrating how to create a RDCompositeBasis
instance from multiple RDBasis
objects, and how to project a matrix onto the composite basis.
from sympt import RDCompositeBasis, RDBasis
import numpy as np
spin = RDBasis('sigma', dim=2)
charge = RDBasis('tau', dim=2)
# Initialize the composite basis using the two RDBasis objects.
composite_basis = RDCompositeBasis(bases=[spin, charge])
# Print composite basis information.
print("Composite Dimension:", composite_basis.dim)
# Suppose we have a matrix (operator) defined in the full composite space.
# This matrix should be of dimensions (dim x dim).
some_matrix = np.array([
[0, 1, 0, 0],
[1, 0, 0, 0],
[0, 0, 0, -1],
[0, 0, -1, 0]
])
# Project the matrix onto the composite basis.
projected_expression = composite_basis.project(some_matrix)
print("Projected Expression onto the Composite Basis:\n")
display(projected_expression)
\(\displaystyle \sigma_{3} \tau_{1}\)
License
SymPT is licensed under the MIT License. See the LICENSE
file for details.
Citation
If you use SymPT in your research, please cite the following paper:
BibTeX Entry:
@misc{diotallevi2024symptcomprehensivetoolautomating,
title={SymPT: a comprehensive tool for automating effective Hamiltonian derivations},
author={Giovanni Francesco Diotallevi and Leander Reascos and Mónica Benito},
year={2024},
eprint={2412.10240},
archivePrefix={arXiv},
primaryClass={quant-ph},
url={https://arxiv.org/abs/2412.10240},
}
APA Citation:
Diotallevi, G. F., Reascos, L., & Benito, M. (2024). SymPT: a comprehensive tool for automating effective Hamiltonian derivations. arXiv preprint arXiv:2412.10240.
IEEE Citation:
G. F. Diotallevi, L. Reascos, and M. Benito, "SymPT: a comprehensive tool for automating effective Hamiltonian derivations," arXiv preprint arXiv:2412.10240, 2024.