-
Notifications
You must be signed in to change notification settings - Fork 57
Open
Description
I work with a Macbook Pro with a 12-core M2 Pro CPU. If I install pytest-xdist (to enable parallel tests) and then run pytest -n auto test/unit --durations=20
, I get the following. There's an insane amount of time spent on the 10 or so slowest tests.
=================================================================================================== slowest 20 durations ====================================================================================================
1592.01s call test/unit/tools/test_errgenproptools.py::ErrgenCompositionCommutationTester::test_errorgen_composition
1505.58s call test/unit/tools/test_errgenproptools.py::ApproxStabilizerMethodTester::test_alpha
467.73s call test/unit/protocols/test_rb.py::TestCliffordRBDesign::test_parallel_design_construction
391.56s call test/unit/objects/test_circuit.py::CircuitMethodTester::test_convert_to_cirq
275.94s call test/unit/objects/test_forwardsim.py::ForwardSimConsistencyTester::test_consistent_jacs
267.55s call test/unit/tools/test_errgenproptools.py::ApproxStabilizerMethodTester::test_stabilizer_probability_correction
263.35s call test/unit/tools/test_errgenproptools.py::ApproxStabilizerMethodTester::test_approximate_stabilizer_probabilities
203.66s call test/unit/tools/test_errgenproptools.py::ApproxStabilizerMethodTester::test_phi
167.68s call test/unit/tools/test_errgenproptools.py::ApproxStabilizerMethodTester::test_approximate_stabilizer_probability
148.52s call test/unit/tools/test_edesigntools.py::FisherInformationTester::test_calculate_fisher_information_matrix_with_instrument
117.19s call test/unit/tools/test_errgenproptools.py::ErrgenCompositionCommutationTester::test_bch_approximation
87.17s call test/unit/modelmembers/test_operation.py::StaticOpTester::test_diamonddist
86.65s call test/unit/modelmembers/test_operation.py::LinearlyParamOpTester::test_diamonddist
82.30s call test/unit/modelmembers/test_operation.py::DiagonalCPTPLindbladDenseOpTester::test_diamonddist
79.26s call test/unit/modelmembers/test_operation.py::AffineShiftOpTester::test_diamonddist
78.29s call test/unit/modelmembers/test_operation.py::FullOpTester::test_diamonddist
73.89s call test/unit/tools/test_errgenproptools.py::ApproxStabilizerMethodTester::test_approximate_stabilizer_pauli_expectation
58.17s call test/unit/report/test_colormaps.py::BasicColormapTester::test_get_matplotlib_norm_and_cmap
58.16s call test/unit/report/test_colormaps.py::PiecewiseLinearColormapTester::test_get_matplotlib_norm_and_cmap
56.92s call test/unit/protocols/test_rb.py::TestInterleavedRBProtocol::test_interleavedrb_protocol_noisy
I suggest extremely expensive unit tests be moved into a different folder. Thoughts, @coreyostrove ?
Metadata
Metadata
Assignees
Labels
bugA bug or regressionA bug or regression