-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add stub of deca dac program builder
- Loading branch information
1 parent
c956222
commit 5a1cadf
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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') |