示例#1
0
## other settings ##
plot_fit = True
show_guess = True

fit_results = []

cum_pts = 0
cum_sweep_pts = np.empty(0)
cum_p0 = np.empty(0)
cum_u_p0 = np.empty(0)

cum_normalized_ssro = np.empty(0)
#for k in range(0,len(measurement_name)):

for kk in range(len(timestamp)):
    folder = toolbox.data_from_time(timestamp[kk])

    a = mbi.MBIAnalysis(folder)
    a.get_sweep_pts()
    a.get_readout_results(name='adwindata')
    a.get_electron_ROC()
    cum_pts += a.pts

    if kk == 0:
        cum_sweep_pts = a.sweep_pts
        cum_p0 = a.p0
        cum_u_p0 = a.u_p0
    else:
        cum_sweep_pts = np.concatenate((cum_sweep_pts, a.sweep_pts))
        cum_p0 = np.concatenate((cum_p0, a.p0))
        cum_u_p0 = np.concatenate((cum_u_p0, a.u_p0))
import numpy as np
from matplotlib import pyplot as plt
from analysis.lib.m2.ssro import mbi
from measurement.lib.tools import toolbox

# settings
msmnt_folders = [
        '20130207175652',
        '20130207180726',
        ]

fig = plt.figure(figsize=(12,4))
ax = fig.add_subplot(111)

for f in msmnt_folders:
    a = mbi.ConditionalPrecessionAnalysis(toolbox.data_from_time(f))
    a.get_sweep_pts()
    a.get_readout_results()

    of = min(a.normalized_ssro[:,0])
    ax.errorbar(a.sweep_pts, a.normalized_ssro[:,0], fmt='o-',
            yerr=a.u_normalized_ssro[:,0], label=a.name + ' (%s)' % f)

ax.legend()
ax.set_ylim(0.5,0.8)
ax.set_xlim(0,500)
ax.set_title('conditional precession')

ax.set_xlabel('delay ($\mu$s)')
ax.set_ylabel(r'readout results $|0\rangle$')
import h5py
import logging
from matplotlib import pyplot as plt

from analysis.lib.fitting import fit, common
from measurement.lib.tools import toolbox
from analysis.lib.tools import plot
from analysis.lib.m2.ssro import ssro


folder = None
timestamp =  None

if folder == None:
    if timestamp != None:
        folder = toolbox.data_from_time(timestamp)
    else:
        folder = toolbox.latest_data('AdwinSSRO')

a = ssro.SSROAnalysis(folder)

pwrs = []
taus = []
u_taus = []

for g in a.g.items():    
    gn = g[0]
    if 'instrument_settings' in gn:
        continue
    
    a.get_run(gn)
示例#4
0
E_y = np.array(
    [51.08, 51.53, 51.96, 52.33, 52.61, 53.03, 53.36, 53.58, 53.5, 54.84])
E_x = np.array(
    [53.75, 53.7, 53.73, 53.79, 54.15, 54.57, 55.04, 56.01, 57.04, 59.09])

ssro_data_E_y = np.array([
    '20140513124215', '20140513125308', '20140513125914', '20140513130340',
    '20140513130712', '20140513131304', '20140513131824', '20140513132605',
    '20140513134100', '20140513134217'
])

cpsh = []
fid = []
fid_err = []

for i, d in enumerate(ssro_data_E_y):
    folder = toolbox.data_from_time(d)
    a = ssro.SSROAnalysis(folder)
    a.get_run('ms0')
    cpsh_run = np.sum(a.ro_counts[:, 0:-1], axis=1)
    cpsh.append(sum(cpsh_run) / float(reps))
    #f = h5py.File(folder, 'r')
    #cts_m0 =
    #times = f['fidelity/time'].value

fig = plt.figure()
ax = fig.add_subplot(111)

ax.plot(gate_V, cpsh, 'bo', ms=8)
ax.set_xlabel('strain splitting [GHz]')
ax.set_ylabel('counts per shot $E_y$')