def test_parametric_pulse_schedule(self): """Test that parametric instructions/schedules can be drawn.""" filename = self._get_resource_path('current_parametric_matplotlib_ref.png') schedule = Schedule(name='test_parametric') schedule += pulse_lib.Gaussian(duration=25, sigma=4, amp=0.5j)(DriveChannel(0)) pulse_drawer(schedule, filename=filename) self.assertImagesAreEqual(filename, self.parametric_matplotlib_reference) os.remove(filename)
def test_play(self): """Test that Play instructions can be drawn. The output should be the same as the parametric_pulse_schedule test. """ filename = self._get_resource_path('current_play_matplotlib_ref.png') schedule = Schedule(name='test_parametric') schedule += Play(pulse_lib.Gaussian(duration=25, sigma=4, amp=0.5j), DriveChannel(0)) pulse_drawer(schedule, filename=filename) self.assertImagesAreEqual(filename, self.parametric_matplotlib_reference) os.remove(filename)