Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* A first gist of sequence sampler plain dataframe of samples extract samples in the nested dict form A note: basis that are unused by declared channels are arrays full of zeros, while it is simply not initilized in the dict in the simulation module. add test to compare with extraction from simulation module Add various docstrings type annotations sample per qubit, test passes add support for LocalNoises add seed to the amplitude_noise generator fix the doppler noise to use a normal distribution Write test for doppler noise. It fails. It fails probably because of the different seeds in the random generators ? refactor a bit Rename as module sampler Refactor by distinguishing the local and global extraction Remove unused import Refactor the noises to their own modules Add modulation, but no implementation Revert "Refactor the noises to their own modules" This reverts commit 37093330c57a9152604f239e79ec6940a213b432. Use strategies for _TimeSlot extraction Remove functions made useless by refactor to strategy pattern Add doctrings and make some functions private Extend test to local channels Remove dead code Add modulation Refactor a bit: docstrings, order of functions, etc. Fix _TimeSlot grouping by handling delays correctly Tidy the comments refactor the extraction strategies Docstring * Refactor sampler in independent module * Consistent support for noises, SLM and modulation of Global and Local Deprecate temporarily the amplitude_noise as it misses the point It urges for a correct implementation Refactor sample writing Allow local decay with on SLM Add support for noises on global channel Add TODO for global modulation Fix usage of noises.apply() Fix modulation and apply SLM on local channels as well Fix imports * Refactor the noises module Also fix imports for mypy compliance * Improve docstrings and small refactoring * Small typos in comments * Fix the decay of global channels to local ones * Fix the modulation feature * Refactor Adds a post_init check for same length of quantities arrays Add documentation, testing and refactoring Refactor the dict construction with modulation Simple comment to clarify the design of sampler.sample() Remove unnecessary value in enum _GroupType Add a diagram for _TimeSlot grouping Fix embedded NoiseModel by using copies Update docstrings with args Expose the sample() function from the __init__ Test the amplitude noise Remove unused commented import Add usage note on doppler noise Add a docstring for the amplitude noise Remove empty line Create a better test for doppler noise Small refactor Mark the doppler test as expected to fail Refactor the control flow of sampler.sample() Refactor the dict exporting Refactor Fix typo Add a docstring Refactor the TimeSlot grouping and strategy * Simplify the flow of samples.samples() Global and local channels are sampled identically. The export to a dict form like the simulation one handles the distinctions. It introduces an additional dict keeping track of the addressing of each channel: Global, Decayed, Local. Trim dead code, refactor, defensive coding Write global channel from QubitSamples Rename modulation function * Improve test and get total coverage Table based tests Add a modulation test I don't like it. It is testing the sampling for sure, but still I would like to test against a known output of the modulation. Remove unnecessary if branch functools.reduce got us covered already Extend to digital Fix mypy error because of weird scope of variables Test sequence in XY and fix a typo in the relevant code Test for corner cases and omit defensive coding with pragma no cover * Simplify the sampling by removing the Samples dataclass * Fix a docstring * Fix docstrings formatting and content * Remove unnecessary nonzero check in amplitude noise * Fix the noise seed default value: defaults to None * Improve docstrings of helper functions in noise module * Apply noises before the SLM masking * Rename misnamed variables * Change the scope of _key_func() and remove the _GroupType class * Fix dictionary construction with defaultdict * Fix misnamed keys in tests * Add a match to pytest.raises * Move the noises to the simulation module Import NoiseModel as noises.NoiseModel to avoid a weird circular import * Improve the simulation.noises docstring * Remove noisy helper functions * Write test case for _write_dict exception It removes the # pragma: no cover. * Reorder tests * Add a more fundamental test * Reword and add docstrings * Fix other misnamed keys in tests * Fix SLM masking: consider only the seq._mask_times Sequence._slm_mask_time is not a list of times, but a pair with a start and end time of the SLM masking. * Change for defaultdict in new_qdict * Add a note about performance for sampling of global channels For global channels, we hold the same data in N copies, N the number of qubits of the register. It scales poorly with the size of the register, but it remains manageable for current size of registers. If needed, we should patch this, at the expense of a more complex control flow in the sample() function at least. * Simply testing of sequence * Refactor the testing of sequence with a helper function * Fix the testing of blackman modulation * Move noise-related tests to an independent testing files * Fix the unneeded # pragma: no cover in _sample_slots * Add a Failing test for the SLM, for discussion * Move the comment on performance * Make the SLM detectino more idiomatic * Simplify the assertions for sequence in XY * Remove superfluous print statements * Test SLM sampling alongside the check against simulation * Refactor using a helper for nested dicts * Rearrange the test file
- Loading branch information