# pprint.pprint(test_element._channels)
# print 

# define some bogus pulses.
sin_pulse = pulse.SinePulse(channel='RF', name='A sine pulse on RF')
sq_pulse = pulse.SquarePulse(channel='MW_pulsemod', 
    name='A square pulse on MW pmod')

special_pulse = pulse.SinePulse(channel='RF', name='special pulse')
special_pulse.amplitude = 0.2
special_pulse.length = 2e-6
special_pulse.frequency = 10e6
special_pulse.phase = 0

# create a few of those
test_element.add(pulse.cp(sin_pulse, frequency=1e6, amplitude=1, length=1e-6), 
    name='first pulse')
test_element.add(pulse.cp(sq_pulse, amplitude=1, length=1e-6), 
	name='second pulse', refpulse='first pulse', refpoint='end')
test_element.add(pulse.cp(sin_pulse, frequency=2e6, amplitude=0.5, length=1e-6), 
    name='third pulse', refpulse='second pulse', refpoint='end')

# print 'Element overview:'
# test_element.print_overview()
# print 

special_element = element.Element('Another element', pulsar=qt.pulsar)
special_element.add(special_pulse)

# upload waveforms
qt.pulsar.upload(test_element, special_element)
Exemple #2
0
# e.add(pulse.cp(p1, amplitude=1, length=10e-8), name='reference')
# e.add(pulse.cp(p1, amplitude=0.5, length=10e-9), start=10e-9,
#     refpulse='reference', refpoint='end')
# e.add(pulse.cp(p2, 1e7, 1, 1e-7), start=10e-9)

# e.print_overview()
# view.show_element(e, delay=True) # if delay is false, the channel delay shift
#                                  # is omitted in the plots (channels are offset then)

e2 = element.Element('sequence_element',
                     clock=1e9,
                     min_samples=0,
                     global_time=True,
                     time_offset=1.236e-6)

e2.define_channel('ch1', delay=110e-9)
e2.define_channel('ch2', delay=100e-9)
e2.define_channel('ch3', delay=120e-9)

e2.append(pulse.cp(p1, amplitude=1, length=100e-9),
          pulse.cp(p1, amplitude=0.5, length=10e-9),
          pulse.cp(p2, 1e7, 1, 1e-7))

e2.print_overview()

print e2.next_pulse_time('ch1'), e2.next_pulse_time('ch2'), \
    e2.next_pulse_time('ch3')
print e2.next_pulse_global_time('ch1'), e2.next_pulse_global_time('ch2'), \
    e2.next_pulse_global_time('ch3')

view.show_element(e2, delay=True)
# pprint.pprint(test_element._channels)
# print

# define some bogus pulses.
sin_pulse = pulse.SinePulse(channel='RF', name='A sine pulse on RF')
sq_pulse = pulse.SquarePulse(channel='MW_pulsemod',
                             name='A square pulse on MW pmod')

special_pulse = pulse.SinePulse(channel='RF', name='special pulse')
special_pulse.amplitude = 0.2
special_pulse.length = 2e-6
special_pulse.frequency = 10e6
special_pulse.phase = 0

# create a few of those
test_element.add(pulse.cp(sin_pulse, frequency=1e6, amplitude=1, length=1e-6),
                 name='first pulse')
test_element.add(pulse.cp(sq_pulse, amplitude=1, length=1e-6),
                 name='second pulse',
                 refpulse='first pulse',
                 refpoint='end')
test_element.add(pulse.cp(sin_pulse, frequency=2e6, amplitude=0.5,
                          length=1e-6),
                 name='third pulse',
                 refpulse='second pulse',
                 refpoint='end')

# print 'Element overview:'
# test_element.print_overview()
# print
# # at insertion time, i.e. manipulation of pulses inside the element
# # (they are deep copies) can break the reference relation!
# e.add(pulse.cp(p1, amplitude=1, length=10e-8), name='reference')
# e.add(pulse.cp(p1, amplitude=0.5, length=10e-9), start=10e-9, 
#     refpulse='reference', refpoint='end')
# e.add(pulse.cp(p2, 1e7, 1, 1e-7), start=10e-9)

# e.print_overview()
# view.show_element(e, delay=True) # if delay is false, the channel delay shift
#                                  # is omitted in the plots (channels are offset then)

e2 = element.Element('sequence_element', clock=1e9, min_samples=0,
    global_time=True, time_offset=1.236e-6)

e2.define_channel('ch1', delay=110e-9)
e2.define_channel('ch2', delay=100e-9)
e2.define_channel('ch3', delay=120e-9)

e2.append(
    pulse.cp(p1, amplitude=1, length=100e-9),
    pulse.cp(p1, amplitude=0.5, length=10e-9),
    pulse.cp(p2, 1e7, 1, 1e-7))

e2.print_overview()

print e2.next_pulse_time('ch1'), e2.next_pulse_time('ch2'), \
    e2.next_pulse_time('ch3')
print e2.next_pulse_global_time('ch1'), e2.next_pulse_global_time('ch2'), \
    e2.next_pulse_global_time('ch3')

view.show_element(e2, delay=True)
Exemple #5
0
					channel='RF', 
					name='special pulse')

# Set properties of special pulse
special_pulse.amplitude = 0.2
special_pulse.length 	= 2e-6
special_pulse.frequency = 10e6
special_pulse.phase 	= 0



# create a few of those
test_element.add(				# Add oulse to the sequence element
	pulse.cp(					# create a copy of the pulse, configure it by given arguments (using the call method of the pulse class), and return the copy
		sin_pulse,
		frequency=1e6,
		amplitude=1,
		length=1e-6), 
    	name='first pulse') 	# name of sequence

test_element.add(
	pulse.cp(
		sq_pulse, 
		amplitude=1, 
		length=1e-6), 
		name='second pulse',
		refpulse='first pulse', # reference to second pulse where this pulse is to be mouted
		refpoint='end')			# point of mount, end appends the second pulse to the first pulse

test_element.add(
	pulse.cp(