Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symbolic Objects for Local and Remote entanglement generation processes #45

Merged
merged 14 commits into from
Sep 28, 2023
23 changes: 23 additions & 0 deletions docs/src/references.bib
Original file line number Diff line number Diff line change
Expand Up @@ -230,3 +230,26 @@ @article{naomi2013topological
journal={Nature}
}

@article{prajit2023entangling,
title={Entangling quantum memories via heralded photonic Bell measurement},
author={Prajit Dhara, Dirk Englund, and Saikat Guha},
url={https://journals.aps.org/prresearch/abstract/10.1103/PhysRevResearch.5.033149},
year={2023},
journal={Phys. Rev. Research 5, 033149}
}

@article{prajit2022heralded,
title={Heralded Multiplexed High-Efficiency Cascaded Source of Dual-Rail Entangled Photon Pairs Using Spontaneous Parametric Down-Conversion},
author={Prajit Dhara, Spencer J. Johnson, Christos N. Gagatsos, Paul G. Kwiat, and Saikat Guha},
url={https://journals.aps.org/prapplied/abstract/10.1103/PhysRevApplied.17.034071},
year={2022},
journal={Phys. Rev. Applied 17, 034071}
}

@article{kevin2023zero,
title={Zero-Added-Loss Entangled-Photon Multiplexing for Ground- and Space-Based Quantum Networks},
author={Kevin C. Chen, Prajit Dhara, Mikkel Heuck, Yuan Lee, Wenhan Dai, Saikat Guha, and Dirk Englund},
url={https://journals.aps.org/prapplied/abstract/10.1103/PhysRevApplied.19.054029},
year={2023},
journal={Phys. Rev. Applied 19, 054029}
}
2 changes: 2 additions & 0 deletions src/QuantumSavory.jl
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,8 @@ include("plots.jl")

include("CircuitZoo/CircuitZoo.jl")

include("StatesZoo/StatesZoo.jl")

include("precompile.jl")

end # module
56 changes: 56 additions & 0 deletions src/StatesZoo/StatesZoo.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
module StatesZoo

using QuantumSymbolics, QuantumOpticsBase
using QuantumSymbolics: withmetadata, @withmetadata, Metadata
import QuantumSymbolics: express_nolookup

export SingleRailMidSwapBell, DualRailMidSwapBell, ZALMSpinPair

abstract type AbstractTwoQubitState <: QuantumSymbolics.AbstractTwoQubitOp end #For representing density matrices
Base.show(io::IO, x::AbstractTwoQubitState) = print(io, "$(symbollabel(x))")

_bspin = SpinBasis(1//2)

const cascaded_source_basis = [0 0 0 0;
0 0 0 1;
0 0 0 2;
0 0 1 0;
0 0 1 1;
0 0 2 0;
0 1 0 0;
0 1 0 1;
0 1 0 2;
0 1 1 0;
0 1 1 1;
0 1 2 0;
0 2 0 0;
0 2 0 1;
0 2 0 2;
0 2 1 0;
0 2 1 1;
0 2 2 0;
1 0 0 0;
1 0 0 1;
1 0 0 2;
1 0 1 0;
1 0 1 1;
1 0 2 0;
1 1 0 0;
1 1 0 1;
1 1 0 2;
1 1 1 0;
1 1 1 1;
1 1 2 0;
2 0 0 0;
2 0 0 1;
2 0 0 2;
2 0 1 0;
2 0 1 1;
2 0 2 0]


include("zalm_pair/zalm_pair.jl")
include("zalm_pair/ret_cxy.jl")
include("single_dual_rail_midswap/single_dual_rail_midswap.jl")

end # module
68 changes: 68 additions & 0 deletions src/StatesZoo/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
## Quick Start

Shown below are the typical values for the parameters and how to call the functions:

```
using QuantumSavory.StatesZoo: cascaded_source_photonic, cascaded_source_spin, midswap_dual_rail, midswap_single_rail
```

#### `cascaded_source_photonic()`

```
Ns = 1e-3
eAs = 1
eBs = 1
eD = 0.9
Pd = 1e-8
VisF = 0.99

cascaded_source_photonic(Ns,eAs,eBs,eD,Pd,VisF)
```

#### `cascaded_source_spin()`

```
Ns = 1e-3
gA = 0.5
gB = 0.5
eAm = 1
eBm = 1
eAs = 1
eBs = 1
eD = 0.9
Pd = 1e-8
Pdo1 = 1e-8
Pdo2 = 1e-8
VisF = 0.99

cascaded_source_spin(Ns,gA,gB,eAm,eBm,eAs,eBs,eD,Pd,Pdo1,Pdo2,VisF)
```

#### `midswap_single_rail`

```
eA = 0.9
eB = 0.9
gA = 0.5
gB = 0.5
Pd = 1e-8
Vis = 0.99

midswap_single_rail(eA,eB,gA,gB,Pd,Vis)
```

#### `midswap_dual_rail`

```
eA = 0.9
eB = 0.9
gA = 0.5
gB = 0.5
Pd = 1e-8
Vis = 0.99


midswap_dual_rail(eA,eB,gA,gB,Pd,Vis)
```

Note: Details and references in the respective readme.md files in the matlab folder
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
function Mv=midswap_dual_rail(eA,eB,gA,gB,Pd,Vis)
% Author: Prajit Dhara
% Function to calculate the spin-spin density matrix for midpoint swap
% using memories emitting dual rail photonic qubits
% Inputs:
% eA, eB: Link efficiencies for memories A and B upto the swap (include link loss, detector efficiency, etc.)
% Range: [0,1]; Typical value: 1-1e-4
% gA, gB: Memory initialization parameter for memories A and B
% Range: [0,1]; Typical value: 0.5
% Memory emission model: \sqrt{1-g} |0>_M\otimes |0,1>_P + \sqrt{g} |1>_M\otimes |1,0>_P
% Pd: Detector dark count probability per photonic mode (assumed to be the same for both detectors)
% Range: [0,1]; Typical value: 1e-8
% Vis: Interferometer visibility for the midpoint swap ()
% Range:[0,1]; Typical value: 0.9-1
% Output:
% Mv: Spin-spin density matrix for the two memories after the midpoint swap
% Basis: |00>, |01>, |10>, |11>

m11=((1/2).*eA.*(1+(-1).*eB).*gA.*gB+(1/2).*(1+(-1).*eA).*eB.* ...
gA.*gB).*(1+(-1).*Pd).^3.*Pd+(1+(-1).*eA).*(1+(-1).*eB).* ...
gA.*gB.*(1+(-1).*Pd).^2.*Pd.^2;

m22=(1/4).*eA.*eB.*gA.*(1+(-1).*gB).*(1+(-1).*Pd).^4+(1/2).*eA.* ...
(1+(-1).*eB).*gA.*(1+(-1).*gB).*(1+(-1).*Pd).^3.*Pd+(1/2).*( ...
1+(-1).*eA).*eB.*gA.*(1+(-1).*gB).*(1+(-1).*Pd).^3.*Pd+(1+( ...
-1).*eA).*(1+(-1).*eB).*gA.*(1+(-1).*gB).*(1+(-1).*Pd).^2.* ...
Pd.^2;

m33=(1/4).*eA.*eB.*(1+(-1).*gA).*gB.*(1+(-1).*Pd).^4+(1/2).*eA.* ...
(1+(-1).*eB).*(1+(-1).*gA).*gB.*(1+(-1).*Pd).^3.*Pd+(1/2).*( ...
1+(-1).*eA).*eB.*(1+(-1).*gA).*gB.*(1+(-1).*Pd).^3.*Pd+(1+( ...
-1).*eA).*(1+(-1).*eB).*(1+(-1).*gA).*gB.*(1+(-1).*Pd).^2.* ...
Pd.^2;

m44=((1/2).*eA.*(1+(-1).*eB).*(1+(-1).*gA).*(1+(-1).*gB)+(1/2).* ...
(1+(-1).*eA).*eB.*(1+(-1).*gA).*(1+(-1).*gB)).*(1+(-1).*Pd) ...
.^3.*Pd+(1+(-1).*eA).*(1+(-1).*eB).*(1+(-1).*gA).*(1+(-1).* ...
gB).*(1+(-1).*Pd).^2.*Pd.^2;

m23=(Vis.^2).*(1/4).*eA.*eB.*(1+(-1).*gA).^(1/2).*gA.^(1/2).*(1+(-1).*gB) ...
.^(1/2).*gB.^(1/2).*(1+(-1).*Pd).^4;

m32=conj(m23);
Mv=[m11, 0, 0, 0 ; 0, m22, m23, 0 ; 0, m32, m33, 0 ; 0, 0, 0, m44];

end
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
function Mv=midswap_single_rail(eA,eB,gA,gB,Pd,Vis)
% Author: Prajit Dhara
% Function to calculate the spin-spin density matrix for midpoint swap
% using memories emitting single rail photonic qubits
% Inputs:
% eA, eB: Link efficiencies for memories A and B upto the swap (include link loss, detector efficiency, etc.)
% Range: [0,1]; Typical value: 1-1e-4
% gA, gB: Memory initialization parameter for memories A and B
% Range: [0,1]; Typical value: 0.5 (set to achieve maximum hashing bound or reach target fidelity)
% Memory emission model: \sqrt{1-g} |0>_M\otimes |1>_P + \sqrt{g} |1>_M\otimes |0>_P
% Pd: Detector dark count probability per photonic mode (assumed to be the same for both detectors)
% Range: [0,1]; Typical value: 1e-8
% Vis: Interferometer visibility for the midpoint swap; can be a complex number to account for phase mismatch
% Range (absolute value):[0,1]; Typical value: 0.9-1
% Output:
% Mv: Spin-spin density matrix for the two memories after the midpoint swap
% Basis: |00>, |01>, |10>, |11>
m11=gA.*gB.*(1-Pd).*Pd;
m22=(1/2).*eB.*gA.*(1-gB).*(1-Pd).^2 ...
+(1-eB).*gA.*(1-gB).*(1-Pd).*Pd;

m33=(1/2).*eA.*(1-gA).*gB.*(1-Pd).^2 ...
+(1-eA).*(1-gA).*gB.*(1-Pd).*Pd;

m23=(Vis).*(1/2).*((eA.*eB.*(1-gA).*gA.*(1-gB).*gB).^(1/2)).*(1-Pd).^2;

m32=(Vis).*(1/2).*((eA.*eB.*(1-gA).*gA.*(1-gB).*gB).^(1/2)).*(1-Pd).^2;
%
m44=((1/2).*eB.*(1-eA).*(1-gA).*(1-gB)...
+(1/2).*eA.*(1-eB).*(1-gA).*(1-gB)).*(1-Pd).^2 ...
+(1-eA).*(1-eB).*(1-gA).*(1-gB).*(1-Pd).*Pd;
%
Mv=[m11, 0, 0, 0 ; 0, m22, m23, 0 ; 0, m32, m33, 0 ; 0, 0, 0, m44];

end
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Entanglement Swap with Emissive Memories
## Overview
This folder contains the functions required to generate the spin-spin density matrix generated by linear photonic entanglement swap with emissive memories. The functions are written in MATLAB. The functions are:
- midswap_dual_rail.m: Generates the spin-spin density matrix for linear photonic entanglement swap with emissive memories emitting dual rail photonic qubits from the papers Ref. 1.
- midswap_single_rail.m: Generates the spin-spin density matrix for linear photonic entanglement swap with emissive memories emitting single rail photonic qubits from the papers Ref. 1.

## Detailed Descriptions
### midswap_dual_rail.m
This function generates the spin-spin density matrix for linear photonic entanglement swap with emissive memories emitting dual rail photonic qubits

**Inputs:**
- eA, eB: Link efficiencies for memories A and B upto the swap (include link loss, detector efficiency, etc.)
- Range: $[0,1]$
- Typical value: $1\leftrightarrow10^{-4}$
- gA, gB: Memory initialization parameter for memories A and B
- Range: $[0,1]$
- Typical value: $0.5$
- Memory emission model: $\sqrt{1-g_k} \ket{0} _M\otimes \ket{0,1}_P + \sqrt{g_k} \ket{1}_M\otimes \ket{1,0}_P$
- Pd: Detector dark count probability per photonic mode (assumed to be the same for both detectors)
- Range: $[0,1)$
- Typical value: $10^{-8}$
- Vis: Interferometer visibility for the midpoint swap ()
- Range: $[0,1]$
- Typical value: $0.99$

**Output:**
- Mv: Spin-spin density matrix for the two memories after the midpoint swap
- Basis order: $\ket{0,0}, \ket{0,1}, \ket{1,0}, \ket{1,1}$

### midswap_single_rail.m
This function generates the spin-spin density matrix for linear photonic entanglement swap with emissive memories emitting single rail photonic qubits

**Inputs:**
- eA, eB: Link efficiencies for memories A and B upto the swap (include link loss, detector efficiency, etc.)
- Range: $[0,1]$
- Typical value: $1\leftrightarrow10^{-4}$
- gA, gB: Memory initialization parameter for memories A and B
- Range: $[0,1]$
- Typical value: $0.5$
- Memory emission model: $\sqrt{1-g_k} \ket{0} _M\otimes \ket{1}_P + \sqrt{g_k} \ket{1}_M\otimes \ket{0}_P$
- Pd: Detector dark count probability per photonic mode (assumed to be the same for both detectors)
- Range: $[0,1)$
- Typical value: $10^{-8}$
- Vis: Interferometer visibility for the midpoint swap' can be complex to account for phase instability
- Range (absolute value): $[0,1]$
- Typical value: $0.99$

**Output:**
- Mv: Spin-spin density matrix for the two memories after the midpoint swap
- Basis order: $\ket{0,0}, \ket{0,1}, \ket{1,0}, \ket{1,1}$

## Usage
The functions can be used as follows:
```matlab
% Parameters
eA = 0.9; % Link efficiency for memory A
eB = 0.9; % Link efficiency for memory B
gA = 0.5; % Initialization parameter for memory A
gB = 0.5; % Initialization parameter for memory B
Pd = 1e-8; % Dark count probability per photonic mode
Vis = 0.99; % Interferometer visibility
%% Generate the spin-spin density matrix
M_dual= midswap_dual_rail(eA,eB,gA,gB,Pd,Vis); % For dual rail photonic qubits
M_single = midswap_single_rail(eA,eB,gA,gB,Pd,Vis); % For single rail photonic qubits

%% Calculate the probability of success
P_succ_dual = trace(M_dual)*4; % Multiply by 4 to account for all click patterns
P_succ_single = trace(M_single)*2; % Multiply by 2 to account for all click patterns

%% Calculate the fidelity
F_dual = 0.5*(M_dual(2,2)+M_dual(3,3)+M_dual(2,3)+M_dual(3,2));
F_single = 0.5*(M_single(2,2)+M_single(3,3)+M_single(2,3)+M_single(3,2));

```


## Reference
1. [P. Dhara, D. Englund, S. Guha, Entangling quantum memories via heralded photonic Bell measurement. Phys. Rev. Res. 5, 033149 (2023).](https://journals.aps.org/prresearch/abstract/10.1103/PhysRevResearch.5.033149)
6 changes: 6 additions & 0 deletions src/StatesZoo/single_dual_rail_midswap/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
The above code was translated from the code in the matlab files in the adjoining folder. The process for converting to julia involved:
- Removing the broadcasting operator `.`, because the calculation is being performed on scalars.
- Some spots needed the addition of brackets to clarify the ambiguity caused by the priority of operations.
- Some spots needed `\` merging with previous line to avoid to ambiguity about end of expression.

Then the output of the functions were linked to their corresponding symboic object which can be expressed as a density matrix in QuantumOptics representation.
Loading