anchor.diff:  
     disabledTestPaths = [
       "test/randomized/test_transpiler_equivalence.py" # collection requires qiskit-aer, which would cause circular dependency
  -  ] ++ lib.optionals (!withClassicalFunctionCompiler) [
  -    "test/python/classical_function_compiler/"
  +    # These tests are nondeterministic and can randomly fail.
  +    # We ignore them here for deterministic building.
  +    "test/randomized/"
  +    # These tests consistently fail on GitHub Actions build
  +    "test/python/quantum_info/operators/test_random.py"
     ];
  +  pytestFlagsArray = [ "--durations=10" ];
     disabledTests = [
  -    # Not working on matplotlib >= 3.4.0, checks images match.
  +    # Flaky tests
  +    "test_pulse_limits" # Fails on GitHub Actions, probably due to minor floating point arithmetic error.
  +    "test_cx_equivalence"  # Fails due to flaky test
  +    "test_two_qubit_synthesis_not_pulse_optimal" # test of random circuit, seems to randomly fail depending on seed
  +    "test_qv_natural" # fails due to sign error. Not sure why
  +  ] ++ lib.optionals (lib.versionAtLeast matplotlib.version "3.4.0") [
       "test_plot_circuit_layout"
  -
  -    # Flaky tests
  -    "test_cx_equivalence"
  -    "test_pulse_limits"
  -    "test_1q_random"
  -  ] ++ lib.optionals (!withClassicalFunctionCompiler) [
  -    "TestPhaseOracle"
  -  ] ++ lib.optionals stdenv.isAarch64 [
  -    "test_circuit_init" # failed on aarch64, https://gist.github.com/r-rmcgibbo/c2e173d43ced4f6954811004f6b5b842
     ]
     # Disabling slow tests for build constraints
     ++ [
  
positive.code:   # Crosstalk-adaptive layout pass
  , withCrosstalkPass ? false
  , z3
    # Classical function -> Quantum Circuit compiler
  , withClassicalFunctionCompiler ? true
  , tweedledum
    # test requirements
  , ddt
  , hypothesis
  
negative.code:     python-dateutil
      retworkx
      scipy
      scikit-quant
      symengine
      sympy
      tweedledum
    ] ++ lib.optionals withVisualization visualizationPackages
    ++ lib.optionals withCrosstalkPass crosstalkPackages;
  
    # *** Tests ***
    checkInputs = [
  