⚛️
QuTIpy : Quantum Theory of Information for Python
  • QuTIpy
  • Getting Started
    • Overview
    • Installation
      • Install with pip
      • Install with git
  • Modules
    • Pauli
    • General Functions
    • States
Powered by GitBook
On this page
  • Hilbert Space
  • Bra-Ket Notation
  • Partial Transpose
  1. Modules

General Functions

In Hilbert Space, nobody can hear you scream...

PreviousPauliNextStates

Last updated 2 years ago

Hilbert Space

The primary mathematical object in quantum theory is the . We consider only finite-dimensional Hilbert spaces, denoted by H\mathcal{H}H. Although we will be considering finite-dimensional spaces exclusively, we note here that many of the statements and claims extend directly to the case of separable, infinite-dimensional Hilbert spaces, especially for operationally-defined tasks and information quantities.

A ddd-dimensional Hilbert space (1≤d<∞)(1 \le d < \infty)(1≤d<∞) is defined to be a complex vector space equipped with an inner product. We use the notation ∣ψ⟩{\displaystyle |\psi\rangle}∣ψ⟩to denote a vector in H\mathcal{H}H. More generally, a Hilbert space is a "complete inner product" space.

Completeness is an issue that pops up only in infinite-dimensional spaces, so all finite-dimensional inner-product spaces are Hilbert spaces.

Bra-Ket Notation

A ket is of the form ∣v⟩{\displaystyle |v\rangle } ∣v⟩ . Mathematically it denotes a , v{\displaystyle {\boldsymbol {v}}}v, in an abstract (complex) V{\displaystyle V}V, and physically it represents a state of some quantum system. An example of a Ket can be ∣r⟩=[xyz]{\displaystyle |r\rangle } = \begin{bmatrix} x \\ y\\ z\end{bmatrix} ∣r⟩=​xyz​​ represents a vector r⃗=[xyz]{\displaystyle \vec{r} } = \begin{bmatrix} x \\ y\\ z\end{bmatrix}r=​xyz​​.

A bra is of the form ⟨f∣{\displaystyle \langle f|}⟨f∣. Mathematically it denotes a f:V→C{\displaystyle f:V\to \mathbb {C} }f:V→C, i.e. a that maps each vector in V{\displaystyle V}V to a number in the complex plane C{\displaystyle \mathbb {C} }C. Letting the linear functional ⟨f∣{\displaystyle \langle f|}⟨f∣ act on a vector ∣v⟩{\displaystyle |v\rangle }∣v⟩ is written as ⟨f∣v⟩∈C{\displaystyle \langle f|v\rangle \in \mathbb {C} }⟨f∣v⟩∈C. The bra is similar to the ket, but the values are in a row, and each element is the complex of the ket's elements.

In the simple case where we consider the vector space Cn{\displaystyle \mathbb {C} ^{n}}Cn, a ket can be identified with a , and a bra as a .

Meaning :

⟨A∣=[A1A2A3…]{\displaystyle \langle A| }=\begin{bmatrix}A_1&A_2&A_3&\dots\end{bmatrix}⟨A∣=[A1​​A2​​A3​​…​] & ∣B⟩=[B1B2B3⋮]{\displaystyle |B\rangle }=\begin{bmatrix}B_1\\B_2\\B_3\\\vdots\end{bmatrix}∣B⟩=​B1​B2​B3​⋮​​

Example:

from qutipy.general_functions import ket

# Defining a ket 0 in a 2Dimensional Hilbert space,
# The first argument takes a dimension of the Hilbert space,
# while the secind argument takes the ket value.
v = ket(2,0)

Partial Transpose

The Partial Transpose plays an important role in quantum information theory due to its connection with entanglement. In fact, it leads to a sufficient condition for a bipartite state to be entangled.

partial_transpose(...) is a function that computes the partial transpose of a matrix. The transposition may be taken on any subset of the subsystems on which the matrix acts.

Defining a state X with [ ... ]

import numpy as np

X = np.array(
    [
        [ 1,  2,  3,  4],
        [ 5,  6,  7,  8],
        [ 9, 10, 11, 12],
        [13, 14, 15, 16]
    ]
)

Now we can apply the partial_transpose function over our state X :

from qutipy.general_functions import partial_transpose

pt = partial_transpose(X, [1], X.shape)

∣0⟩=[10]{\displaystyle |0\rangle }=\begin{bmatrix}1\\0\end{bmatrix}∣0⟩=[10​], for two dimensional Hilbert Space ,

Defining a basis state ∣0⟩{\displaystyle |0\rangle }∣0⟩, we can use the ket module like this:

Here we have defined the ket v for ∣v⟩=[10]{\displaystyle |v\rangle } = \begin{bmatrix} 1 \\ 0 \end{bmatrix}∣v⟩=[10​]. In numpy, defining the same would need one to define the matrix manually, just as shown in the .

Given quantum systems AAA and BBB, the partial transpose on BBB is denoted by TB≡idA⊗TBT_B\equiv id_A \otimes T_BTB​≡idA​⊗TB​, and it is defined as,

TB(XAB):=∑j,j′=0dB−1(1A⊗∣i⟩⟨i′∣B)XAB(1A⊗∣i⟩⟨i′∣B)T_B(X_{AB}) := \sum\limits^{d_B-1}_{j, j'=0} (\mathbf{1}_A \otimes \ket{i}\bra{i'}_B) X_{AB} (\mathbf{1}_A \otimes \ket{i}\bra{i'}_B) TB​(XAB​):=j,j′=0∑dB​−1​(1A​⊗∣i⟩⟨i′∣B​)XAB​(1A​⊗∣i⟩⟨i′∣B​)

Peres–Horodecki criterion
Hilbert Space
Hilbert space
Driac's Notation
vector
vector space
linear form
linear map
conjugate
column vector
row vector
Overview section