-
Notifications
You must be signed in to change notification settings - Fork 0
/
biphoton_amplitude.py
417 lines (292 loc) · 11.2 KB
/
biphoton_amplitude.py
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
#-------------------------------------------------------------------------------
# Name: SPDC - Phase matching
# Purpose: PEEC
#
# Author: TECM
#
# Created: 01/07/2023
# Copyright: (c) TECM 2023
#-------------------------------------------------------------------------------
'''
REFERENCES:
[1] Vittorio Giovannetti et al. "Extended phase-matching conditions for
improved entanglement generation",
[2] C. Chen. "Generation and characterization of spectrally
factorable biphotons", MSc Thesis.
[3] Vittorio Giovannetti et al. "Generating Entangled Two-Photon
States with Coincident Frequencies"
'''
#===============================================================================
# PACKAGES
#===============================================================================
from pylab import *
#===============================================================================
#///////////////////////////////////////////////////////////////////////////////
#===============================================================================
#===============================================================================
# Functions
#===============================================================================
#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
def refractive_index_BBO(omega):
'''
Refractive index of BBO
Input (SI units):
omega: angular frequency (float)
'''
wave0 = 2*pi*3e8/omega # convert to wavelength
n = sqrt(2.7405 + 0.0184/(wave0**2-0.0179) - 0.0155*wave0**2)
return n
#///////////////////////////////
#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
def Gaussian_spec(w_array, wp, Omega_p):
'''
Guassian spectrum
Inputs (SI units):
w_array: angular frequency array (float or array)
wp: pump central frequency (float)
Omega_p: pump spectral width (float)
'''
return exp(-(w_array-wp)**2/(Omega_p**2))
#///////////////////////////////
#///////////////////////////////
def alpha_func(ws, wi, ns, ni, qsi_p):
'''
Amplitude biphoton
Inputs (SI units):
ws: angular frequency of signal (float)
wi: angular frequency of idler (float)
ns: refractive index of signal (float)
ni: refractive index of idler (float)
qsi_p: pump spectrum (float)
'''
res = qsi_p #* sqrt(ws*wi)/(ns*ni)
return res
#///////////////////////////////
#///////////////////////////////
def Phi_L_func(L, wp, ws, wi, gamma_s, gamma_i, theta):
'''
Phase Matching Function
Inputs (SI units):
L: Crystal length (float)
wp: angular frequency of pump (float)
ws: angular frequency of signal (float)
gamma_s:
gamma_i:
theta: angle (float)
'''
dk = (ws-wp/2)*gamma_s*cos(theta) + (wi-wp/2)*gamma_i*sin(theta)
res = sinc(dk*L/(2*pi)) # note: this extra pi is because of the numpy's definition of sync
return res
#///////////////////////////////
#///////////////////////////////
def wavenumber(omega, n):
'''
Wavenumber calculation
Input:
omega: angular frequency (float)
n : refractive index (float)
'''
return omega * n/3e8
#///////////////////////////////
#===============================================================================
#///////////////////////////////////////////////////////////////////////////////
#===============================================================================
#===============================================================================
# ARRAYS
#===============================================================================
#----------------------------
# Parameters (SI units)
#---------------------------
# array size
N = 300
# wavelengths
wavelength_1 = 705.357e-9
wavelength_2 = 897.727e-9
wavelength_c = 900e-9
# angular frequencies
w1 = 2*pi*3e8/wavelength_1
w2 = 2*pi*3e8/wavelength_2
wc = 2*pi*3e8/wavelength_c
## arrays
# signal array
ws_array = linspace(w2, w1, N)
# idler array
wi_array = linspace(w2, w1, N)
# pump array
wp_array = linspace(w2, w1, N)
#===============================================================================
#///////////////////////////////////////////////////////////////////////////////
#===============================================================================
#===============================================================================
# SIMULATION 1
#===============================================================================
#-----------------
# Parameters (SI units)
#-----------------
L = 1e-2
theta = pi/20
Omega_p = 6e13
gamma = 8e-5 * 1e-12/1e-6
# pump central angular frequency spectrum
wp = 2*pi*3e8/395e-9 # lambda_0 = 395e-9
#-----------------
#------------------------------------------------
# SIMULATION
#------------------------------------------------
# empty N x N array
biphoton_spec = zeros((N,N), dtype = float)
for j in range(0, N):
for i in range(0, N):
# angular frequencies
ws = ws_array[i]
wi = wi_array[j]
# refractive index
ns = refractive_index_BBO(ws)
ni = refractive_index_BBO(wi)
np = refractive_index_BBO(wp)
# Pump spectrum
Ep_si = sqrt(Gaussian_spec(ws+wi, wp, Omega_p))
# Alpha
actual1 = alpha_func(ws, wi, ns, ni, Ep_si) #alpha_func2(ws+wi, ns+ni, Ep_si)#
# Phi
actual2 = Phi_L_func(L, wp, ws, wi, gamma, gamma, theta)
# append to biphoton spectrum
biphoton_spec[j,i] = actual1 * actual2
if i == j:
biphoton_spec[j,i] = 1.0
if j == -i+N:
biphoton_spec[j,i] = 1.0
#------------------------------------------------
#////////////////////////////////////////////////
#------------------------------------------------
#===============================================================================
#///////////////////////////////////////////////////////////////////////////////
#===============================================================================
#===============================================================================
# SIMULATION 2
#===============================================================================
#-------------------------
# Parameters (SI units)
#-------------------------
L = 1e-2 # crystal length
theta = -pi/4 # angle
Omega_p = 6e13 # proportional to the FWHM of the pump spectrum
gamma = 8e-5 * 1e-12/1e-6 #
# pump central angular frequency spectrum
wp = 2*pi*3e8/395e-9 # lambda_0 = 395e-9
#-----------------
#------------------------------------------------
# SIMULATION
#------------------------------------------------
# empty N x N array
biphoton_spec2 = zeros((N,N), dtype = float)
for j in range(0, N):
for i in range(0, N):
# angular frequencies
ws = ws_array[j]
wi = wi_array[i]
# refractive index
ns = refractive_index_BBO(ws)
ni = refractive_index_BBO(wi)
np = refractive_index_BBO(wp)
# Ep
Ep_si = sqrt(Gaussian_spec(ws+wi, wp, Omega_p))
# alpha
actual1 = alpha_func(ws, wi, ns, ni, Ep_si) #alpha_func2(ws+wi, ns+ni, Ep_si)#
# Phi
actual2 = Phi_L_func(L, wp, ws, wi, gamma, gamma, theta)
# Append to biphoton spectrum
biphoton_spec2[j,i] = actual1 * actual2
if i == j:
biphoton_spec2[j,i] = 1.0
if j == -i+N:
biphoton_spec2[j,i] = 1.0
#------------------------------------------------
#////////////////////////////////////////////////
#------------------------------------------------
#===============================================================================
#///////////////////////////////////////////////////////////////////////////////
#===============================================================================
#===============================================================================
# PLOTS
#===============================================================================
#---------------------------------------------------
# NEW COLORMAP
#---------------------------------------------------
from matplotlib.colors import ListedColormap, LinearSegmentedColormap
bottom = cm.get_cmap('jet', 236)
top = cm.get_cmap('Blues', 20)
newcolors = vstack((top(linspace(0, 1, 20)),
bottom(linspace(0, 1, 236))))
newcmp = ListedColormap(newcolors, name='jet')
#---------------------------------------------------
#///////////////////////////////////////////////////
#---------------------------------------------------
#-----------------------------------
# PLOT ANGULAR FREQUENCY
#-----------------------------------
new_ws = ((ws_array-wp/2))/wp
new_wi = ((wi_array-wp/2))/wp
# figure
figure()
suptitle("Biphoton spectral amplitude "+r'$\left|A(\omega_s, \omega_i) \right|$')
# plot simulation 1
subplot(121)
title(r'$L=1\,\mathrm{cm},\,\,\,\,\theta=\pi/20$')
pcolormesh(new_wi, new_ws, abs(biphoton_spec), cmap=newcmp)
xlim(-0.04,0.04)
ylim(-0.04,0.04)
xlabel(r'$\left(\omega_s-\omega_p/2\right)/\omega_p$')
ylabel(r'$\left(\omega_i-\omega_p/2\right)/\omega_p$')
colorbar()
# plot simulation 2
subplot(122)
title(r'$L=1\,\mathrm{cm},\,\,\,\,\theta=-\pi/4$')
pcolormesh(new_wi, new_ws, abs(biphoton_spec2), cmap=newcmp)
xlim(-0.02,0.02)
ylim(-0.02,0.02)
xlabel(r'$\left(\omega_s-\omega_p/2\right)/\omega_p$')
ylabel(r'$\left(\omega_i-\omega_p/2\right)/\omega_p$')
colorbar()
#-----------------------------------
#//////////////////////////////////
#-----------------------------------
#-----------------------------------
# PLOT WAVELENGTH
#-----------------------------------
# wavelength array - signal
wave_array_s = 2*pi*3e8/ws_array
wave_array_s*=1e9
wave_array_s = flip(wave_array_s)
# wavelength array - idler
wave_array_i = 2*pi*3e8/wi_array
wave_array_i*=1e9
wave_array_i = flip(wave_array_i)
# PLOT
figure()
suptitle("Biphoton spectral amplitude "+r'$\left|A(\omega_s, \omega_i) \right|$')
# plot simulation 1
subplot(121)
title(r'$L=1\,\mathrm{cm},\,\,\,\,\theta=\pi/20$')
pcolormesh(wave_array_i, wave_array_s, abs(biphoton_spec), cmap=newcmp)
xlim(750,830)
ylim(750,830)
xlabel("signal wavelength (nm)")
ylabel("idler wavelength (nm)")
colorbar()
# plot simulation 2
subplot(122)
title(r'$L=1\,\mathrm{cm},\,\,\,\,\theta=-\pi/4$')
pcolormesh(wave_array_i, wave_array_s, abs(biphoton_spec2), cmap=newcmp)
xlim(750,830)
ylim(750,830)
xlabel("signal wavelength (nm)")
ylabel("idler wavelength (nm)")
colorbar()
#-----------------------------------
#//////////////////////////////////
#-----------------------------------
show()
#===============================================================================
#///////////////////////////////////////////////////////////////////////////////
#===============================================================================