tnpy.tsdrg.TreeTensorNetworkMeasurements
4.4. tnpy.tsdrg.TreeTensorNetworkMeasurements#
- class tnpy.tsdrg.TreeTensorNetworkMeasurements(tree)[source]#
Bases:
object
A collection of all available physical measurements for
TensorTree
.- Parameters
tree (TensorTree) – The renormalized eigenstates in tree representation.
- __init__(tree)[source]#
A collection of all available physical measurements for
TensorTree
.- Parameters
tree (tnpy.tsdrg.TensorTree) – The renormalized eigenstates in tree representation.
Methods
__init__
(tree)A collection of all available physical measurements for
TensorTree
.connected_two_point_function
(operator1, ...)- param operator1
entanglement_entropy
(site, level_idx[, ...])Compute the von Neumann entropy on the cutting
site
.expectation_value
(mpo[, tol])Compute the expectation value for given
mpo
.loop_simplify
(bra, ket[, mpo])Simplify every closed loop within the network
bra
&mpo
&ket
.one_point_function
(operator, site, level_idx)Compute the expectation value \(\langle \hat{O}_i \rangle\) of given local operator \(\hat{O}_i\) on site \(i\).
reduced_density_matrix
(site, level_idx)Compute the reduced density matrix for the bipartite system with respect to the cutting
site
.sandwich
([mpo])Take the sandwich on given
mpo
.squared_moduli
(level_idx)two_point_function
(operator1, operator2, ...)Compute the correlation function \(\langle \hat{O}_{i_1}^A \hat{O}_{i_2}^B \rangle\) of 2 given local operators \(\hat{O}_{i_1}^A\) and \(\hat{O}_{i_2}^B\) on site \(i_1\) and \(i_2\).
variance
(mpo)Compute the variance on given matrix product operator.
wave_func_coeff
(level_idx)Attributes
- __init__(tree)[source]#
A collection of all available physical measurements for
TensorTree
.- Parameters
tree (tnpy.tsdrg.TensorTree) – The renormalized eigenstates in tree representation.
- property tree: tnpy.tsdrg.TensorTree#
- loop_simplify(bra, ket, mpo=None)[source]#
Simplify every closed loop within the network
bra
&mpo
&ket
.- Parameters
bra (quimb.tensor.tensor_core.TensorNetwork) – Tree tensor network which represents the bra vector.
ket (quimb.tensor.tensor_core.TensorNetwork) – Tree tensor network which represents the ket vector.
mpo (Optional[tnpy.operators.MatrixProductOperator]) – (Optional) If not given,
bra
&ket
will be computed.
- Returns
The contracted tensor.
- Return type
quimb.tensor.tensor_core.Tensor
Notes
quimb
may provide other simplify methods based on greedy algorithm.
- sandwich(mpo=None)[source]#
Take the sandwich on given
mpo
. If it is None, this computes the inner product of state.- Parameters
mpo (Optional[tnpy.operators.MatrixProductOperator]) –
- Return type
quimb.tensor.tensor_core.Tensor
Returns:
- expectation_value(mpo, tol=1e-12)[source]#
Compute the expectation value for given
mpo
.- Parameters
mpo (tnpy.operators.MatrixProductOperator) – The matrix product operator.
tol (float) – The numerical tolerance.
- Returns
The expectation values.
- Raises
Warning – If any off-diagonal element is larger than
tol
.- Return type
- reduced_density_matrix(site, level_idx)[source]#
Compute the reduced density matrix for the bipartite system with respect to the cutting
site
.- Parameters
site (int) –
level_idx (int) –
- Return type
Returns:
- entanglement_entropy(site, level_idx, nan_to_num=False)[source]#
Compute the von Neumann entropy on the cutting
site
.- Parameters
site (int) –
level_idx (int) –
nan_to_num (bool) –
- Return type
float
Returns:
- one_point_function(operator, site, level_idx)[source]#
Compute the expectation value \(\langle \hat{O}_i \rangle\) of given local operator \(\hat{O}_i\) on site \(i\).
- Parameters
operator (numpy.ndarray) – The operator \(\hat{O}\).
site (int) –
level_idx (int) –
- Return type
float
Returns:
- two_point_function(operator1, operator2, site1, site2, level_idx)[source]#
Compute the correlation function \(\langle \hat{O}_{i_1}^A \hat{O}_{i_2}^B \rangle\) of 2 given local operators \(\hat{O}_{i_1}^A\) and \(\hat{O}_{i_2}^B\) on site \(i_1\) and \(i_2\).
- Parameters
operator1 (numpy.ndarray) – The first operator \(\hat{O}^A\).
operator2 (numpy.ndarray) – The second operator \(\hat{O}^B\).
site1 (int) –
site2 (int) –
level_idx (int) –
- Return type
float
Returns:
- connected_two_point_function(operator1, operator2, site1, site2, level_idx)[source]#
- Parameters
operator1 (numpy.ndarray) –
operator2 (numpy.ndarray) –
site1 (int) –
site2 (int) –
level_idx (int) –
- Return type
float
Returns:
- variance(mpo)[source]#
Compute the variance on given matrix product operator.
- Parameters
mpo (tnpy.operators.MatrixProductOperator) – The matrix product operator.
- Returns
The variance.
- Return type