3.1.3. qupulse._program.tabor

class qupulse._program.tabor.ParsedProgram(advanced_sequencer_table, sequencer_tables, waveforms, volatile_parameter_positions)

Bases: tuple

Create new instance of ParsedProgram(advanced_sequencer_table, sequencer_tables, waveforms, volatile_parameter_positions)

property advanced_sequencer_table

Alias for field number 0

property sequencer_tables

Alias for field number 1

property volatile_parameter_positions

Alias for field number 3

property waveforms

Alias for field number 2

class qupulse._program.tabor.PlottableProgram(segments, sequence_tables, advanced_sequence_table)[source]

Bases: object

classmethod from_builtin(data)[source]
Return type

PlottableProgram

classmethod from_read_data(waveforms, sequence_tables, advanced_sequence_table)[source]
Return type

PlottableProgram

get_as_single_waveform(channel, max_total_length=1000000000, with_marker=False)[source]
Return type

Optional[ndarray]

get_repetitions()[source]
Return type

ndarray

get_segment_waveform(channel, segment_no)[source]
Return type

ndarray

get_waveforms(channel, with_marker=False)[source]
Return type

List[ndarray]

iter_samples(channel, with_first_idle=False, with_last_idles=False)[source]
Return type

Generator[uint16, None, None]

iter_waveforms_and_repetitions(channel, with_first_idle=False, with_last_idles=False)[source]
Return type

Generator[Tuple[ndarray, int], None, None]

to_builtin()[source]
Return type

dict

class qupulse._program.tabor.PositionalEntry

Bases: tuple

Entry in sequencing or advanced sequencer table as uploaded with :SEQ:DEFor :ASEQ:DEF

Create new instance of PositionalEntry(position, element_number, repetition_count, jump_flag)

property element_number

Alias for field number 1

property jump_flag

Alias for field number 3

property position

Alias for field number 0

property repetition_count

Alias for field number 2

class qupulse._program.tabor.TableDescription

Bases: tuple

Entry in sequencing or advanced sequencer table but with an element ‘reference’ instead ofthe hardware bound ‘number’

Create new instance of TableDescription(repetition_count, element_id, jump_flag)

property element_id

Alias for field number 1

property jump_flag

Alias for field number 2

property repetition_count

Alias for field number 0

class qupulse._program.tabor.TableEntry

Bases: tuple

Entry in sequencing or advanced sequencer table as uploaded to the AWG withdownload_adv_seq_table or download_sequencer_table

Create new instance of TableEntry(repetition_count, element_number, jump_flag)

property element_number

Alias for field number 1

property jump_flag

Alias for field number 2

property repetition_count

Alias for field number 0

exception qupulse._program.tabor.TaborException[source]

Bases: Exception

class qupulse._program.tabor.TaborProgram(program, device_properties, channels, markers, amplitudes, offsets, voltage_transformations, sample_rate, mode=None)[source]

Bases: qupulse.hardware.awgs.base.ProgramEntry

Implementations notes concerning indices / position
  • index: zero based index in internal data structure f.i. the waveform list

  • position: ?

  • no/number: one based index on device

Args: loop: channels: markers: amplitudes: offsets: voltage_transformations: sample_rate: waveforms: These waveforms are sampled and stored in _waveforms. If None the waveforms are extracted from loop

property channels
Return type

Tuple[Union[str, int, None], Union[str, int, None]]

get_advanced_sequencer_table()[source]

Advanced sequencer table that can be used via the download_adv_seq_table pytabor command

Return type

List[TableEntry]

get_sampled_segments()[source]
Return type

Tuple[Sequence[TaborSegment], Sequence[int]]

get_sequencer_tables()[source]
property markers
Return type

Tuple[Union[str, int, None], Union[str, int, None]]

property program
Return type

Loop

setup_advanced_sequence_mode()[source]
Return type

None

setup_single_sequence_mode()[source]
Return type

None

update_volatile_parameters(parameters)[source]

Set the values of parameters which were marked as volatile on program creation. Sets volatile parameters in program memory.

Parameters

parameters (Mapping[str, Number]) – Name of volatile parameters and respective values to which they should be set.

Return type

Mapping[Union[int, Tuple[int, int]], Union[TableEntry, TableDescription]]

Returns

Mapping position of change -> (new repetition value, element_num/id, jump flag)

property waveform_mode
Return type

str

class qupulse._program.tabor.TaborSegment(*, data)[source]

Bases: object

Represents one segment of two channels on the device. Convenience class. The data is stored in native format

CHANNEL_MASK = 16383
MARKER_A_MASK = 16384
MARKER_B_MASK = 32768
QUANTUM = 16
ZERO_VAL = 8192
property ch_a
property ch_b
property data_a
Return type

ndarray

property data_b
Return type

ndarray

classmethod from_binary_data(data_a, data_b)[source]
Return type

TaborSegment

classmethod from_binary_segment(segment_data)[source]
Return type

TaborSegment

classmethod from_sampled(ch_a, ch_b, marker_a, marker_b)[source]
Return type

TaborSegment

get_as_binary()[source]
Return type

ndarray

property marker_a
Return type

ndarray

property marker_b
Return type

ndarray

property native

You must not change native (data or shape)

Return type

ndarray

Returns

An array with shape (n_quanta, 2, 16)

property num_points
Return type

int

class qupulse._program.tabor.TaborSequencing[source]

Bases: enum.Enum

An enumeration.

ADVANCED = 2
SINGLE = 1
qupulse._program.tabor.make_combined_wave(segments, destination_array=None)[source]

Combine multiple segments to one binary blob for bulk upload. Better implementation of pytabor.make_combined_wave.

Parameters
Return type

ndarray

Returns

1 d array for upload to instrument

qupulse._program.tabor.parse_aseq_program(program, used_channels)[source]
Return type

ParsedProgram

qupulse._program.tabor.parse_single_seq_program(program, used_channels)[source]
Return type

ParsedProgram

qupulse._program.tabor.prepare_program_for_advanced_sequence_mode(program, min_seq_len, max_seq_len)[source]

This function tries to bring the program in a form, where the sequence tables’ lengths are valid.

Parameters
  • program (Loop) –

  • min_seq_len (int) –

  • max_seq_len (int) –

Raises

TaborException – if a sequence table that is too long cannot be shortened or a sequence table that is to short cannot be enlarged.