SUMMARY notebook

This notebook scans the directory in which it lives to find all jupyter notebooks (other than itself) in that directory. It then prints for every notebook it finds (1) a hyperlink to the notebook, and (2) the first cell (which is always markdown) of the notebook. This way you can read a nice, automatically generated summary of all the notebooks without having to open all of them. If you find a notebook that you want to explore further, you can simply click on its link to open it.

In [1]:
import os
import json
from IPython.display import display, Markdown

# the name of this file
this_fname = 'SUMMARY.ipynb'
fname_to_md = {}
for fname in sorted(os.listdir('./')):
    if fname[-6:] == '.ipynb'  and fname != this_fname:
        # print('------------', fname)
        with open(fname, 'r', encoding="utf-8") as f:
            fdata = json.load(f)
            fname_to_md[fname] = ''.join(fdata['cells'][0]['source'])
# print(fname_to_md)
pre_sep = '\n\n<hr style="height:10px; background-color: blue;">\n\n'
full_md = ''
k = 1
num_nb = len(fname_to_md)
for fname, md in fname_to_md.items():
    sep = pre_sep
    sep += '[<a href="' + fname + '" target= "_blank">' + fname + '</a>] ' \
    + str(k) + '/' + str(num_nb) + '\n\n'
    full_md += sep + md
    k += 1
display(Markdown(full_md))

[formation-entanglement.ipynb] 1/6

Entanglement of Formation

