def run_time_series(local_params): operating_point = local_params['ed_point'] delta1_var = local_params['delta1_var'] delta2_var = local_params['delta2_var'] sigma = local_params['sigma'] qubit = hybrid.SOSSHybrid(operating_point, 10.0) ed = qubit.ed stsplitting = qubit.stsplitting delta1 = qubit.delta1 delta2 = qubit.delta2 qubit = hybrid.HybridQubit(ed, stsplitting, delta1_var * delta1, delta2_var * delta2) tfinal = choosing_final_time(qubit, sigma) trange = generate_trange(tfinal) cj_array = np.empty((qubit.dim**2, qubit.dim**2, trange.shape[0]), dtype=complex) for i in range(trange.shape[0]): if trange[i] == 0: cj_array[:, :, i] += noise_sample(qubit, 0.0, 0.0) else: cj_array[:, :, i] += average_process(qubit, trange[i], sigma) return trange, cj_array
def run_time_series(local_params): operating_point = local_params['ed_point'] delta1_var = local_params['delta1_var'] delta2_var = local_params['delta2_var'] sigma = local_params['sigma'] qubit = hybrid.SOSSHybrid(operating_point, 10.0) ed = qubit.ed stsplitting = qubit.stsplitting delta1 = qubit.delta1 delta2 = qubit.delta2 qubit = hybrid.HybridQubit(ed, stsplitting, delta1_var * delta1, delta2_var * delta2) tfinal = choosing_final_time(qubit, sigma) trange = np.logspace( 0, 5, 11 ) #generate_trange(tfinal) #I couldn't get this function to work - leaving it as a simple logspace for now. fid_time_array = np.zeros((trange.shape[0])) for i in range(trange.shape[0]): if trange[i] == 0: fid_time_array[i] += noise_sample(qubit, 0.0, 0.0) else: fid_time_array[i] += average_fidelity(qubit, trange[i], sigma) return trange, fid_time_array
def time_evolution_RF(tfinal, qtype='hybrid-SOSS'): from qubitsim.qubit import HybridQubit as hybrid if qtype == 'hybrid-SOSS': indices = [0, 1] match_freq = 10.0 operating_point = 3.5 qubit = hybrid.SOSSHybrid(operating_point, match_freq) H0 = qubit.hamiltonian_lab() ChoiSimulation = CJFidelities.CJ(indices, H0, np.zeros((3,3))) if tfinal == 0: return ChoiSimulation.chi0 else: return ChoiSimulation.chi_final_RF(tfinal) else: indices = [0, 1] match_freq = 10.0 operating_point = 1.0 qubit = hybrid.HybridQubit(operating_point * match_freq, match_freq, 0.7 * match_freq, 0.7*match_freq) H0 = qubit.hamiltonian_lab() ChoiSimulation = CJFidelities.CJ(indices, H0, np.zeros((3,3))) if tfinal == 0: return ChoiSimulation.chi0 else: return ChoiSimulation.chi_final_RF(tfinal)
def time_evolution_point(operating_point, delta1_point, delta2_point): """At the given operating point, return the time array and chi_matrix array for each of the noise values considered""" match_freq = 10.0 qubit_base = hybrid.SOSSHybrid(operating_point, match_freq) delta1_ref = qubit_base.delta1 delta2_ref = qubit_base.delta2 stsplitting_ref = qubit_base.stsplitting ed_ref = qubit_base.ed qubit = hybrid.HybridQubit(ed_ref, stsplitting_ref, delta1_point * delta1_ref, delta2_point * delta2_ref) trange, sigma_array, mass_chi_array = time_sweep(qubit) return trange, sigma_array, mass_chi_array
def noise_sample_run(ded, tfinal): """Run a single noise sample at noise point ded (GHz) and at time tfinal""" operating_point = 3.0 match_freq = 10.0 indices = [0, 1] qubit = hybrid.SOSSHybrid(operating_point, match_freq) H0 = np.diag(qubit.energies()) noise = qubit.detuning_noise_qubit(ded) # noise = np.zeros((3,3)) ChoiSimulation = cj.CJ(indices, H0, noise) if tfinal == 0: return ChoiSimulation.chi0 else: return ChoiSimulation.chi_final_RF(tfinal)
def __init__(self, operating_point, match_freq, resdim): """ Create an instance of a coupled sweet-spot qubit and resonator that are resonant with each other Parameters ---------- operating_point : float The ratio of detuning to singlet-triplet splitting at which the qubit should be operated match_freq : float the operating frequency for both the qubit and the resonator resdim : int Number of dimensions to include in the resonator """ self.res = res(2*math.pi * match_freq, resdim) self.qubit = hybrid.SOSSHybrid(operating_point, match_freq) return None
def test_derivatives(): qubit = hybrid.SOSSHybrid(2.0, 10.0) deriv_from_method = qubit.splitting_derivative(1) assert deriv_from_method < 1e-8