Expectation values ================== Examples can be found :ref:`here `. Overlaps and MPO expectation values ----------------------------------- :ref:`Measurement` of the overlap between two MPSs is calculated by contracting a network formed by MPS and conjugate of another or the same MPS. Works also for two MPOs. .. autofunction:: yastn.tn.mps.measure_overlap While the above allows calculating the norm of MPS or MPO, a dedicated method extracts the norm through canonization. This can be more precise for norms close to zero. .. automethod:: yastn.tn.mps.MpsMpoOBC.norm :ref:`Measurement` of MPO's expectation value is calculated by contracting a network formed by MPS, MPO, and a conjugate of the same or different MPS. Works also for three MPOs. .. autofunction:: yastn.tn.mps.measure_mpo Shorthand notation ------------------ The above function can be also executed by .. autofunction:: yastn.tn.mps.vdot One- and two-point expectation values ------------------------------------- .. autofunction:: yastn.tn.mps.measure_1site .. autofunction:: yastn.tn.mps.measure_2site Schmidt values and entropy profile ---------------------------------- The Schmidt values are computed by performing bipartition of the MPS/MPO across each of the bonds. This amounts to SVD decomposition with respect to a bond, where all sites to the left are in :ref:`left-canonical form` and all sites to the right are in :ref:`right-canonical form`. .. automethod:: yastn.tn.mps.MpsMpoOBC.get_Schmidt_values The SVD is used to calculate the entropy at each bond. It allows to get *quantum Renyi entropy* that is defined as :math:`S_\alpha(\rho)=\frac{1}{1-\alpha}\log_2 Tr(\rho^\alpha)`, where :math:`\rho` indicades reduced density matrix for the bipartition at the bond. For :math:`\alpha=1` we get *von Neumann entropy*, so-called *entanglement entropy*, that is :math:`S_1(\rho)=-Tr(\rho_{j,j+1}\log_2 \rho)`. The entropy is counted in bits of entropy, i.e., using logarithm of base *2*. .. automethod:: yastn.tn.mps.MpsMpoOBC.get_entropy