mirror of
https://github.com/vale981/fibre_walk_project_code
synced 2025-03-04 17:31:39 -05:00
semms to work reasonably well now
This commit is contained in:
parent
bae8ff0128
commit
d03e90b221
2 changed files with 20 additions and 24 deletions
|
@ -34,7 +34,7 @@ def make_params_and_solve(
|
||||||
laser_detuning=laser_detuning,
|
laser_detuning=laser_detuning,
|
||||||
N=N,
|
N=N,
|
||||||
N_couplings=N,
|
N_couplings=N,
|
||||||
measurement_detuning=Ω * (3),
|
measurement_detuning=200,
|
||||||
α=0,
|
α=0,
|
||||||
rwa=False,
|
rwa=False,
|
||||||
flat_energies=False,
|
flat_energies=False,
|
||||||
|
@ -48,10 +48,9 @@ def make_params_and_solve(
|
||||||
|
|
||||||
params.drive_override = (
|
params.drive_override = (
|
||||||
np.array([params.Ω, params.Ω * (1 - params.δ), params.δ * 2 * params.Ω]),
|
np.array([params.Ω, params.Ω * (1 - params.δ), params.δ * 2 * params.Ω]),
|
||||||
np.repeat(params.Ω, 3),
|
np.ones(3),
|
||||||
)
|
)
|
||||||
params.drive_override[1][-1] *= 4
|
params.drive_override[1][-1] *= 2
|
||||||
params.drive_override[1][-1] *= 4
|
|
||||||
|
|
||||||
t = time_axis(params, lifetimes=total_lifetimes, resolution=0.01)
|
t = time_axis(params, lifetimes=total_lifetimes, resolution=0.01)
|
||||||
solution = solve(t, params)
|
solution = solve(t, params)
|
||||||
|
@ -75,8 +74,8 @@ def generate_phase_one_data():
|
||||||
eom_off_lifetime,
|
eom_off_lifetime,
|
||||||
N=20,
|
N=20,
|
||||||
g_0=1,
|
g_0=1,
|
||||||
small_loop_detuning=0, # 0.05,
|
small_loop_detuning=0.1,
|
||||||
laser_detuning=-0.01,
|
laser_detuning=0.1,
|
||||||
)
|
)
|
||||||
signal = output_signal(t, solution.y, params)
|
signal = output_signal(t, solution.y, params)
|
||||||
|
|
||||||
|
@ -109,7 +108,7 @@ def generate_phase_one_data():
|
||||||
|
|
||||||
ringdown_params = RingdownParams(
|
ringdown_params = RingdownParams(
|
||||||
fω_shift=params.measurement_detuning,
|
fω_shift=params.measurement_detuning,
|
||||||
mode_window=(params.N + 2, params.N + 2),
|
mode_window=(5, 5),
|
||||||
fΩ_guess=params.Ω * (1 + rng.standard_normal() * fluct_size),
|
fΩ_guess=params.Ω * (1 + rng.standard_normal() * fluct_size),
|
||||||
fδ_guess=params.Ω * params.δ * (1 + rng.standard_normal() * fluct_size),
|
fδ_guess=params.Ω * params.δ * (1 + rng.standard_normal() * fluct_size),
|
||||||
η_guess=params.η * (1 + rng.standard_normal() * fluct_size),
|
η_guess=params.η * (1 + rng.standard_normal() * fluct_size),
|
||||||
|
@ -121,7 +120,12 @@ def generate_phase_one_data():
|
||||||
plot_spectrum_and_peak_info(ax_spectrum, peak_info, ringdown_params)
|
plot_spectrum_and_peak_info(ax_spectrum, peak_info, ringdown_params)
|
||||||
|
|
||||||
Ω, ΔΩ, δ, Δδ, ladder = extract_Ω_δ(
|
Ω, ΔΩ, δ, Δδ, ladder = extract_Ω_δ(
|
||||||
peak_info, ringdown_params, Ω_threshold=0.1, ladder_threshold=0.1, start_peaks=4
|
peak_info,
|
||||||
|
ringdown_params,
|
||||||
|
Ω_threshold=0.1,
|
||||||
|
ladder_threshold=0.1,
|
||||||
|
start_peaks=6,
|
||||||
|
bifurcations=5,
|
||||||
)
|
)
|
||||||
|
|
||||||
for index, type in ladder:
|
for index, type in ladder:
|
||||||
|
@ -135,8 +139,9 @@ def generate_phase_one_data():
|
||||||
label=type,
|
label=type,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
runtime = RuntimeParams(params)
|
||||||
fig.suptitle(
|
fig.suptitle(
|
||||||
f"""Calibration Phase One Demonstration\n N={params.N} * 2 modes g_0={params.g_0}, SNR={SNR}, Ω (input) = {params.Ω:.2f}, δ (input) = {params.Ω*params.δ:.2f}
|
f"""Calibration Phase One Demonstration\n N={params.N} * 2 modes g_0={params.g_0}, SNR={SNR}, Ω (input) = {params.Ω:.2f}, δ (input) = {(runtime.mode_splitting):.2f}
|
||||||
Ω={Ω:.2f} ± {ΔΩ:.2f}, δ={δ:.2f} ± {Δδ:.2f}
|
Ω={Ω:.2f} ± {ΔΩ:.2f}, δ={δ:.2f} ± {Δδ:.2f}
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
|
@ -159,23 +159,12 @@ class RuntimeParams:
|
||||||
) # linear frequencies!
|
) # linear frequencies!
|
||||||
if params.drive_override is not None:
|
if params.drive_override is not None:
|
||||||
self.drive_frequencies = params.drive_override[0]
|
self.drive_frequencies = params.drive_override[0]
|
||||||
self.g = 2 * np.pi * params.drive_override[1]
|
self.g = params.drive_override[1]
|
||||||
|
|
||||||
a_shift = 0
|
a_shift = 0
|
||||||
self.detunings *= 0
|
self.detunings *= 0
|
||||||
self.g *= params.g_0 / np.sqrt(np.sum(self.g**2))
|
self.g *= params.g_0 / np.sqrt(np.sum(self.g**2))
|
||||||
|
|
||||||
# print(params.δ * 2 - (a_frequency - anti_a_frequency))
|
|
||||||
# print((params.Ω - params.δ) - (params.Ω - a_frequency))
|
|
||||||
# print(
|
|
||||||
# (freqs[2] - freqs[1]) / (2 * np.pi),
|
|
||||||
# (params.Ω * (1 - a_frequency)),
|
|
||||||
# (params.Ω * (1 - params.δ)),
|
|
||||||
# )
|
|
||||||
# print(np.diff(freqs) / (2 * np.pi))
|
|
||||||
# import ipdb
|
|
||||||
|
|
||||||
# ipdb.set_trace()
|
|
||||||
|
|
||||||
self.g *= 2 * np.pi
|
self.g *= 2 * np.pi
|
||||||
self.Ωs = Ωs
|
self.Ωs = Ωs
|
||||||
|
|
||||||
|
@ -205,8 +194,10 @@ class RuntimeParams:
|
||||||
|
|
||||||
self.detuning_matrix = self.detuned_Ωs[:, None] - self.detuned_Ωs[None, :]
|
self.detuning_matrix = self.detuned_Ωs[:, None] - self.detuned_Ωs[None, :]
|
||||||
|
|
||||||
def __repr__(self):
|
@property
|
||||||
return f"{self.__class__.__name__}(Ωs={self.Ωs}, drive_frequencies={self.drive_frequencies}, drive_amplitudes={self.g})"
|
def mode_splitting(self):
|
||||||
|
"""The mode splitting of the system in *frequency units*."""
|
||||||
|
return (self.Ωs[1] - self.Ωs[0]).real / (4 * np.pi)
|
||||||
|
|
||||||
|
|
||||||
def time_axis(
|
def time_axis(
|
||||||
|
|
Loading…
Add table
Reference in a new issue