Closed JavierSerranoGarcia closed 3 months ago
Hi @JavierSerranoGarcia, thanks for the list!
Regarding (1), could you prepare some kind of notebook / example on how to use these channels with QICK (not qibosoq)? It would be very useful for me since I never used the interpolated channels
Hi @rodolfocarobene, as we talked last week we need to use ASAP the interpolated channel with qibosoq. Do you think you could do it in the weeks?
Hi @JavierSerranoGarcia, yes I should be able to implement interpolated channels in this week (max the next one). But it would be really useful if you could share with me the working notebook you should me last week. I remember that I have to add the "mixer" parameter, but I am not sure where...
So @rodolfocarobene , here you are
from qick import *
from tqdm.notebook import tqdm
soc = QickSoc("../qick/firmware/qick_qibo_v2.bit")
soccfg = soc
# Setup configuration parameters
hw_cfg={"res_ch":6,
"qubit_ch":9
}
readout_cfg={
"readout_length":soccfg.us2cycles(3.0, gen_ch=hw_cfg["res_ch"]), # [Clock ticks]
"f_res": -200, # [MHz]
"res_phase": 0,
"adc_trig_offset": 175, # [Clock ticks]
"res_gain":30000
}
qubit_cfg={
"sigma":soccfg.us2cycles(0.025, gen_ch=9),
"pi_gain": 11500,
"pi2_gain":11500//2,
"f_ge":4743.041802067813,
"relax_delay":500
}
feedback_ch = 0
mixer_f=7300
class SingleToneSpectroscopyProgram(AveragerProgram):
def initialize(self):
cfg=self.cfg
self.declare_gen(ch=cfg["res_ch"], nqz=2, mixer_freq=mixer_f, ro_ch=feedback_ch ) #Readout
for ch in [feedback_ch]: #configure the readout lengths and downconversion frequencies
self.declare_readout(ch=ch, length=cfg["readout_length"],
freq=cfg["frequency"], gen_ch=cfg["res_ch"])
freq=self.freq2reg(cfg["frequency"], gen_ch=cfg["res_ch"], ro_ch=feedback_ch) # convert frequency to dac frequency (ensuring it is an available adc frequency)
self.set_pulse_registers(ch=cfg["res_ch"], style="const", freq=freq, phase=0, gain=cfg["res_gain"],
length=cfg["readout_length"])
self.synci(200) # give processor some time to configure pulses
def body(self):
self.measure(pulse_ch=self.cfg["res_ch"],
adcs=[feedback_ch],
adc_trig_offset=self.cfg["adc_trig_offset"],
wait=True,
syncdelay=self.us2cycles(self.cfg["relax_delay"]))
expt_cfg={"reps":1000, "relax_delay":10,
"start":7300-mixer_f, "step":1, "expts":200
}
config={**hw_cfg,**readout_cfg,**qubit_cfg,**expt_cfg} #combine configs
fpts=expt_cfg["start"] + expt_cfg["step"]*np.arange(expt_cfg["expts"])
amps=[]
for f in tqdm(fpts):
config["frequency"]=f
rspec=SingleToneSpectroscopyProgram(soccfg, config)
avgi,avgq=rspec.acquire(soc)
amp=np.abs(avgi[0][0]+1j*avgq[0][0])
amps.append(amp)
amps=np.array(amps)
plt.subplot(111,title="Resonator Spectroscopy", xlabel="Resonator Frequency (MHz)", ylabel="Amp. (adc level)")
plt.plot(fpts+mixer_f, amps,'o-')
max_freq=fpts[np.argmax(amps)]
plt.show()
Thanks @JavierSerranoGarcia, I started to draft for supporting the interpolated channel.
However, I have some questions: from qibolab how do you want to specify the mixer frequency? Since it is not a standard parameter I see two options:
platform.py
a specific mixer_frequency for a specific channelI have also other questions:
Hi @rodolfocarobene,
We should do the same as other instruments and set it in the platform (channel object) and in the runcard the parameter value port.lo_frequency.
The sweeper should sweep the frequency with a fixed mixer frequency. The interpolated channel frequencies must be between [-fs/2, fs/2] being fs in some channels 4915 and other 6881. So the bandwidth is quite large.
I am leaving on vacation for a couple of weeks so probably I will answer emails.
Hi @rodolfocarobene, we should work on some issues/improvements next week.
and whatever we will come up with.