pmm_tools.partial_trace
Functions
| Name | Description |
|---|---|
compute_basis | Compute the basis of the fermionic operators in the Hilbert space. |
reduced_operator | Compute the operator defined as the outer product of state_e and state_o. |
remove_terms | Remove the terms in the expression that have support over the subspace. |
separate_subspace | Separate the operators in the state into two lists: one for the subspace |
compute_basisfunction#
def compute_basis(fermions)Compute the basis of the fermionic operators in the Hilbert space.
Parameters
| Name | Type | Description |
|---|---|---|
fermions | list | List of FermionOp objects representing the fermionic operators. |
Returns
symbolic_listlistList of products of fermionic operators corresponding to the basis states.
reduced_operatorfunction#
def reduced_operator(state_e, state_o, subspace, complement, prefactor=sympy.S.One)Compute the operator defined as the outer product of state_e and state_o. The reduced operator has support only over the complement of the subspace.
Parameters
| Name | Type | Description |
|---|---|---|
state_e | sympy.Expression | Even ground state. |
state_o | sympy.Expression | Odd ground state. |
subspace | list | List of fermionic operators in the subspace. |
complement | list | List of fermionic operators in the complement of the subspace. |
Returns
operatorsympy.ExpressionOuter product as fermionic operator.
remove_termsfunction#
def remove_terms(expr, subspace)Remove the terms in the expression that have support over the subspace.
Parameters
| Name | Type | Description |
|---|---|---|
expr | sympy.Expression | The expression to be modified. |
subspace | list | List of fermionic operators in the subspace. |
Returns
exprsympy.ExpressionThe modified expression.
separate_subspacefunction#
def separate_subspace(state, subspace)Separate the operators in the state into two lists: one for the subspace and one for the complement of the subspace.
Parameters
| Name | Type | Description |
|---|---|---|
state | sympy.Expression | The state to be separated. |
subspace | list | List of fermionic operators in the subspace. |
Returns
ops_subspacesympy.ExpressionTerms in the subspace.
ops_complementsympy.ExpressionTerms in the complement of the subspace.