Skip to content
Snippets Groups Projects
Commit 10fe775c authored by Sander Snoo's avatar Sander Snoo
Browse files

Merge branch maintenance_1.6 into dev

parents 3b34fb0d 9d82bbdf
No related branches found
No related tags found
No related merge requests found
# Changelog
All notable changes to Pulselib will be documented in this file.
## \[1.6.31] - 2023-07-28
- Added argument reload_seq=True to use 1D and 2D fast scan with external sweep modifying pulse-lib settings
- Fixed attenuation qubit channel for Qblox
- Fixed baseband qubit channel for Qblox
## \[1.6.30] - 2023-07-20
- Removed digitizer resonator drive amplitude sweep feature for Qblox. It broke functionality.
......
__version__ = "1.6.30"
__version__ = "1.6.31"
......@@ -110,17 +110,17 @@ class PulsarUploader:
for IQ_channel in self.IQ_channels.values():
iq_pair = IQ_channel.IQ_out_channels
if len(iq_pair) != 2:
raise Exception(f'IQ-channel should have 2 awg channels '
if len(iq_pair) not in [1,2]:
raise Exception(f'IQ-channel should have 1 or 2 awg channels '
f'({iq_pair})')
out_names = [self.awg_channels[ch_info.awg_channel_name] for ch_info in iq_pair]
awg_names = [awg_channel.awg_name for awg_channel in out_names]
iq_out_channels += [ch_info.awg_channel_name for ch_info in iq_pair]
if awg_names[0] != awg_names[1]:
if len(iq_pair) == 2 and awg_names[0] != awg_names[1]:
raise Exception(f'IQ channels should be on 1 awg: {iq_pair}')
iq_out_channels += [ch_info.awg_channel_name for ch_info in iq_pair]
self.awg_voltage_channels = {}
for name, awg_channel in self.awg_channels.items():
if name not in iq_out_channels:
......@@ -732,15 +732,25 @@ class UploadAggregator:
channel_name = qubit_channel.channel_name
delays = []
for i in range(2):
awg_channel_name = qubit_channel.iq_channel.IQ_out_channels[i].awg_channel_name
delays.append(self.channels[awg_channel_name].delay_ns)
if delays[0] != delays[1]:
iq_channel = qubit_channel.iq_channel
iq_out_channels = iq_channel.IQ_out_channels
# lookup and check delays
delays = [self.channels[output.awg_channel_name].delay_ns for output in iq_out_channels]
if min(delays) != max(delays):
raise Exception(f'I/Q Channel delays must be equal ({channel_name})')
t_offset = PulsarConfig.align(self.max_pre_start_ns + delays[0])
delay = delays[0]
# lookup attenuation of AWG channels
att = [self.channels[output.awg_channel_name].attenuation for output in iq_out_channels]
if min(att) != max(att):
raise Exception('Attenuation for IQ output is not equal for channels '
f'{[[output.awg_channel_name] for output in iq_out_channels]}')
attenuation = att[0]
lo_freq = qubit_channel.iq_channel.LO
t_offset = PulsarConfig.align(self.max_pre_start_ns + delay)
lo_freq = iq_channel.LO
nco_freq = get_iq_nco_idle_frequency(job, qubit_channel, job.index)
seq = IQSequenceBuilder(channel_name, self.program[channel_name],
......@@ -748,13 +758,6 @@ class UploadAggregator:
mixer_gain=qubit_channel.correction_gain,
mixer_phase_offset=qubit_channel.correction_phase)
# lookup attenuation of AWG channels
iq_out_channels = qubit_channel.iq_channel.IQ_out_channels
att = [self.channels[output.awg_channel_name].attenuation for output in iq_out_channels]
if min(att) != max(att):
raise Exception('Attenuation for IQ output is not equal for channels '
f'{[[output.awg_channel_name] for output in iq_out_channels]}')
attenuation = min(att)
scaling = 1/(attenuation * seq.max_output_voltage*1000)
seq.set_time_offset(t_offset)
......
......@@ -188,11 +188,11 @@ class Context:
pulse.define_iq_channel(iq_channel_name, i_name=I,
marker_name=iq_marker)
pulse.set_iq_lo(iq_channel_name, 0.0)
# qubit freqs: 150, 200, 250, 300 MHz
# qubit freqs: 50, 100, 150, 200 MHz
for j in range(2):
qubit = 2*i+j+1
if qubit < n_qubits+1:
resonance_frequency = 0.100e9 + qubit*0.50e9
resonance_frequency = qubit*0.050e9
pulse.define_qubit_channel(f"q{qubit}", iq_channel_name, resonance_frequency)
......
from pulse_lib.tests.configurations.test_configuration import context
#%%
from numpy import pi
def test1():
pulse = context.init_pulselib(n_qubits=1, no_IQ=True)
f_q1 = 50e6
s = pulse.mk_segment()
s.q1.add_MW_pulse(0, 20, 100, f_q1)
s.q1.add_phase_shift(20, pi/2)
s.q1.add_phase_shift(20, pi/2)
s.q1.add_MW_pulse(20, 40, 100, f_q1)
s.q1.add_phase_shift(40, pi)
s.reset_time()
s.q1.add_phase_shift(0, -pi/2)
s.q1.add_MW_pulse(0, 20, 100, f_q1)
s.q1.add_phase_shift(20, pi/2)
s.q1.add_MW_pulse(20, 40, 100, f_q1)
sequence = pulse.mk_sequence([s])
sequence.n_rep = 1
context.add_hw_schedule(sequence)
context.plot_awgs(sequence)
return None
#%%
if __name__ == '__main__':
ds1 = test1()
......@@ -6,7 +6,7 @@ print('packages: %s' % packages)
setup(name="pulse_lib",
version="1.6.30",
version="1.6.31",
packages = find_packages(),
python_requires=">=3.7",
install_requires=[
......
......@@ -2,7 +2,7 @@
# github_url = "https://github.com/<user or organization>/<project>/"
[version]
current = "1.6.30"
current = "1.6.31"
# Example of a semver regexp.
# Make sure this matches current_version before
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment