Skip to content

Commit 46223c3

Browse files
Introducing metrics into the interface (#48)
1 parent 66290c0 commit 46223c3

File tree

4 files changed

+44
-2
lines changed

4 files changed

+44
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# News
22

3+
## v0.3.8 - 2025-03-08
4+
- Introduce `metrics.jl` file for metric declarations.
5+
36
## v0.3.7 - 2025-01-16
47

58
- Migrate `express` functionalities and representation types from QuantumSymbolics.

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "QuantumInterface"
22
uuid = "5717a53b-5d69-4fa3-b976-0bf2f97ca1e5"
33
authors = ["QuantumInterface.jl contributors"]
4-
version = "0.3.7"
4+
version = "0.3.8"
55

66
[deps]
77
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"

src/QuantumInterface.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ function squeeze end
8585

8686
function wigner end
8787

88-
8988
include("bases.jl")
9089
include("abstract_types.jl")
9190

@@ -102,4 +101,6 @@ include("sparse.jl")
102101
include("sortedindices.jl")
103102
include("express.jl")
104103

104+
include("metrics.jl")
105+
105106
end # module

src/metrics.jl

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
"""
2+
Calculate the Von Neumann entropy of a density operator, defined as
3+
4+
```math
5+
S(\\rho) = -Tr(\\rho \\log(\\rho))
6+
```
7+
8+
wherein it is understood that ``0 \\log(0) \\equiv 0``.
9+
10+
Consult specific implementation for function arguments and logarithmic basis.
11+
"""
12+
function entropy_vn end
13+
14+
"""
15+
Calculate the joint fidelity of two density operators, defined as
16+
17+
```math
18+
F(\\rho, \\sigma) = Tr(\\sqrt{\\sqrt{\\rho} \\sigma \\sqrt{\\rho}}).
19+
```
20+
21+
Consult specific implementation for function arguments.
22+
"""
23+
function fidelity end
24+
25+
"""
26+
Calculate the logarithmic negativity of a density operator partition, defined as
27+
28+
```math
29+
N(\\rho) = \\log\\|\\rho^{T_B}\\|_1
30+
```
31+
32+
wherein ``\\rho^{T_B}`` denotes partial transposition as per the partition and
33+
``\\|\\bullet\\|_1`` is the trace norm.
34+
35+
36+
Consult specific implementation for function arguments and logarithmic basis.
37+
"""
38+
function logarithmic_negativity end

0 commit comments

Comments
 (0)