entanglish.SquashedEnt module

class entanglish.SquashedEnt.SquashedEnt(den_mat, num_ab_steps, num_hidden_states=0, approx='eigen', recursion_init='eigen', verbose=False)[source]

Bases: entanglish.EntangCase.EntangCase

This class is a child of class EntangCase. Its purpose is to calculate the (bipartite) quantum entanglement Exy of a mixed state density matrix Dxy with parts x and y. Exy is defined here as the squashed entanglement. (See Wikipedia Ref. 1 for more detailed description and original references of squashed entanglement.)

Exy = (1/2)*min S(x : y | h)

where S(x : y | h) is the conditional mutual information (CMI, pronounced “see me”) for a density matrix Dxyh. The minimum is over all Dxyh such that Dxy = trace_h Dxyh, where Dxy is a given, fixed density matrix.

The squashed entanglement reduces to (1/2)*[S(x) + S(y)] = S(x) = S(y) when Dxy is a pure state. This is precisely the definition of entanglement for pure states that we use in the class PureStEnt.

To calculate squashed entanglement, this class uses an algo which is a generalization of the Arimoto Blahut (AB) algorithm of classical information theory, where it is used to calculate channel capacities.

See Ref.2 for a more detailed explanation of the algos used in this class.

References

  1. https://en.wikipedia.org/wiki/Squashed_entanglement

2. R.R. Tucci, “A New Algorithm for Calculating Squashed Entanglement and a Python Implementation Thereof”

Variables:
  • Dxy (DenMat) – The input density matrix den_mat, after permuting its axes so that the axes are given in the precise order self.x_axes + self.y_axes.
  • den_mat (DenMat) –
  • calc_formation_ent (bool) – True iff want to calculate entanglement of formation
  • eps_w (float) – weights (probabilities) < eps_w are rounded to zero
  • eps_log (float | None) – logs larger than log(eps_log) are clipped to log(eps_log)
  • num_ab_steps (int) – number of iterations of Arimoto Blahut algo
  • num_hidden_states (int) – number of hidden states indexed by alpha, so this is number of alphas. In the above class docstring, alpha is denoted by h, for hidden. This number is <= Dxy.num_rows^2.
  • recursion_init (str) – How to initiate the recursion of Kxy_a.
  • x_axes (list[int]) – This class calculates entanglement for 2 parts: x_axes and y_axes. x_axes and y_axes are mutually disjoint lists whose union is range( len( den_mat.row_shape))
  • y_axes (list[int]) –
__init__(den_mat, num_ab_steps, num_hidden_states=0, approx='eigen', recursion_init='eigen', verbose=False)[source]

Constructor

Parameters:
  • den_mat (DenMat) –
  • num_hidden_states (int) – number of states of h in the Dxyh defined in class doc string
  • num_ab_steps (int) –
  • approx (str) –
  • recursion_init (str) –
  • verbose (bool) –
get_entang(axes_subset)[source]

This method returns the squashed entanglement Exy, where x = axes_subset, and y is the set of all other axes.

Parameters:axes_subset (set[int]) –
Returns:
Return type:float
next_step(Kxy_a)[source]

This method is used self.num_ab_steps times, internally, in the method self.get_entang(). Given the current Kxy_a as input, it returns the next estimate of Kxy_a , Exy , err

Kxy_a is a list of un-normalized density matrices such that Kxy_a[ alp]=Dxy_a[alp]*w_a[alp] and sum_alp Kxy_a[alp] = Dxy.

Exy is the entanglement for parts x and y.

If

Delta_xy[alp]= log Dxy_a[alp] - log(Dx_a[alp]Dy_a[alp]),

then err is a float that measures the variance in the Delta_xy[alp] matrices. This variance tends to zero as num_ab_steps tends to infinity

mean_alp x[alp] = weighted average (with weights w_a) over alp of x[ alp]

err = mean_alp norm(Delta_xy[alp] - mean_alp Delta_xy[alp])

Parameters:Kxy_a (list[DenMat]) –
Returns:
Return type:list[DenMat], float, float
regulate1(Kxy_a)[source]

This internal method returns a list new_Kxy_a which is constructed by replacing each item Kxy_alp of list Kxy_a by its positive_part(), and then dividing the result by sum_alp tr_xy new_Kxy_a[alp]

Some items of list Kxy_a may be None (those with very small w_alp). None items are not changed, they are left as None

Parameters:Kxy_a (list[DenMat|None]) –
Returns:
Return type:list[DenMat|None]
regulate2(Kxy_a)[source]

This internal method returns a list new_Kxy_a which is constructed by replacing each item Kxy_alp of list Kxy_a by root*Kxy_alp*root^H, where root = sqrt(Dxy)* (sum_alp Kxy_alp)^(-1/2).

Some items of list Kxy_a may be None (those with very small w_alp). None items are not changed, they are left as None

Parameters:Kxy_a (list[DenMat|None]) –
Returns:
Return type:list[DenMat|None]