-
Notifications
You must be signed in to change notification settings - Fork 0
/
two-mode-squeeze-herald.jl
2304 lines (1857 loc) · 83.2 KB
/
two-mode-squeeze-herald.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
### A Pluto.jl notebook ###
# v0.17.5
using Markdown
using InteractiveUtils
# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error).
macro bind(def, element)
quote
local iv = try Base.loaded_modules[Base.PkgId(Base.UUID("6e696c72-6542-2067-7265-42206c756150"), "AbstractPlutoDingetjes")].Bonds.initial_value catch; b -> missing; end
local el = $(esc(element))
global $(esc(def)) = Core.applicable(Base.get, el) ? Base.get(el) : iv(el)
el
end
end
# ╔═╡ 637715ed-ceb6-4992-b665-026088559278
begin
using QuantumOptics, Plots, PlutoUI
const F₀ = 6.5e3/2/π # 6.5 GHz omega
const k_per_h = 20.84e3 # MHz per K
const n_per_T = k_per_h/F₀ # photons per K
const tsteps = 50
# Raniwala's design
const gᵐˢ = 12.
const gᵒᵐ₀ = 0.268 # MHz
const T₁ᵃ = 3e4 / 190e6 # 1/MHz
const T₂ˢ = 1000. # Fake large number for an unused part of the system
function prep(; N=3,
gᵒᵐ=0.268,
gᵐˢ = 12.,
T₁ᵃ = 3e4 / 190e6,
T₂ˢ = 1000.,
γ = 0.201449,
nₜ = 0.00325
)
ℬₚ = FockBasis(N)
ℬₛ = SpinBasis(1//2)
ℬ = ℬₚ⊗ℬₚ⊗ℬₛ
â = b̂ = destroy(ℬₚ)
n̂ᵃ = n̂ᵇ = number(ℬₚ)
σ̂₋ = sigmam(ℬₛ)
n̂ˢ = projector(spinup(ℬₛ))
 = embed(ℬ, 1, â)
B̂ = embed(ℬ, 2, b̂)
N̂ᵃ = embed(ℬ, 1, n̂ᵃ)
N̂ᵇ = embed(ℬ, 2, n̂ᵇ)
Σ̂₋ = embed(ℬ, 3, σ̂₋)
N̂ˢ = embed(ℬ, 3, n̂ˢ)
Ĥᵒᵐ = gᵒᵐ * Â * B̂
Ĥᵒᵐ += Ĥᵒᵐ'
Ĥᵐˢ = gᵐˢ * B̂ * Σ̂₋'
Ĥᵐˢ += Ĥᵐˢ'
Ĉˢ = 1/√T₂ˢ * N̂ˢ
Ĉᵃ = 1/√T₁ᵃ * Â
Ĉᵇ = √(γ/2 * (nₜ+1)) * B̂
Ĉᵇ₁ = √(γ/2 * nₜ) * B̂'
Ĥᵢₘ = -1im/2 * (Ĉᵃ'*Ĉᵃ + Ĉᵇ'*Ĉᵇ + Ĉᵇ₁'*Ĉᵇ₁ + Ĉˢ'*Ĉˢ)
vac = fockstate(ℬₚ, 0) ⊗ fockstate(ℬₚ, 0) ⊗ spindown(ℬₛ)
vacꜛ = fockstate(ℬₚ, 0) ⊗ fockstate(ℬₚ, 0) ⊗ spinup(ℬₛ)
excitationpair = fockstate(ℬₚ, 1) ⊗ fockstate(ℬₚ, 1) ⊗ spindown(ℬₛ)
Pvac = projector(vac)
Pvacꜛ = projector(vacꜛ)
return (;(Base.@locals)...)
end
function apply_jump(ψ,c)
ψₙ = c*ψ
ψₙ /= norm(ψₙ)
ψₙ
end
pdf(ψ,c) = norm(c*ψ)/norm(ψ)
md"Some more helper code in this cell."
end
# ╔═╡ b576bacc-c769-4b0d-b033-ad1ad0cd4181
md"""
# Heralded Single Phonon Generation in an Optomechanical System
_Supplementary to "Spin-optomechanical quantum interface enabled by an ultrasmall mechanical and optical mode volume cavity" by H. Raniwala, S. Krastanov, M. Eichenfield, and D. R. Englund, 2022_
Can be found at:
- Repository [`github.com/Krastanov/optomechspin_heralded_entanglement`](https://github.com/Krastanov/optomechspin_heralded_entanglement)
- Interactive at [`pluto.krastanov.org/two-mode-squeeze-herald.html`](https://pluto.krastanov.org/two-mode-squeeze-herald.html)
- Archived together with the publication
For any system in which two-mode squeezing is used for heralded generation of single photons.
$\hat{H}=g \hat{a}^\dagger \hat{b}^\dagger + H.c.
- \frac{i}{2}\sum \hat{c}_l^\dagger\hat{c}_l$
with
- photon decay $\hat{c}_a=\frac{1}{\sqrt{T_a}}\hat{a}$
- phonon decay $\hat{c}_b=\sqrt{\gamma\frac{n_\textrm{th}+1}{2}}\hat{b}$
- phonon heating $\hat{c}_{b1}=\sqrt{\gamma\frac{n_\textrm{th}}{2}}\hat{b}^\dagger$
resulting into
$\hat{H}=g \hat{a}^\dagger \hat{b}^\dagger + H.c.
-\frac{i}{2}\left(
\frac{1}{T_a}n̂_a + γn_\textrm{th}\left(n̂_b+\frac{1}{2}\hat{Id}\right)
\right)$
We will be starting with $|00\rangle$. Most of the time no event will be happening, however an $a$ jump might happen leading to the desired heralded state. Leading sources of infidelity will be events $b$ or $b_1$ happening before or after $a$.
In the basis $\left\{| 00\rangle,| 11\rangle,| 01\rangle,| 10\rangle\right\}$ we get
$-i\hat{H}=
\begin{pmatrix}
0 & -ig & & \\
-ig & -\frac{1}{2}(\frac{1}{T_a}+γ(n_\textrm{th}+½)) & & \\
& & -\frac{γ(n_\textrm{th}+½)}{2} & 0 \\
& & 0 & -\frac{1}{2T_a}
\end{pmatrix}-\frac{\gamma n_\textrm{th}\hat{Id}}{4}$
**We neglect double excitations by choosing this basis.** We could have used a smaller basis $\left\{| 00\rangle,| 11\rangle\right\}$, but the larger one is instructive for when we look at the heralded jump.
In the smaller basis we have (with more convenient constants as defined below)
$-i\hat{H}=
\begin{pmatrix}
-\lambda_h & -ig \\
-ig & -2\lambda_l-\lambda_h
\end{pmatrix}$
The eigen solutions are
$|\psi_-\rangle = e^{-\lambda t} e^{-iGt} \frac{1}{\sqrt2}
\begin{pmatrix}
\frac{g}{G-i\lambda_l} \\
1
\end{pmatrix}$
and
$|\psi_+\rangle = e^{-\lambda t} e^{iGt} \frac{1}{\sqrt2}
\begin{pmatrix}
-\frac{g}{G+i\lambda_l} \\
1
\end{pmatrix}$
where
- total amplitude shrinkage $\lambda = \lambda_\textrm{l}+\lambda_\textrm{h} = \frac{1}{4T_a}+\frac{1}{4}γ(2n_\textrm{th}+½)$
- loss param $\lambda_\textrm{l} = \frac{1}{4}(\frac{1}{T_a}+γ(n_\textrm{th}+½))$
- heat param $\lambda_\textrm{h} = \frac{\gamma n_\textrm{th}}{4}$
- corrected interaction frequency $G = \sqrt{g^2-\lambda_l^2}$
- notice that $\left|\frac{g}{G+i\lambda_l}\right|=\left|\frac{g}{G-i\lambda_l}\right|=1$ hence the $\frac{1}{\sqrt2}$ normalization factor
"""
# ╔═╡ 74b628b2-82d5-471b-9f40-18b3b547668b
md"""
## Evolution starting at $|00\rangle$
For initial state $| 00\rangle$ this implies
$|\psi_{00}\rangle = \frac{g}{\sqrt2G}\left(|\psi_-\rangle - |\psi_+\rangle\right)
= e^{-\lambda t}
\begin{pmatrix}
\cos(Gt) + \frac{\lambda_l}{G}\sin(Gt) \\
-i \frac{g}{G} \sin(Gt)
\end{pmatrix}$
## Evolution starting at $|11\rangle$
$|\psi_{11}\rangle =
\frac{1}{\sqrt2G}\left(\left(G-i\lambda_l\right)|\psi_-\rangle + \left(G+i\lambda_l\right)|\psi_+\rangle\right)
= e^{-\lambda t}
\begin{pmatrix}
-i\frac{g}{G}\sin(Gt) \\
\cos(Gt) - \frac{\lambda_l}{G}\sin(Gt)
\end{pmatrix}$
"""
# ╔═╡ 89a7d7af-34a5-434d-b409-b40a070b5a3c
md"""
## What if $\lambda_l > g$?
Then $G$ becomes imaginary, but taking into account that $i\sinh(x)=\sin(ix)$ and $\cosh(x)=\cos(ix)$ we get
$|\psi_{00}\rangle = e^{-\lambda t}
\begin{pmatrix}
\cosh(|G|t) + \frac{\lambda_l}{|G|}\sinh(|G|t) \\
-i \frac{g}{|G|} \sinh(|G|t)
\end{pmatrix}
\underset{t\gg 1/\lambda_l,\ g\ll\lambda_l}{\to}
\frac{1}{2}e^{-\left(\frac{g^2}{2\lambda_l} +\lambda_h\right)t}
\begin{pmatrix}
1 + \frac{\lambda_l}{|G|} \\
-i \frac{g}{|G|}
\end{pmatrix}$
$|\psi_{11}\rangle = e^{-\lambda t}
\begin{pmatrix}
-i\frac{g}{|G|}\sinh(|G|t) \\
\cosh(|G|t) - \frac{\lambda_l}{|G|}\sinh(|G|t)
\end{pmatrix}
\underset{t\gg 1/\lambda_l,\ g\ll\lambda_l}{\to}
\frac{1}{2}e^{-\left(\frac{g^2}{2\lambda_l} +\lambda_h\right)t}
\begin{pmatrix}
-i\frac{g}{|G|} \\
1 - \frac{\lambda_l}{|G|}
\end{pmatrix}$
**Notice that if $g\ll\lambda_l$, then the effect of the $|G|-\lambda_l$ in the exponential is quadratically suppressed and a quasi-steady state is reached very rapidly and then decays at rate $\frac{g^2}{\lambda}$.**
"""
# ╔═╡ a7d208cc-5c47-4fb3-8920-472e224bdc53
md"""
### Comparison to exact calculation
Below you can compare our approximate analytic solution to a complete numerical simulation and see they match as long as we do not keep state $|11\rangle$ populated (in order to avoid double excitations).
`g :` $(@bind gtoy Slider(0.1:0.1:5; default=1, show_value=true))
`λₗ:` $(@bind λₗtoy Slider(0.1:0.1:5; default=2, show_value=true))
`λₕ:` $(@bind λₕtoy Slider(0.0:0.1:5; default=0, show_value=true))
Log axis $(@bind logaxistoy CheckBox())
"""
# ╔═╡ aba7b5fd-9905-4915-a691-34cee7fbbb7b
md"""## State after jump at time $\tau$
Various jumps can occur and we will need to be able to track them if we are to calculate infidelities of the heralded state (as opposed to calculating just the heralding probability).
- after $\hat{c}_a$: $| \psi_a \rangle = | 01\rangle$
- after $\hat{c}_b$: $| \psi_b \rangle = | 10\rangle$
- after $\hat{c}_{b1}$: $| \psi_{b1} \rangle =$ superposition of $| 01\rangle$ and $| 12 \rangle$
$\hat{H}=g \hat{a}^\dagger \hat{b}^\dagger + H.c.
-\frac{i}{2}\left(
\frac{1}{T_a}n̂_a + γn_\textrm{th}\left(n̂_b+\frac{1}{2}\hat{Id}\right)
\right)$
In the basis $\left\{| 00\rangle,| 11\rangle,| 01\rangle,| 10\rangle,| 12\rangle,| 21\rangle\right\}$ we get
$-i\hat{H}=
\begin{pmatrix}
0 & -ig & & & & \\
-ig & -\frac{1}{2}(\frac{1}{T_a}+γ(n_\textrm{th}+½)) & & & & \\
& & -\frac{γ(n_\textrm{th}+½)}{2} & 0& -\sqrt2ig & \\
& & 0 & -\frac{1}{2T_a} & 0&-\sqrt2ig \\
&&-\sqrt2ig& 0 & -\frac{1}{2T_a} -γ(n_\textrm{th}+½) & 0 \\
&&&-\sqrt2ig& 0 & -\frac{1}{T_a} -\frac{γ(n_\textrm{th}+½)}{2}
\end{pmatrix}-\frac{\gamma n_\textrm{th}\hat{Id}}{4}$
Conveniently, we can again restrict ourselves to two-dimensional subspaces, either $\left\{| 01\rangle, | 12\rangle\right\}$, or $\left\{| 10\rangle, | 21\rangle\right\}$, in both of which we have a Hamiltonian with the same shape as previously solved, but different values for the parameters:
$-i\hat{H}=
\begin{pmatrix}
-\tilde{\lambda}_h & -i\tilde{g} \\
-i\tilde{g} & -2\tilde{\lambda}_l-\tilde{\lambda}_h
\end{pmatrix}$
**We are again neglecting double excitations by choosing this basis.**
### Dynamics of $|01\rangle$
In $\left\{| 01\rangle, | 12\rangle\right\}$ we have
- Interaction rate $\tilde{g} = \sqrt2 g$
- Excited state decay param $\tilde{\lambda}_l = \lambda_l = \frac{1}{4}(\frac{1}{T_a}+γ(n_\textrm{th}+½))$
- Shared state decay param $\tilde{\lambda}_{h01} = \gamma\left(\frac{3}{4}n_\textrm{th}+\frac{1}{4}\right)$
### Dynamics of $|10\rangle$
In $\left\{| 10\rangle, | 21\rangle\right\}$ we have
- Interaction rate $\tilde{g} = \sqrt2 g$
- Excited state decay param: $\tilde{\lambda}_l = \lambda_l = \frac{1}{4}(\frac{1}{T_a}+γ(n_\textrm{th}+½))$
- Shared state decay param $\tilde{\lambda}_{h10} = \frac{1}{2T_a}+\frac{1}{4}\gamma n_\textrm{th}$
"""
# ╔═╡ 2fdaf940-174b-411f-905f-7d3dd101dc2f
begin
G(g,λₗ) = √Complex(g^2-λₗ^2)
λₗ(Tₐ, γ, nₜₕ) = 0.25*(1/Tₐ + γ*(nₜₕ+0.5))
λₕ(Tₐ, γ, nₜₕ) = 0.25*γ*nₜₕ
λₕ₀₁(Tₐ, γ, nₜₕ) = γ*(0.75*nₜₕ+0.25)
λₕ₁₀(Tₐ, γ, nₜₕ) = 0.5/Tₐ + 0.25*γ*nₜₕ
"""The time evolution operator, i.e. columns {|ψ₀₀⟩,|ψ₁₁⟩}"""
function U(g,λₗ,λₕ,t)
Γ = G(g,λₗ)
λ = λₗ+λₕ
c = cos(Γ * t)
s = sin(Γ * t)
exp(-λ*t)*[c+λₗ/Γ*s -im*g/Γ*s;
-im*g/Γ*s c-λₗ/Γ*s]
end
"""The time evolution operator in the g≪λₗ limit."""
function Uₗᵢₘ(g,λₗ,λₕ,t)
Γ = abs(G(g,λₗ))
0.5 * exp((-g^2/2/λₗ + λₕ)*t) * [ 1+λₗ/Γ -im*g/Γ;
-im*g/Γ 1-λₗ/Γ]
end
md"Implementing the aforementioned formulas"
end
# ╔═╡ e6b3962c-1a45-47ac-ad12-0e429c2bcccc
let
ts0 = (0:0.025:4)
ts = ts0./gtoy # time span
# Theory plot
Us = cat(U.(gtoy,λₗtoy,λₕtoy,ts)...,dims=3)
Usapprox = cat(Uₗᵢₘ.(gtoy,λₗtoy,λₕtoy,ts)...,dims=3)
p00 = plot(ts0, abs.(Usapprox[1,1,:]), label=nothing, c=1,
title="Amplitudes vs time for different initial states")
plot!(ts0, abs.(Usapprox[1,2,:]), label=nothing, c=2)
plot!(ts0, abs.(Us[1,1,:]), label=nothing, c=1, ls=:dot)
plot!(ts0, abs.(Us[1,2,:]), label=nothing, c=2, ls=:dot)
p11 = plot(ts0, abs.(Usapprox[2,1,:]), label="|00⟩ (g≪λₗ limit)", c=1,
xlabel="time (1/g)")
plot!(ts0, abs.(Usapprox[2,2,:]), label="|11⟩ (g≪λₗ limit)", c=2)
plot!(ts0, abs.(Us[2,1,:]), label="|00⟩ (two-level approx)", c=1, ls=:dot)
plot!(ts0, abs.(Us[2,2,:]), label="|11⟩ (two-level approx)", c=2, ls=:dot)
# Numerics plot
nₜ = 1.
γ = 4*λₕtoy/nₜ
T₁ᵃ = 1/4/(λₗtoy+γ*(nₜ+0.5))
e = prep(;gᵒᵐ=gtoy,gᵐˢ=0,T₁ᵃ=T₁ᵃ,T₂ˢ=1e6,nₜ=nₜ,γ=γ)
# TODO find a way to use the nice DifferentialEquations.jl interface
_, ψ₀₀ = timeevolution.schroedinger(ts, e.vac, e.Ĥᵒᵐ+e.Ĥᵢₘ)
ψ₀₀00 = (ψ -> e.vac'*ψ).(ψ₀₀)
ψ₀₀11 = (ψ -> e.excitationpair'*ψ).(ψ₀₀)
plot!(p00,ts0,abs.(ψ₀₀00),ls=:dash,c=1, label=nothing)
plot!(p00,ts0,abs.(ψ₀₀11),ls=:dash,c=2, label=nothing)
_, ψ₁₁ = timeevolution.schroedinger(ts, e.excitationpair, e.Ĥᵒᵐ+e.Ĥᵢₘ)
ψ₁₁00 = (ψ -> e.vac'*ψ).(ψ₁₁)
ψ₁₁11 = (ψ -> e.excitationpair'*ψ).(ψ₁₁)
plot!(p11,ts0,abs.(ψ₁₁00),ls=:dash,c=1, label="|00⟩ (full numerics)")
plot!(p11,ts0,abs.(ψ₁₁11),ls=:dash,c=2, label="|11⟩ (full numerics)")
if logaxistoy
plot(p00,p11,layout=(2,1),yaxis=:log10,ylims=(1e-3,1))
else
plot(p00,p11,layout=(2,1))
end
end
# ╔═╡ 8f5f0424-1e03-473e-8cd4-32934fadc581
md"""
## Probability of event
The probability density for an event $c$ is
$\textrm{pdf}_c = \frac{\textrm{d}P_c}{\textrm{d}t}
= \langle\psi\mid\hat{c}^\dagger\hat{c}\mid\psi\rangle
/ \langle\psi\mid\psi\rangle$
and the probability of any event happening at all is
$\int_0^t\textrm{pdf}_* = \int_0^t\sum_i \textrm{pdf}_{c_i}=1-\langle\psi(t)\mid\psi(t)\rangle.$
Here are the branches of the multiverse that we need to track (events that "click" as heralded, but only the first one is good):
- **just $a$ (the good event)**: In the limit of large $t$ and small $g$ its PDF is $\textrm{pdf}_a(t) = \frac{1}{T_a}\left(\frac{g}{2\lambda_l}\right)^2$.
- **an $a$ at $t=\tau$ followed by any other event**: Creates an $|01\rangle$ and evolves in $\{|01\rangle,|12\rangle\}$. In the same limit its conditional probability after the $a$ jump is $P_{a*}(t,\tau)=1-e^{-\left(\frac{\tilde{g}^2}{\lambda_l}+2\tilde{\lambda}_{h01}\right)(t-\tau)}$
- **a $b$ at $t=\tau$ followed by $a$**: Creates an $|10\rangle$ and evolves in $\{|10\rangle,|21\rangle\}$. In the same limit its probability density for the $b$ jump is $\textrm{pdf}_b(t) = \gamma\frac{n_\textrm{th}+1}{2}\left(\frac{g}{2\lambda_l}\right)^2$ and the probability denstity for $a$ after $b$ is $\textrm{pdf}_{ba}(t_{>\tau})=\frac{1}{T_a}$
- **a $b_1$ followed by $a$**: Creates a superposition evolving in $\{|01\rangle,|12\rangle\}$. In the same limit its probability density for the $b_1$ jump is $\textrm{pdf}_{b1}(t) = \gamma\frac{n_\textrm{th}}{2}$ and the probability denstity for $a$ after $b_1$ is $\textrm{pdf}_{b1a}(t_{>\tau})=\frac{1}{T_a}\left(\frac{\tilde{g}}{2\lambda_l}\right)^2$
Thus, for pumps of duration $T$, as long as the henceforth calculated probabilities are small, we end up with:
- Probability of $a$ happening first $P_\textrm{first a} = \int_0^T \textrm{d}t\ \textrm{pdf}_a(t) = \frac{T}{T_a}\left(\frac{g}{2\lambda_l}\right)^2$
- Probability of $a$ happening first, followed by a bad event $P_\textrm{a then bad}=\int_0^T\textrm{d}\tau\ \textrm{pdf}_a(\tau) P_{a*}(T,\tau) = \frac{T+C^{-1}(e^{-CT}-1)}{T_a}\left(\frac{g}{2\lambda_l}\right)^2$, with $C=\frac{\tilde{g}^2}{\lambda_l}+2\tilde{\lambda}_{h01}$
- Probability of $b$ followed by $a$ $P_{ba} = \int_0^T \textrm{d}\tau\ \textrm{pdf}_b(\tau) \int_\tau^T\textrm{d}t\ \textrm{pdf}_{ba}(t)=\frac{T^2}{2}\frac{1}{T_a}\gamma\frac{n_\textrm{th}+1}{2}\left(\frac{g}{2\lambda_l}\right)^2$
- Similarly for $b_1$ followed by $a$ $P_{b1a} =\frac{T^2}{2}\frac{1}{T_a}\gamma\frac{n_\textrm{th}}{2}\left(\frac{\tilde{g}}{2\lambda_l}\right)^2$
"""
# ╔═╡ 5ea35653-e67d-4f33-9bbd-2f59d1c731a7
begin
pdf_a(t,g,λₗ,Tₐ) = 1/Tₐ * (g/2/λₗ)^2
P_a✽(t,τ,g,λₗ,λₕ₀₁) = 1 - exp(-2* (g^2/λₗ + λₕ₀₁) * (t-τ))
pdf_b(t,g,λₗ,γ,nₜₕ) = γ * (nₜₕ+1)/2 * (g/2/λₗ)^2
pdf_ba(t,Tₐ) = 1/Tₐ
pdf_b1(t,γ,nₜₕ) = γ*nₜₕ/2
pdf_b1a(t,g,λₗ,Tₐ) = pdf_a(t,√2*g,λₗ,Tₐ)
md"Implementing the aforementioned formulas"
end
# ╔═╡ 05bcbadf-b764-4f0a-8115-8938860794ea
md"""
### Comparison to exact calculation
Comparing the probability densities derived above to numerical simulations. This time we will use values based on the design by Hamza Raniwala.
Pump photons
`log₁₀(n) : `$(@bind log₁₀n Slider(0:0.5:3; default=2, show_value=true))
Temperature (in K)
`log₁₀(T) : `$(@bind log₁₀T Slider(-2:0.1:2; show_value=true))
Mechanical Quality Factor
`log₁₀(Qₘ): `$(@bind log₁₀Qₘ Slider(3:0.5:9; default=6, show_value=true))
Pump Duration (in units of optical lifetime)
`τ = t/T₁ᵃ: `$(@bind τ Slider(1:100; default=20, show_value=true))
Jump location (if any)
`jump indx: `$(@bind i_jmp Slider(2:tsteps-2; default=tsteps÷2))
"""
# ╔═╡ a03f56e0-bf39-4645-a57f-0955903cf7a2
begin
n = 10. ^ log₁₀n
gᵒᵐ = √n * gᵒᵐ₀ # MHz
Temp = 10. ^ log₁₀T
Qₘ = 10. ^ log₁₀Qₘ
nₜ = n_per_T*Temp
γ = π*F₀/Qₘ
md"""
from Raniwala's design:
$g_0$ = $(round(gᵒᵐ₀,digits=3)) MHz and T_a = $(round(T₁ᵃ*1000,digits=3)) ns
(i.e. 1/Tₐ= $(round(1/T₁ᵃ/1000,digits=2)) GHz)
derived:
| n | g | T | Qₘ | nₜₕ |
|:--|:--|:--|:---|:----|
| $(round(n)) | $(round(gᵒᵐ,digits=1)) MHz | $(round(Temp,digits=3)) K | $(round(Qₘ,digits=-3)) | $(round(nₜ,digits=2))
"""
end
# ╔═╡ 69ad33a1-7497-4439-bdfa-8a8e30bd5068
let
Λₗ = λₗ(T₁ᵃ,γ,nₜ)
Λₕ₀₁ = λₕ₀₁(T₁ᵃ,γ,nₜ)
e = prep(;gᵒᵐ,gᵐˢ,T₁ᵃ,T₂ˢ,nₜ,γ)
# Before Jump
times = range(0, τ*T₁ᵃ; length=tsteps)
Δt = times[2]
_, states = timeevolution.schroedinger(times, e.vac, e.Ĥᵒᵐ+e.Ĥᵢₘ)
# TODO: tracking the spin is not actually necessary here
# After Jump
t_jmp = times[i_jmp]
times_ajmp = range(0, τ*T₁ᵃ*(tsteps-i_jmp)/tsteps; length=tsteps-i_jmp)
state_ajmp = e.Ĉᵃ*states[i_jmp]
state_ajmp /= norm(state_ajmp)
_, states_ajmp = timeevolution.schroedinger(times_ajmp, state_ajmp, e.Ĥᵒᵐ+e.Ĥᵢₘ)
state_bjmp = e.Ĉᵇ*states[i_jmp]
state_bjmp /= norm(state_bjmp)
_, states_bjmp = timeevolution.schroedinger(times_ajmp, state_bjmp, e.Ĥᵒᵐ+e.Ĥᵢₘ)
state_b1jmp = e.Ĉᵇ₁*states[i_jmp]
state_b1jmp /= norm(state_b1jmp)
_, states_b1jmp = timeevolution.schroedinger(times_ajmp, state_b1jmp, e.Ĥᵒᵐ+e.Ĥᵢₘ)
make_pdf(Op) = ψ -> real(expect(Op'*Op , ψ))/norm(ψ)
make_pop(Op) = ψ -> real(expect(Op , ψ))/norm(ψ)
C̄ᵃ = make_pdf(e.Ĉᵃ ).(states)
C̄ᵇ = make_pdf(e.Ĉᵇ ).(states)
C̄ᵇ₁ = make_pdf(e.Ĉᵇ₁).(states)
C̄ˢ = make_pdf(e.Ĉˢ ).(states)
plot( times, C̄ᵃ , label="a", c=1, lw=2)
plot!(times, C̄ᵇ , label="b", c=2)
plot!(times, C̄ᵇ₁, label="b₁", c=3)
#plot!(times, C̄ˢ , label="s", c=4)
C̄ᵃ_ajmp = make_pdf(e.Ĉᵃ ).(states_ajmp)
C̄ᵇ_ajmp = make_pdf(e.Ĉᵇ ).(states_ajmp)
C̄ᵇ₁_ajmp = make_pdf(e.Ĉᵇ₁).(states_ajmp)
C̄ˢ_ajmp = make_pdf(e.Ĉˢ ).(states_ajmp)
plot!(times_ajmp.+t_jmp,
C̄ᵃ_ajmp+C̄ᵇ_ajmp+C̄ᵇ₁_ajmp+C̄ˢ_ajmp,c=4,label="any jump after a")
# Too large, but conditioned on too small
#C̄ᵃ_bjmp = make_pdf(e.Ĉᵃ ).(states_bjmp)
#plot!(times_ajmp.+t_jmp,
# C̄ᵃ_bjmp,c=5,label="a jump after b")
C̄ᵃ_b1jmp = make_pdf(e.Ĉᵃ ).(states_b1jmp)
plot!(times_ajmp.+t_jmp,
C̄ᵃ_b1jmp,c=5,label="a jump after b1")
plot!(times, pdf_a.(times, gᵒᵐ,Λₗ,T₁ᵃ), ls=:dash, label="when g≪λₗ", c=1)
plot!(times, pdf_b.(times, gᵒᵐ,Λₗ,γ,nₜ), ls=:dash, label=nothing, c=2)
plot!(times, pdf_b1.(times,γ,nₜ), ls=:dash, label=nothing, c=3)
pdf_a✽ = P_a✽.(τ*T₁ᵃ,t_jmp,gᵒᵐ,Λₗ,Λₕ₀₁) ./ (τ*T₁ᵃ-t_jmp)
pdf_a✽ = pdf_a✽ * ones(length(times_ajmp))
plot!(times_ajmp.+t_jmp, pdf_a✽,c=4, label=nothing, ls=:dash)
# Too large, but conditioned on too small
#plot!(times_ajmp.+t_jmp, pdf_ba.(times_ajmp,T₁ᵃ),c=5, label=nothing, ls=:dash)
plot!(times_ajmp.+t_jmp, pdf_b1a.(times_ajmp,gᵒᵐ,Λₗ,T₁ᵃ),c=5, label=nothing, ls=:dash)
p_pdf_before = plot!(title="Probability density for event",
xlabel="time", legend=:topleft)
#plot(times_ajmp.+t_jmp , C̄ᵃ_ajmp , label=nothing, c=1, lw=2)
#plot!(times_ajmp.+t_jmp , C̄ᵇ_ajmp , label=nothing, c=2)
#plot!(times_ajmp.+t_jmp , C̄ᵇ₁_ajmp, label=nothing, c=3)
#plot!(times_ajmp.+t_jmp , C̄ˢ_ajmp , label=nothing, ls=:dash, c=4)
#p_pdf_after = plot!(link=:all, xlabel="time")
#plot(p_pdf_before, p_pdf_after, layout=(2,1))
N̄ᵃ = make_pop(e.N̂ᵃ ).(states)
N̄ᵇ = make_pop(e.N̂ᵇ ).(states)
N̄ˢ = make_pop(e.N̂ˢ ).(states)
plot( times, N̄ᵃ , label="a", c=1)
plot!(times, N̄ᵇ , label="b", c=2)
#plot!(times, N̄ˢ , label="s", c=4)
p_pop = plot!(title="Population", xlabel="time")
N̄ᵃ_ajmp = make_pop(e.N̂ᵃ ).(states_ajmp)
N̄ᵇ_ajmp = make_pop(e.N̂ᵇ ).(states_ajmp)
N̄ˢ_ajmp = make_pop(e.N̂ˢ ).(states_ajmp)
plot( times_ajmp.+t_jmp, N̄ᵃ_ajmp , label="a", c=1, ls=:dash, lw=2)
plot!(times_ajmp.+t_jmp, N̄ᵇ_ajmp , label="b", c=2, ls=:dash)
#plot!(times_ajmp.+t_jmp, N̄ˢ_ajmp , label="s", c=4, ls=:dash)
p_pop_ajmp = plot!(title="Population after jump", xlabel="time", xlim=(0,times[end]))
plot( times, cumsum(C̄ᵃ)*Δt , label="a", lw=2)
plot!(times, cumsum(C̄ᵇ)*Δt , label="b")
plot!(times, cumsum(C̄ᵇ₁)*Δt, label="b₁")
#plot!(times, cumsum(C̄ˢ)*Δt , label="s")
plot!(times, cumsum(C̄ᵃ+C̄ᵇ+C̄ᵇ₁+C̄ˢ)*Δt , label="sum", ls=:dash, lc=:gray)
plot!(times, 1 .- norm.(states).^2, label="1-norm²", lc=:black)
p_norm = plot!(title="Cumulative chance of event", xlabel="time")
#plot(p_pdf_before,p_pop, p_pop_ajmp, p_norm, layout=(4,1), size=(600,700))
plot(p_pdf_before, p_norm, layout=(2,1), size=(600,700), xlabel="time (μs)")
end
# ╔═╡ 13430563-5293-4484-8b37-fcab0e442bd4
md"""
## Heralding Probability and Fidelity
Finally, we get probability of a heralding click (**we assume the detector can not distinguish two $a$ photons in rapid succession from a single $a$ photon**)
$P_\textrm{herald} = P_\textrm{first a} + P_{ba} + P_{b1a} =
\frac{T}{T_a}\left(\frac{g}{2\lambda_l}\right)^2 \left(1+T\frac{\gamma}{2}\frac{3n_\textrm{th}+1}{2}\right)$
The state being heralded is
$\rho = p_\textrm{good\ traj}\ \rho_\textrm{good\ traj} + p_\textrm{bad}\rho_\textrm{bad}$
where $p_\textrm{good\ traj} = \frac{P_\textrm{first a} - P_\textrm{a then bad}}{P_\textrm{herald}} = \frac{1-e^{-CT}}{CT}\frac{1}{1+T\frac{\gamma}{2}\frac{3n_\textrm{th}+1}{2}}$ and $p_\textrm{bad} = 1-p_\textrm{good\ traj}$.
Thus the final fidelity is
$F =\langle 1|\rho|1\rangle= p_\textrm{good\ traj} \langle 1|\rho_\textrm{good\ traj}|1\rangle
= \frac{1-e^{-CT}}{CT}\frac{1}{1+T\frac{\gamma}{2}\frac{3n_\textrm{th}+1}{2}} \langle 1|\rho_\textrm{good\ traj}|1\rangle.$
**We have pesimistically assumed $\langle 1|\rho_\textrm{bad}|1\rangle=0$. We also have an implicit trace with respect to the photonic mode somewhere in here.**
"""
# ╔═╡ 87b86d27-520c-4947-91cb-ce321f245d26
md"""
## The drift of the heralded state
We need to find $\rho_\textrm{good\ traj}$, the state averaged over all trajectories that have a single good heralding event and no bad events. We just need to average over the probability density for such an event.
$\rho_\textrm{good\ traj} = \left.\int_0^T\textrm{d}t\ \textrm{pdf}_a(t)\rho_\textrm{after\ jump}(T-t) \middle/ \int_0^T\textrm{d}t\ \textrm{pdf}_a(t)\right.$
where $\rho_\textrm{after\ jump}(T-t)$ is the state $|01\rangle$ evolved for time $T-t$ and then partial-traced with respect to the photonic mode:
$\rho_\textrm{after\ jump}(T-t)=|\alpha|^2 |1\rangle\langle 1| +|\beta|^2|2\rangle\langle 2|$
$\alpha = \frac{1}{2}e^{-\left(\frac{\tilde g^2}{2\lambda_l} +\tilde \lambda_{h01}\right)t}\left(1 + \frac{\lambda_l}{|\tilde G|}\right)$
$\beta = \frac{1}{2}e^{-\left(\frac{\tilde g^2}{2\lambda_l} +\tilde \lambda_{h01}\right)t}\left(-i \frac{\tilde g}{|\tilde G|}\right)$
Leading to
$\langle 1|\rho_\textrm{good\ traj}|1\rangle = \frac{1-e^{-CT}}{CT}$
"""
# ╔═╡ 9c0a28b6-fb44-46cc-85d1-4c1daa4e098a
md"""
## Complete expression for the fidelity and success probability
$P =
\frac{T}{T_a}\left(\frac{g}{2\lambda_l}\right)^2 \left(1+T\frac{\gamma}{2}\frac{3n_\textrm{th}+1}{2}\right)$
$F = \left(\frac{1-e^{-CT}}{CT}\right)^2\frac{1}{1+T\frac{\gamma}{2}\frac{3n_\textrm{th}+1}{2}}$
$C=\frac{\tilde{g}^2}{\lambda_l}+2\tilde{\lambda}_{h01}$
$\tilde{g} = \sqrt2 g$
$\lambda_l = \frac{1}{4}(\frac{1}{T_a}+γ(n_\textrm{th}+½))$
$\tilde{\lambda}_{h01} = \gamma\left(\frac{3}{4}n_\textrm{th}+\frac{1}{4}\right)$
And after plugging everything in:
$P =
\frac{T}{T_a}\left(\frac{g}{\frac{1}{2}(\frac{1}{T_a}+γ(n_\textrm{th}+½))}\right)^2
\left(1+\frac{\gamma T}{2}\frac{3n_\textrm{th}+1}{2}\right)$
$F = \left(\frac{1-e^{-CT}}{CT}\right)^2\frac{1}{1+\frac{\gamma T}{2}\frac{3n_\textrm{th}+1}{2}}$
$C=
\frac{2g^2}{\frac{1}{4}(\frac{1}{T_a}+γ(n_\textrm{th}+½))}
+\gamma\frac{3n_\textrm{th}+1}{2}$
## Design rules of thumb
The probability $P$ is monotonicly increasing and the fidelity $F$ is monotonicly decreasing with $T$, so for high fidelity we would just pick the minimal permitted $T$ at which the steady state under consideration is possible, i.e., $T\gg \left(T_a^{-1} + \left(\frac{1}{γ(n_\textrm{th}+½)}\right)^{-1}\right)^{-1}$. This is easy to achive while keeping $F$ high only if $T_a \ll T \ll \frac{1}{γ(n_\textrm{th}+½)}$. Therefore the regime of interest is:
$T_a \ll T \ll \frac{1}{γ(n_\textrm{th}+½)}$
$T_a \ll \frac{1}{g}$
On the other hand, we want to maximize the probability of success $P$, or rate of success $P/T$ under these same constraints, which requires a high $g$.
Thus, in this protocol, first and foremost is the optimization of the mechanical Q factor (or its thermal population).
"""
# ╔═╡ 72621af3-af5b-412d-86cb-a6376f983a5b
md"""
In the aforementioned parameter regime we get:
$C\approx
8g^2T_a
+\gamma\frac{3n_\textrm{th}+1}{2}$
and
$P \approx 4 g^2 T_a T$
$1 - F \approx 1 - \frac{1-CT}{1+\frac{\gamma T}{2}\frac{3n_\textrm{th}+1}{2}} \approx 8g^2T_aT+\frac{3}{4}\gamma T(3n_\textrm{th}+1)$
"""
# ╔═╡ 5b6c3ce3-adfe-414d-b74f-65f4084f49ac
begin
P(T,g,Tₐ,γ,nₜₕ) = T/Tₐ * (g/2/λₗ(Tₐ,γ,nₜₕ))^2 * (1+γ*T/4*(3nₜₕ+1))
F(T,g,Tₐ,γ,nₜₕ) = (1-exp(-C(g,Tₐ,γ,nₜₕ)*T))^2 / (C(g,Tₐ,γ,nₜₕ)*T)^2 / (1+γ*T/4*(3nₜₕ+1))
C(g,Tₐ,γ,nₜₕ) = 8*g^2 / (1/Tₐ+γ*(nₜₕ+1/2)) + γ/2*(3nₜₕ+1)
Tminapprox(g,Tₐ,γ,nₜₕ) = 1/(1/Tₐ+γ*(nₜₕ+1/2))
Papprox(T,g,Tₐ,γ,nₜₕ) = 4*g^2*T*Tₐ
Fapprox(T,g,Tₐ,γ,nₜₕ) = 1 - 8*g^2*T*Tₐ - 3/4*γ*T*(3nₜₕ+1)
md"Implementing the aforementioned formulas"
end
# ╔═╡ 35667cfb-b837-4197-b7d5-f59334109969
md"""
Pump photons
`log₁₀(n) : `$(@bind log₁₀n2 Slider(0:0.5:3; default=2, show_value=true))
Temperature (in K)
`log₁₀(T) : `$(@bind log₁₀T2 Slider(-2:0.1:2; show_value=true))
Mechanical Quality Factor
`log₁₀(Qₘ): `$(@bind log₁₀Qₘ2 Slider(3:0.5:9; default=6, show_value=true))
"""
# ╔═╡ 4ff08761-cc25-4e04-9849-492332c39fd8
begin
n2 = 10. ^ log₁₀n2
#gᵒᵐ₀ = 0.268 # MHz defined above
gᵒᵐ2 = √n2 * gᵒᵐ₀ # MHz
#T₁ᵃ = 3e4 / 190e6 # 1/MHz defined above
Temp2 = 10. ^ log₁₀T2
Qₘ2 = 10. ^ log₁₀Qₘ2
nₜ2 = n_per_T*Temp2
γ2 = π*F₀/Qₘ2
md"""
from Raniwala's design:
$g_0$ = $(round(gᵒᵐ₀,digits=3)) MHz and T_a = $(round(T₁ᵃ*1000,digits=3)) ns
(i.e. 1/Tₐ= $(round(1/T₁ᵃ/1000,digits=2)) GHz)
derived:
| n | g | T | Qₘ | nₜₕ |
|:--|:--|:--|:---|:----|
| $(round(n2)) | $(round(gᵒᵐ2,digits=1)) MHz | $(round(Temp2,digits=3)) K | $(round(Qₘ2,digits=-3)) | $(round(nₜ2,digits=2))
"""
end
# ╔═╡ 78f9535c-9952-4b80-b681-73f9496371b1
let
ts = exp.(range(log(0.1),log(100),length=100)).*T₁ᵃ
minT = Tminapprox(gᵒᵐ2,T₁ᵃ,γ2,nₜ2)
ts = ts[ts .> minT]
ps = P.(ts,gᵒᵐ2,T₁ᵃ,γ2,nₜ2)
infs = 1 .- F.(ts,gᵒᵐ2,T₁ᵃ,γ2,nₜ2)
plot(infs,ps,line_z=log10.(ts),lw=4,
xlabel="1-F", ylabel="P", colorbar_title=" \nlog₁₀(T/μs)",
right_margin=3Plots.PlotMeasures.mm,
label=nothing,
xscale=:log10,yscale=:log10,
title="Fidelity vs Success Probability\nfor different pulse durations")
psa = Papprox.(ts,gᵒᵐ2,T₁ᵃ,γ2,nₜ2)
infsa = 1 .- Fapprox.(ts,gᵒᵐ2,T₁ᵃ,γ2,nₜ2)
m = infsa .< 1
psa = psa[m]
infsa = infsa[m]
plot!(infsa,psa,ls=:dash,color=:black,label="simple approximation",
legend=:bottomright,colorbar_tickfontsize=4)
end
# ╔═╡ a37026c0-a68a-4490-b408-1f54164d62c0
md"""# Final Summary
These results are used in the aforementioned publication. Consult the publication for discussion on how this informs the design of entanglement generation hardware and protocols.
There are interesting connections between temperature and mechanical quality factor discussed in the aforementioned publication and the rest of its supplementary materials."""
# ╔═╡ a3d54ce7-7f53-4cd4-a966-759d2fd9485e
begin
#=
# Old attempt at some additional plots
import DataFrames, AlgebraOfGraphics, CairoMakie
const df = DataFrames
const ag = AlgebraOfGraphics
const cm = CairoMakie
records = []
let
npumps = range(1, 1000, length=10)
Temps = range(0.1, 20, length=10) # K
Qₘs = [1e3, 1e4, 1e5, 1e6]
gᵒᵐ₀ = 0.268 # MHz
ts = exp.(range(log(0.1),log(100),length=10)).*T₁ᵃ
for npump in npumps, Temp in Temps, Qₘ in Qₘs, t in ts
gᵒᵐ = sqrt.(npump) * gᵒᵐ₀ # MHz
nₜ = n_per_T*Temp
γ = π*F₀/Qₘ
minT = Tminapprox(gᵒᵐ,T₁ᵃ,γ,nₜ)
if t < minT
continue
end
p = P(t,gᵒᵐ,T₁ᵃ,γ,nₜ)
inf = 1 - F(t,gᵒᵐ,T₁ᵃ,γ,nₜ)
push!(records, (;npump,Temp,Qₘ,gᵒᵐ,nₜ,γ,t,p,inf))
end
end
dfrecords = df.DataFrame(records)
summary = ag.data(dfrecords) * ag.mapping(:inf,:p) * ag.visual(cm.Lines)
summary *= ag.mapping(color=:Temp, group=:Temp => ag.nonnumeric)
# summary *= ag.mapping(row=:Qₘ => ag.nonnumeric, col)
# summary *= ag.mapping(color=:Temp, group=:Qₘ => ag.nonnumeric)
summary_plot = ag.draw(summary, axis=(xscale=log10,yscale=log10,cscale=log10))
=#
end
# ╔═╡ 462de381-6e5e-4a92-bd1c-93a6fad5bfe0
let
#=
# Some rough estimates
npump = 1:10.:1000.
gᵒᵐ₀ = 0.268 # MHz
gᵒᵐ = sqrt.(npump) * gᵒᵐ₀ # MHz
Temp = 0.1:0.1:20 # K
Qₘ2 = 10. ^ log₁₀Qₘ2
nₜ2 = n_per_T*Temp2
γ2 = π*F₀/Qₘ2
md"""
from Raniwala's design:
$g_0$ = $(round(gᵒᵐ₀,digits=3)) MHz and T_a = $(round(T₁ᵃ*1000,digits=3)) ns
(i.e. 1/Tₐ= $(round(1/T₁ᵃ/1000,digits=2)) GHz)
derived:
| n | g | T | Qₘ | nₜₕ |
|:--|:--|:--|:---|:----|
| $(round(n2)) | $(round(gᵒᵐ2,digits=1)) MHz | $(round(Temp2,digits=3)) K | $(round(Qₘ2,digits=-3)) | $(round(nₜ2,digits=2))
"""
=#
end
# ╔═╡ 74d20d02-3bb9-4cd5-ac08-143c68110e8d
md"""## Suggested Future Improvements
- What type of infidelity does this cause (what is the state obtained with probability 1-F)?
- This does not take into account the time necessary for cooling the mechanical resonator between attempts or the infidelity due to imperfect cooling.
- What happens when this is used to herald entangled pair (DLCZ)?
- What if the two nodes for the entanglement are not perfectly matched."""
# ╔═╡ 00000000-0000-0000-0000-000000000001
PLUTO_PROJECT_TOML_CONTENTS = """
[deps]
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
PlutoUI = "7f904dfe-b85e-4ff6-b463-dae2292396a8"
QuantumOptics = "6e0679c1-51ea-5a7c-ac74-d61b76210b0c"
[compat]
Plots = "~1.25.6"
PlutoUI = "~0.7.30"
QuantumOptics = "~1.0.1"
"""
# ╔═╡ 00000000-0000-0000-0000-000000000002
PLUTO_MANIFEST_TOML_CONTENTS = """
# This file is machine-generated - editing it directly is not advised
[[AbstractFFTs]]
deps = ["ChainRulesCore", "LinearAlgebra"]
git-tree-sha1 = "6f1d9bc1c08f9f4a8fa92e3ea3cb50153a1b40d4"
uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c"
version = "1.1.0"
[[AbstractPlutoDingetjes]]
deps = ["Pkg"]
git-tree-sha1 = "8eaf9f1b4921132a4cff3f36a1d9ba923b14a481"
uuid = "6e696c72-6542-2067-7265-42206c756150"
version = "1.1.4"
[[Adapt]]
deps = ["LinearAlgebra"]
git-tree-sha1 = "af92965fb30777147966f58acb05da51c5616b5f"
uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
version = "3.3.3"
[[ArgTools]]
uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f"
[[ArnoldiMethod]]
deps = ["LinearAlgebra", "Random", "StaticArrays"]
git-tree-sha1 = "62e51b39331de8911e4a7ff6f5aaf38a5f4cc0ae"
uuid = "ec485272-7323-5ecc-a04f-4719b315124d"
version = "0.2.0"
[[Arpack]]
deps = ["Arpack_jll", "Libdl", "LinearAlgebra", "Logging"]
git-tree-sha1 = "91ca22c4b8437da89b030f08d71db55a379ce958"
uuid = "7d9fca2a-8960-54d3-9f78-7d1dccf2cb97"
version = "0.5.3"
[[Arpack_jll]]
deps = ["Libdl", "OpenBLAS_jll", "Pkg"]
git-tree-sha1 = "e214a9b9bd1b4e1b4f15b22c0994862b66af7ff7"
uuid = "68821587-b530-5797-8361-c406ea357684"
version = "3.5.0+3"
[[ArrayInterface]]
deps = ["Compat", "IfElse", "LinearAlgebra", "Requires", "SparseArrays", "Static"]
git-tree-sha1 = "1ee88c4c76caa995a885dc2f22a5d548dfbbc0ba"
uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
version = "3.2.2"
[[Artifacts]]
uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
[[Base64]]
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
[[BitTwiddlingConvenienceFunctions]]
deps = ["Static"]
git-tree-sha1 = "bc1317f71de8dce26ea67fcdf7eccc0d0693b75b"
uuid = "62783981-4cbd-42fc-bca8-16325de8dc4b"
version = "0.1.1"
[[Bzip2_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "19a35467a82e236ff51bc17a3a44b69ef35185a2"
uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0"
version = "1.0.8+0"
[[CPUSummary]]
deps = ["Hwloc", "IfElse", "Static"]
git-tree-sha1 = "87b0c9c6ee0124d6c1f4ce8cb035dcaf9f90b803"
uuid = "2a0fbf3d-bb9c-48f3-b0a9-814d99fd7ab9"
version = "0.1.6"
[[Cairo_jll]]
deps = ["Artifacts", "Bzip2_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Pkg", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"]
git-tree-sha1 = "4b859a208b2397a7a623a03449e4636bdb17bcf2"
uuid = "83423d85-b0ee-5818-9007-b63ccbeb887a"
version = "1.16.1+1"
[[ChainRulesCore]]
deps = ["Compat", "LinearAlgebra", "SparseArrays"]
git-tree-sha1 = "926870acb6cbcf029396f2f2de030282b6bc1941"
uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
version = "1.11.4"
[[ChangesOfVariables]]
deps = ["ChainRulesCore", "LinearAlgebra", "Test"]
git-tree-sha1 = "bf98fa45a0a4cee295de98d4c1462be26345b9a1"
uuid = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0"
version = "0.1.2"
[[CloseOpenIntervals]]
deps = ["ArrayInterface", "Static"]
git-tree-sha1 = "7b8f09d58294dc8aa13d91a8544b37c8a1dcbc06"
uuid = "fb6a15b2-703c-40df-9091-08a04967cfa9"
version = "0.1.4"
[[ColorSchemes]]
deps = ["ColorTypes", "Colors", "FixedPointNumbers", "Random"]
git-tree-sha1 = "6b6f04f93710c71550ec7e16b650c1b9a612d0b6"
uuid = "35d6a980-a343-548e-a6ea-1d62b119f2f4"
version = "3.16.0"
[[ColorTypes]]
deps = ["FixedPointNumbers", "Random"]
git-tree-sha1 = "024fe24d83e4a5bf5fc80501a314ce0d1aa35597"
uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f"
version = "0.11.0"
[[Colors]]
deps = ["ColorTypes", "FixedPointNumbers", "Reexport"]
git-tree-sha1 = "417b0ed7b8b838aa6ca0a87aadf1bb9eb111ce40"
uuid = "5ae59095-9a9b-59fe-a467-6f913c188581"
version = "0.12.8"
[[CommonSolve]]
git-tree-sha1 = "68a0743f578349ada8bc911a5cbd5a2ef6ed6d1f"
uuid = "38540f10-b2f7-11e9-35d8-d573e4eb0ff2"
version = "0.2.0"
[[CommonSubexpressions]]
deps = ["MacroTools", "Test"]
git-tree-sha1 = "7b8a93dba8af7e3b42fecabf646260105ac373f7"
uuid = "bbf7d656-a473-5ed7-a52c-81e309532950"
version = "0.3.0"
[[Compat]]
deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "SHA", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"]
git-tree-sha1 = "44c37b4636bc54afac5c574d2d02b625349d6582"
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
version = "3.41.0"
[[CompilerSupportLibraries_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae"
[[ConstructionBase]]
deps = ["LinearAlgebra"]
git-tree-sha1 = "f74e9d5388b8620b4cee35d4c5a618dd4dc547f4"
uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9"
version = "1.3.0"
[[Contour]]
deps = ["StaticArrays"]
git-tree-sha1 = "9f02045d934dc030edad45944ea80dbd1f0ebea7"
uuid = "d38c429a-6771-53c6-b99e-75d170b6e991"
version = "0.5.7"
[[DEDataArrays]]
deps = ["ArrayInterface", "DocStringExtensions", "LinearAlgebra", "RecursiveArrayTools", "SciMLBase", "StaticArrays"]
git-tree-sha1 = "31186e61936fbbccb41d809ad4338c9f7addf7ae"
uuid = "754358af-613d-5f8d-9788-280bf1605d4c"
version = "0.2.0"
[[DataAPI]]
git-tree-sha1 = "cc70b17275652eb47bc9e5f81635981f13cea5c8"
uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a"
version = "1.9.0"
[[DataStructures]]
deps = ["Compat", "InteractiveUtils", "OrderedCollections"]
git-tree-sha1 = "3daef5523dd2e769dad2365274f760ff5f282c7d"
uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
version = "0.18.11"
[[DataValueInterfaces]]
git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6"
uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464"
version = "1.0.0"
[[Dates]]
deps = ["Printf"]
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"
[[DelimitedFiles]]
deps = ["Mmap"]
uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab"
[[DensityInterface]]
deps = ["InverseFunctions", "Test"]
git-tree-sha1 = "80c3e8639e3353e5d2912fb3a1916b8455e2494b"
uuid = "b429d917-457f-4dbc-8f4c-0cc954292b1d"
version = "0.4.0"
[[DiffEqBase]]
deps = ["ArrayInterface", "ChainRulesCore", "DEDataArrays", "DataStructures", "Distributions", "DocStringExtensions", "FastBroadcast", "ForwardDiff", "FunctionWrappers", "IterativeSolvers", "LabelledArrays", "LinearAlgebra", "Logging", "MuladdMacro", "NonlinearSolve", "Parameters", "PreallocationTools", "Printf", "RecursiveArrayTools", "RecursiveFactorization", "Reexport", "Requires", "SciMLBase", "Setfield", "SparseArrays", "StaticArrays", "Statistics", "SuiteSparse", "ZygoteRules"]
git-tree-sha1 = "15e43e11701b8c0b6250d7996b5768751f5a10c2"
uuid = "2b5f629d-d688-5b77-993f-72d75c75574e"