anchor.diff:    ] ++ lib.optionals (withCvx) [ cvxpy ]
     ++ lib.optionals (withVisualization) [ matplotlib ]
     ++ lib.optionals (withJit) [ numba ];
  -  postInstall = "rm -rf $out/${python.sitePackages}/docs"; # this dir can create conflicts
   
     # Tests
     pythonImportsCheck = [ "qiskit.ignis" ];
     dontUseSetuptoolsCheck = true;
  -  preCheck = "export HOME=$TMPDIR";
  +  preCheck = ''
  +    export HOME=$TMPDIR
  +  '';
     checkInputs = [
       pytestCheckHook
       ddt
  
positive.code: { lib
  , pythonOlder
  , buildPythonPackage
  , fetchFromGitHub
  , python
  , numpy
  , qiskit-terra
  , scikit-learn
  
negative.code:   ];
    disabledTests = [
      "test_tensored_meas_cal_on_circuit" # Flaky test, occasionally returns result outside bounds
    ] ++ lib.optionals stdenv.isAarch64 [
      "test_fitters" # Fails check that arrays are close. Might be due to aarch64 math issues.
    ];
  
    meta = with lib; {
  