Skip to content

Commit

Permalink
Merge branch 'master' into issues/parameter_constrainer_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lumip committed Jun 28, 2018
2 parents 3303c9e + 5501597 commit 001cea2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/pulses/loop_pulse_template_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,13 @@ def test_build_sequence_constraint_on_loop_var_exception(self):
with self.assertWarnsRegex(UserWarning, "constraint on a variable shadowing the loop index",
msg="ForLoopPT did not issue a warning when constraining the loop index"):
flt = ForLoopPulseTemplate(body=DummyPulseTemplate(parameter_names={'k', 'i'}), loop_index='i',
loop_range=('a', 'b', 'c',), parameter_constraints=['k>i', 'k<=f'])
loop_range=('a', 'b', 'c',), parameter_constraints=['k<=f', 'k>i'])

# loop index showing up in parameter_names because it appears in consraints
self.assertEqual(flt.parameter_names, {'f', 'k', 'a', 'b', 'c', 'i'})

parameters = {'k': ConstantParameter(1), 'a': ConstantParameter(0), 'b': ConstantParameter(2),
'c': ConstantParameter(1), 'f': ConstantParameter(0)}
'c': ConstantParameter(1), 'f': ConstantParameter(2)}
sequencer = DummySequencer()
block = DummyInstructionBlock()

Expand Down

0 comments on commit 001cea2

Please sign in to comment.