Skip to content

get_perturbative_expression(expr, structure, subspaces=None)

The get_perturbative_expression function constructs a perturbative Expression expansion of a given Expr. It validates that all terms have non-negative, integer orders and then transforms and simplifies a given Expr to yield a ordered dictionary of Expression objects.

Parameters

  • expr (Expr):
    The symbolic expression to expand. This expression is expected to be composed of terms that can be grouped by their perturbative order (e.g., via a group_by_order utility).

  • structure (dict):
    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 of count_bosonic_subspaces.

  • subspaces (list, optional):
    An ordered list of RDBasis objects to consider when forming the tensor products of the finite part of the operators.

Returns

A dictionary mapping integer orders to their corresponding simplified expressions. Each key is an order (int) and each value is the simplified expression obtained after performing the domain_expansion on the grouped terms.


Example Usage

Below is an example demonstrating how to use the get_perturbative_expression function:

from sympt import RDBasis, BosonOp, Dagger, get_perturbative_expression


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)

perturbative_expression = get_perturbative_expression(H, subspace_structure, subspaces=[spin])
print("\nPerturbative Expression:")
display(perturbative_expression[0])
Bosonic Subspace Structure:
{Dagger(a_2)*a_2: 0, Dagger(a_1)*a_1: 1}

Perturbative Expression:

\(\left[\begin{matrix}1 & 0\\0 & -1\end{matrix}\right] \cdot {a_1^\dagger} a_1 + \left[\begin{matrix}0 & 1\\1 & 0\end{matrix}\right] \cdot {a_1^\dagger} + \left[\begin{matrix}0 & - i\\i & 0\end{matrix}\right] \cdot {a_2^\dagger} a_2\)


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.


References