Title: | Quantum Entanglement of Bipartite System |
---|---|
Description: | It computes the Schmidt decomposition of bipartite quantum systems, discrete or continuous, and their respective entanglement metrics. See Artur Ekert, Peter L. Knight (1995) <doi:10.1119/1.17904> for more details. |
Authors: | Kwan-Yuet Ho [aut, cre] |
Maintainer: | Kwan-Yuet Ho <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.3 |
Built: | 2024-11-23 04:33:40 UTC |
Source: | https://github.com/stephenhky/rqentangle |
Interpolate values of functions.
continuous.function.interpolate(xarr, yarr, x)
continuous.function.interpolate(xarr, yarr, x)
xarr |
a vector of x (sorted) |
yarr |
a vector of y |
x |
given value of x |
interpolated value of y
Perform a continuous Schmidt decomposition
continuous.schmidt.decompose(bifunc, x1lo, x1hi, x2lo, x2hi, nbx1 = 100, nbx2 = 100, keep = min(10, nbx1, nbx2))
continuous.schmidt.decompose(bifunc, x1lo, x1hi, x2lo, x2hi, nbx1 = 100, nbx2 = 100, keep = min(10, nbx1, nbx2))
bifunc |
bipartitite continuous wavefunction |
x1lo |
lower limit of |
x1hi |
upper limit of |
x2lo |
lower limit of |
x2hi |
upper limit of |
nbx1 |
number of discretized x1 (default: 100) |
nbx2 |
number of discretized x2 (default: 100) |
keep |
number of Schmidt modes to keep (default: minimum of 10, |
Schmidt modes, including the eigenvalues, and the lambda interpolated function of the Schmidt modes
coupled.harm.fcn<- function(x1,x2) exp(-((0.5*(x1+x2))**2))*exp(-(x1-x2)**2)*sqrt(2./pi) continuous.schmidt.decompose(coupled.harm.fcn, -10, 10, -10, 10)
coupled.harm.fcn<- function(x1,x2) exp(-((0.5*(x1+x2))**2))*exp(-(x1-x2)**2)*sqrt(2./pi) continuous.schmidt.decompose(coupled.harm.fcn, -10, 10, -10, 10)
Making a discretized tensor for a continuous function
discretize.continuous.bipartitefunc(bifunc, x1lo, x1hi, x2lo, x2hi, nbx1 = 100, nbx2 = 100)
discretize.continuous.bipartitefunc(bifunc, x1lo, x1hi, x2lo, x2hi, nbx1 = 100, nbx2 = 100)
bifunc |
bipartitite continuous wavefunction |
x1lo |
lower limit of |
x1hi |
upper limit of |
x2lo |
lower limit of |
x2hi |
upper limit of |
nbx1 |
number of discretized x1 (default: 100) |
nbx2 |
number of discretized x2 (default: 100) |
discretized tensor for Schmidt decomposition
Calculate the entanglement entropy given the calculate Schmidt modes.
entanglement.entropy(modes)
entanglement.entropy(modes)
modes |
Schmidt modes |
entanglement entropy
singlet<- matrix(c(0, sqrt(0.7), sqrt(0.3), 0), byrow = TRUE, nrow = 2) modes<- schmidt.decompose(singlet) entanglement.entropy(modes)
singlet<- matrix(c(0, sqrt(0.7), sqrt(0.3), 0), byrow = TRUE, nrow = 2) modes<- schmidt.decompose(singlet) entanglement.entropy(modes)
Lambda function of the interpolated continous function.
interpolated.continuous.function(xarr, yarr)
interpolated.continuous.function(xarr, yarr)
xarr |
a vector of x (sorted) |
yarr |
a vector of y |
interpolated lambda function
Calculate the negativity given the calculate Schmidt modes.
negativity(modes)
negativity(modes)
modes |
Schmidt modes |
negativity
singlet<- matrix(c(0, sqrt(0.7), sqrt(0.3), 0), byrow = TRUE, nrow = 2) modes<- schmidt.decompose(singlet) negativity(modes)
singlet<- matrix(c(0, sqrt(0.7), sqrt(0.3), 0), byrow = TRUE, nrow = 2) modes<- schmidt.decompose(singlet) negativity(modes)
Calculate the participation ratio given the calculate Schmidt modes.
participation.ratio(modes)
participation.ratio(modes)
modes |
Schmidt modes |
participation ratio
singlet<- matrix(c(0, sqrt(0.7), sqrt(0.3), 0), byrow = TRUE, nrow = 2) modes<- schmidt.decompose(singlet) participation.ratio(modes)
singlet<- matrix(c(0, sqrt(0.7), sqrt(0.3), 0), byrow = TRUE, nrow = 2) modes<- schmidt.decompose(singlet) participation.ratio(modes)
Get reduced density matrix
reduced.denmat(bipartite.qubits, keep.dim = 1)
reduced.denmat(bipartite.qubits, keep.dim = 1)
bipartite.qubits |
tensor of bipartite systems |
keep.dim |
dimension to keep (default: 1) |
reduced density matrix
singlet<- matrix(c(0, sqrt(0.7), sqrt(0.3), 0), byrow = TRUE, nrow = 2) reduced.denmat(singlet)
singlet<- matrix(c(0, sqrt(0.7), sqrt(0.3), 0), byrow = TRUE, nrow = 2) reduced.denmat(singlet)
Perform Schmidt decomposition
schmidt.decompose(bipartite.qubits)
schmidt.decompose(bipartite.qubits)
bipartite.qubits |
tensor of bipartite systems |
Schmidt modes, including the eigenvalues, and eigenvectors of both subsystems of the modes
singlet<- matrix(c(0, sqrt(0.7), sqrt(0.3), 0), byrow = TRUE, nrow = 2) schmidt.decompose(singlet)
singlet<- matrix(c(0, sqrt(0.7), sqrt(0.3), 0), byrow = TRUE, nrow = 2) schmidt.decompose(singlet)