$$ \newcommand{\ul}[1]{\underline{#1}} \newcommand{\rvalp}[0]{{\ul{\alpha}}} \newcommand{\alp}[0]{{\alpha}} \newcommand{\rvx}[0]{{\ul{x}}} \newcommand{\rvy}[0]{{\ul{y}}} $$

The purpose of this notebook is to show how to use entanglish to calculate the formation entanglement of a mixed state (either pure or not pure).

A closed exact formula is known, thanks to Wootters, for the entang of formation of an arbitrary mixture of 2 qubits. Class TwoQubitState of entanglish contains an implementation of said formula. In this notebook, we calculate formation entanglement for some 2 qubit states using our Arimoto-Blahut inspired algorithm and compare the results to Wootters formula.

We've been calculating squashed entanglement from the formula

$$ E_{\rvx, \rvy}(\rho_{\rvx, \rvy})= \frac{1}{2} {\rm min}\sum_\alp w^\alp [ S(\rho^\alp_{\rvx}) +S(\rho^\alp_{\rvy}) -S(\rho^\alp_{\rvx, \rvy})] $$

where the minimum is over all families of density matrices $\{\rho^\alp_{\rvx, \rvy}|\forall \alp\}$ such that $\sum_\alp \rho^\alp_{\rvx, \rvy}= \rho_{\rvx, \rvy}$. If we just add the further constraint that the states $\rho^\alp_{\rvx, \rvy}$ are pure states, then $S(\rho^\alp_{\rvx, \rvy})=0$, $S(\rho^\alp_{\rvx})=S(\rho^\alp_{\rvy})$, and we get precisely the definition of Entanglement of Formation for a pure or mixed state.

See Entanglish-Original-Ref for a detailed explanation of the algos used in this class.

Entanglish-Original-Ref

  • "A New Algorithm for Calculating Squashed Entanglement and a Python Implementation Thereof", by R.R.Tucci

[maximally-entangled-states.ipynb] 2/6

Maximally Entangled States

$$ \newcommand{\ul}[1]{\underline{#1}} \newcommand{\rvx}[0]{{\ul{x}}} \newcommand{\rvy}[0]{{\ul{y}}} $$

The purpose of this notebook is to construct a maximally entangled state vector and its corresponding density matrix, and then to calculate the "entanglement profile" of that state.

In Entaglish, density matrices are stored in the class DenMat. That class contains attributes: num_rows, row_shape and arr. arr is a numpy array of shape=(num_rows, num_rows). row_shape is a tuple such that the product of its components is num_rows. For example, a state with row_shape=(2,3,4) consists of 3 qudits with d=2,3,4 and num_rows=24.

See Entanglish-Original-Ref for an explicit definition of the maximally entangled states that we use. The basic requirement for a density matrix $\rho_{\rvx, \rvy}$ to be maximally entangled is for its partial trace $\rho_{\rvx}={\rm tr}_\rvy \rho_{\rvx, \rvy}$ to be a diagonal matrix with all terms in the diagonal equal to the same constant. The sum of the diagonal elements must of course be one. For example, $\rho_{\rvx}={\rm diag}(0.25, 0.25, 0.25, 0.25)$. (If $\rvx$ and $\rvy$ have different numbers of possible values, this assumes that $\rvx$ is the one with the smaller number of values.)

Given a state with num_row_axes qudits, one can define a (bipartite) entanglement for each possible bi-partitions of range( num_row_axes). By a bi-partition we mean two nonempty disjoint subsets whose union is range(num_row_axes). An entanglement profile is a dictionary mapping bi-partition half-size to a dictionary that maps each bi-partition of that half-size to its entanglement.

Entanglish-Original-Ref

  • "A New Algorithm for Calculating Squashed Entanglement and a Python Implementation Thereof", by R.R.Tucci

[pure-state-entang.ipynb] 3/6

Pure State Entanglement

$$ \newcommand{\bra}[1]{\langle#1|} \newcommand{\ket}[1]{|#1\rangle} \newcommand{\ul}[1]{\underline{#1}} \newcommand{\rvx}[0]{{\ul{x}}} \newcommand{\rvy}[0]{{\ul{y}}} $$

The purpose of this notebook is to show how to use entanglish to calculate the entanglement of a pure state.

Given a bipartite density matrix $\rho_{\rvx, \rvy} = \ket{\psi_{\rvx, \rvy}}\bra{\psi_{\rvx, \rvy}}$ with partial trace $\rho_{\rvx}={\rm tr}_\rvy \rho_{\rvx, \rvy}$, we define its entanglement as $S(\rho_{\rvx})$.


[squashed-entanglement.ipynb] 4/6

Squashed Entanglement

$$ \newcommand{\ul}[1]{\underline{#1}} \newcommand{\rvalp}[0]{{\ul{\alpha}}} \newcommand{\alp}[0]{{\alpha}} \newcommand{\rvx}[0]{{\ul{x}}} \newcommand{\rvy}[0]{{\ul{y}}} $$

The purpose of this notebook is to show how to use entanglish to calculate the squashed entanglement of a mixed state (either pure or not pure).

Consider a bipartite system consisting of two parts labelled by the random variables $\rvx$ and $\rvy$, and described by a density matrix $\rho_{\rvx, \rvy}$. The squashed entanglement of such a system is defined as

$$ E_{\rvx, \rvy}(\rho_{\rvx, \rvy}) = \frac{1}{2} \min S(\rvx : \rvy|\rvalp) \;. $$

The min()---or infimum() if one wishes to be more mathematically precise--is over all density matrices $\rho_{\rvx, \rvy,\rvalp}$ such that ${\rm tr}_\rvalp \; \rho_{\rvx, \rvy,\rvalp}= \rho_{\rvx, \rvy}$ with $\rho_{\rvx, \rvy}$ held fixed. If $\rho_{\rvx, \rvy}$ is a pure state, then $E_{\rvx, \rvy} = S(\rvx) = S(\rvy)$. Entanglish-Original-Ref discusses other interesting properties of squashed entanglement

Entanglish-Original-Ref also describes the algo used by Entanglish to calculate squashed entanglement. The algorithm is recursive. The number of recursive steps can be chosen by the user and is called num_ab_steps (ab stands for Arimoto-Blahut). Another parameter of the algorithm is num_hidden_states, which is the number of possible $\rvalp$ values.

Entanglish-Original-Ref

  • "A New Algorithm for Calculating Squashed Entanglement and a Python Implementation Thereof", by R.R.Tucci

[symmetrized-nup-states.ipynb] 5/6

Symmetrized N-up States

$$ \newcommand{\ul}[1]{\underline{#1}} \newcommand{\rvalp}[0]{{\ul{\alpha}}} \newcommand{\alp}[0]{{\alpha}} \newcommand{\rvx}[0]{{\ul{x}}} \newcommand{\rvy}[0]{{\ul{y}}} $$

The purpose of this notebook is to construct a "symmetrized-N-up-state" state vector and its corresponding density matrix, and then to calculate the "entanglement profile" of that state.

In Entaglish, density matrices are stored in the class DenMat. That class contains attributes: num_rows, row_shape and arr. arr is a numpy array of shape=(num_rows, num_rows). row_shape is a tuple such that the product of its components is num_rows. For example, a state with row_shape=(2,3,4) consists of 3 qudits with d=2,3,4 and num_rows=24.

See Entanglish-Original-Ref for an explicit definition of "symmetrized-N-up-states". As their name implies, such states consist of NT qubits, with N qubits up (i.e, in state 1) and NT-N qubits down (i.e., in state 0). A full symmetrization operator is applied to the state so that it completely forgets which of the NT qubits are up and which are down.

In Entanglish-Original-Ref, we derive an analytical formula for the entanglement of any symmetrized n-up state.

Given a state with num_row_axes qudits, one can define a (bipartite) entanglement for each possible bi-partitions of range( num_row_axes). By a bi-partition we mean two nonempty disjoint subsets whose union is range(num_row_axes). An entanglement profile is a dictionary mapping bi-partition half-size to a dictionary that maps each bi-partition of that half-size to its entanglement.

Entanglish-Original-Ref

  • "A New Algorithm for Calculating Squashed Entanglement and a Python Implementation Thereof", by R.R.Tucci

[two-qubit-states.ipynb] 6/6

Two Qubit States

$$ \newcommand{\ul}[1]{\underline{#1}} \newcommand{\rvx}[0]{{\ul{x}}} \newcommand{\rvy}[0]{{\ul{y}}} \newcommand{\bra}[1]{\langle#1|} \newcommand{\ket}[1]{|#1\rangle} \newcommand{\calh}[0]{{\cal H}} \newcommand{\tr}[0]{{\rm tr }} \newcommand{\alp}[0]{\alpha} $$

The purpose of this notebook is to illustrate the use of entanglish's class TwoQubitState which contains methods for calculating quantities related to entanglement for 2 qubit states (Bell Basis states, states that are diagonal in the Bell Basis such as Werner states, etc.) In particular, the class calculates the entanglement of formation of an arbitrary density matrix of 2 qubits.

In [ ]: