Define the coupled two-level systems:
singlet<- matrix(c(0, sqrt(0.7), sqrt(0.3), 0), byrow = TRUE, nrow = 2)
Then run the Schmidt decompotions:
We can easily print the modes:
modes
## [[1]]
## [[1]]$eigenvalue
## [1] 0.7
##
## [[1]]$sys1vector
## [1] -1 0
##
## [[1]]$sys2vector
## [1] 0 -1
##
##
## [[2]]
## [[2]]$eigenvalue
## [1] 0.3
##
## [[2]]$sys1vector
## [1] 0 -1
##
## [[2]]$sys2vector
## [1] -1 0
And their corresponding entanglement entropy:
entanglement.entropy(modes)
## [1] 0.6108643