Skip to content

Commit

Permalink
Merge branch 'master' of github.com:qutech/qupulse into issues/446
Browse files Browse the repository at this point in the history
  • Loading branch information
lankes-fzj committed Apr 25, 2019
2 parents 62ab23c + 97b40d5 commit 54a54c5
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
[![Coverage Status](https://coveralls.io/repos/github/qutech/qupulse/badge.svg?branch=master)](https://coveralls.io/github/qutech/qupulse?branch=master)
[![Build Status](https://travis-ci.org/qutech/qupulse.svg?branch=master)](https://travis-ci.org/qutech/qupulse)
[![Documentation Status](https://readthedocs.org/projects/qupulse/badge/?version=latest)](http://qupulse.readthedocs.org/en/latest/?badge=latest)
[![DOI](https://zenodo.org/badge/29915259.svg)](https://zenodo.org/badge/latestdoi/29915259)

The qupulse project aims to produce a software toolkit facilitating experiments involving pulse driven state manipulation of physical qubits.

Expand Down
2 changes: 1 addition & 1 deletion ReleaseNotes.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## pending/current ##
## 0.4 ##

- General:
- Add utility function `qupulse.utils.types.has_type_interface` and use it to circumvent autoreload triggered isinstance fails
Expand Down
2 changes: 1 addition & 1 deletion qupulse/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from qupulse.utils.types import MeasurementWindow, ChannelID
from . import pulses

__version__ = '0.3'
__version__ = '0.4'
__all__ = ["MeasurementWindow", "ChannelID", "pulses"]
4 changes: 4 additions & 0 deletions qupulse/pulses/table_pulse_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ def __init__(self, entries: Dict[ChannelID, Sequence[EntryInInit]],
AtomicPulseTemplate.__init__(self, identifier=identifier, measurements=measurements)
ParameterConstrainer.__init__(self, parameter_constraints=parameter_constraints)

if not entries:
raise ValueError("Cannot construct an empty TablePulseTemplate (no entries given). There is currently no "
"specific reason for this. Please submit an issue if you need this 'feature'.")

self._entries = dict((ch, list()) for ch in entries.keys())
for channel, channel_entries in entries.items():
if len(channel_entries) == 0:
Expand Down
2 changes: 1 addition & 1 deletion tests/pulses/table_pulse_template_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def test_get_entries_auto_insert(self) -> None:
def test_empty_instantiated(self) -> None:
with self.assertRaises(TypeError):
TablePulseTemplate()
with self.assertRaises(ValueError):
with self.assertRaisesRegex(ValueError, 'empty TablePulseTemplate'):
TablePulseTemplate(entries=dict())

def test_get_entries_instantiated_two_equal_entries(self) -> None:
Expand Down

0 comments on commit 54a54c5

Please sign in to comment.