inner¶
full name: tenpy.linalg.np_conserved.inner
parent module:
tenpy.linalg.np_conservedtype: function
-
tenpy.linalg.np_conserved.inner(a, b, axes=None, do_conj=False)[source]¶ Contract all legs in a and b, return scalar.
- Parameters
- a, bclass:Array
The arrays for which to calculate the product. Must have same rank, and compatible LegCharges.
- axes
(axes_a, axes_b)|'range','labels' axes_a and axes_b specifiy the legs of a and b, respectively, which should be contracted. Legs can be specified with leg labels or indices. We contract leg
axes_a[i]of a with legaxes_b[i]of b. The defaultaxes='range'is equivalent to(range(rank), range(rank)).axes='labels'is equivalent to either(a.get_leg_labels(), a.get_leg_labels())fordo_conj=True, or to(a.get_leg_labels(), conj_labels(a.get_leg_labels()))fordo_conj=False. In other words,axes='labels'requires a and b to have the same/conjugated labels up to a possible transposition, which is then reverted.- do_conjbool
If
False(Default), ignore it. ifTrue, conjugate a before, i.e., returninner(a.conj(), b, axes)
- Returns
- inner_productdtype
A scalar (of common dtype of a and b) giving the full contraction of a and b.