Skip to content

Commit

Permalink
Add stub of deca dac program builder
Browse files Browse the repository at this point in the history
  • Loading branch information
terrorfisch committed Sep 1, 2023
1 parent c956222 commit 5a1cadf
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions qupulse/program/decadac.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
from dataclasses import dataclass
from typing import Mapping, Optional, Sequence, ContextManager, Iterable

from qupulse import ChannelID, MeasurementWindow
from qupulse.parameter_scope import Scope
from qupulse.program import ProgramBuilder, HardwareTime, HardwareVoltage, Waveform, RepetitionCount, TimeType


@dataclass
class DecaDACASCIIProgram:
script: str
duration: TimeType


class DecaDACASCIIBuilder:
def __init__(self):
pass

def inner_scope(self, scope: Scope) -> Scope:
"""This function is necessary to inject program builder specific parameter implementations into the build
process."""
raise NotImplementedError('TODO')

def hold_voltage(self, duration: HardwareTime, voltages: Mapping[ChannelID, HardwareVoltage]):
raise NotImplementedError('TODO')

def play_arbitrary_waveform(self, waveform: Waveform):
raise NotImplementedError('Not implemented yet (postponed)')

def measure(self, measurements: Optional[Sequence[MeasurementWindow]]):
"""Ignores measurements"""
pass

def with_repetition(self, repetition_count: RepetitionCount,
measurements: Optional[Sequence[MeasurementWindow]] = None) -> Iterable['ProgramBuilder']:
raise NotImplementedError('TODO')

def with_sequence(self,
measurements: Optional[Sequence[MeasurementWindow]] = None) -> ContextManager['ProgramBuilder']:
raise NotImplementedError('TODO')

def new_subprogram(self, global_transformation: 'Transformation' = None) -> ContextManager['ProgramBuilder']:
raise NotImplementedError('Not implemented yet (postponed)')

def with_iteration(self, index_name: str, rng: range,
measurements: Optional[Sequence[MeasurementWindow]] = None) -> Iterable['ProgramBuilder']:
raise NotImplementedError('TODO')

def to_program(self) -> Optional[DecaDACASCIIProgram]:
"""Further addition of new elements might fail after finalizing the program."""
raise NotImplementedError('TODO')

0 comments on commit 5a1cadf

Please sign in to comment.