You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With introduction of pulse ScheduleBlock (see #5679), the software implementation of the qiskit pulse was drastically updated while minimizing the impact to user API. However, the unittests are still based on the old codebase structure and there are many redundant/duplicated tests.
Basic changes based on the ScheduleBlock are listed as follows:
ScheduleBlock is added as the output program format of the builder syntax.
pulse.transforms turned into a package, aiming at pass manager implementation.
Alignment transforms became a class instance rather than callbacks to keep arguments attached to the macro.
Parameter framework is replaced with the visitor pattern (see discussion)
Parameter relevant test for any program representation can be tested in a single place now.
I suggest to reorganize test.python.pulse as follows:
pulse_test_utils.py
A common 2Q backend that can be used for unittest of ScheduleBlock, Schedule and builder syntax.
Some easy integration test model from backend.defaults input, program generation to Qobj generation.
A collection of some util methods.
test_block.py
Remove tests for parameters
Remove tests for alignment context
More scalable test with the common backend
test_builder.py
Rewrite reference schedule in the block representation (since output is block)
Remove tests for parameters
Remove tests for alignment context
More scalable test with the common backend
test_channels.py (as-is)
test_library.py
Merge test_continuous_pulses.py, test_discrete_pulses.py, test_samplers.py, and test_pulse_lib.py
test_continuous_pulses.py
Remove
test_discrete_pulses.py
Remove
test_experiment_configurations.py (as-is)
test_instruction_schedule_map.py (as-is)
test_instructions.py (as-is)
test_macros.py (as-is)
test_parameter_manager.py
Add tests for parametrized Schedule (this is indirectly tested with parametrized builder syntax test)
Add explicit test for each instruction
test_parameters.py
Remove (this is old parameter framework, just supported for backward compatibility)
test_parser.py (as-is)
test_pulse_lib.py
Remove
test_samplers.py
Remove
test_schedule.py
More scalable test with the common backend
test_transforms.py
Migrate alignment relevant tests from test_builder.py and test_block.py
Replace function based alignment with AlignmentKind class
We also need further discussion for granularity of unittest classes. These classes are prepared for a specific method, collection of methods (some behavior), or subclass-wise, i.e. seems no standard rule. This may make us easily miss important testcases and raise the bar for contribution. Perhaps need some guideline? Welcome suggestions :)
The text was updated successfully, but these errors were encountered:
What is the expected enhancement?
With introduction of pulse
ScheduleBlock
(see #5679), the software implementation of the qiskit pulse was drastically updated while minimizing the impact to user API. However, the unittests are still based on the old codebase structure and there are many redundant/duplicated tests.Basic changes based on the
ScheduleBlock
are listed as follows:ScheduleBlock
is added as the output program format of the builder syntax.pulse.transforms
turned into a package, aiming at pass manager implementation.I suggest to reorganize
test.python.pulse
as follows:pulse_test_utils.py
ScheduleBlock
,Schedule
and builder syntax.test_block.py
test_builder.py
test_channels.py
(as-is)test_library.py
test_continuous_pulses.py
,test_discrete_pulses.py
,test_samplers.py
, andtest_pulse_lib.py
test_continuous_pulses.py
test_discrete_pulses.py
test_experiment_configurations.py
(as-is)test_instruction_schedule_map.py
(as-is)test_instructions.py
(as-is)test_macros.py
(as-is)test_parameter_manager.py
Schedule
(this is indirectly tested with parametrized builder syntax test)test_parameters.py
test_parser.py
(as-is)test_pulse_lib.py
test_samplers.py
test_schedule.py
test_transforms.py
test_builder.py
andtest_block.py
AlignmentKind
classWe also need further discussion for granularity of unittest classes. These classes are prepared for a specific method, collection of methods (some behavior), or subclass-wise, i.e. seems no standard rule. This may make us easily miss important testcases and raise the bar for contribution. Perhaps need some guideline? Welcome suggestions :)
The text was updated successfully, but these errors were encountered: