domain_expansion(term, structure={}, subspaces=None)
The domain_expansion
function is designed to convert a term—represented as a dictionary containing the keys 'other'
, 'finite'
, and 'infinite'
—into a corresponding MulGroup
object.
Parameters
term
(dict
):
A dictionary representing the term. It must include the following keys:'other'
: A list of factors that do not belong to the finite or infinite groups.'finite'
: A list of finite operators that will later be converted into a finite matrix.'infinite'
: A dictionary mapping keys (typically number operators) to lists of infinite operators.
Note: The
term
dictionary is typically obtained from the output ofgroup_by_order
.
-
structure
(dict
, optional):
A dictionary that maps bosonic subspaces to a positional index. This contains the ordering structure in case of multiple bosonic subspaces are present. This is the result ofcount_bosonic_subspaces
.- Default: An empty dictionary.
-
subspaces
(list
, optional):
An ordered list ofRDBasis
objects to consider when forming the tensor products of the finite part of the operators.- Default:
None
.
- Default:
Returns
The function returns a tuple containing:
-
A
MulGroup
object -
A boolean flag: Indicates whether the resulting operator is diagonal.
Example Usage
Below is an example demonstrating the use of domain_expansion
:
from sympt import RDBasis, BosonOp, Dagger, group_by_order, domain_expansion
spin = RDBasis("sigma", 2) # Define a basis with two states
s0, sx, sy, sz = spin.basis
# Define multiple bosonic operators for a composite system
a_1 = BosonOp("a_1")
ad_1 = Dagger(a_1)
a_2 = BosonOp("a_2")
ad_2 = Dagger(a_2)
# Construct a Hamiltonian-like expression
H = ad_1 * a_1 * sz + ad_2 * a_2 * sy + ad_1 * sx # Includes creation/annihilation terms
# Determine the structure of the bosonic subspaces
subspace_structure = count_bosonic_subspaces(H)
print("\nBosonic Subspace Structure:")
print(subspace_structure)
# Group terms in H by perturbative order and extract bosonic factors
grouped_terms = group_by_order(H)
first_term = grouped_terms[0][0] # Extract a term dictionary
print("\nExample Term from Order 0:")
print(first_term)
mul_group_first_term, is_diagonal = domain_expansion(first_term, structure=subspace_structure, subspaces=[spin])
print("\nExpanded Term:")
display(mul_group_first_term)
print("\nIs Diagonal: ", is_diagonal)
Bosonic Subspace Structure:
{Dagger(a_2)*a_2: 0, Dagger(a_1)*a_1: 1}
Example Term from Order 0:
{'other': [], 'finite': [sigma_3], 'infinite': {Dagger(a_1)*a_1: [Dagger(a_1), a_1]}}
Expanded Term:
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.