anchor.diff:      networkx
       ply
       psutil
  +    python-constraint
  +    retworkx
       scipy
       sympy
  +    # Optional/visualization inputs
  +    ipywidgets
  +    matplotlib
  +    pillow
  +    pydot
  +    pygments
  +    pylatexenc
  +    seaborn
     ];
   
  +  postPatch = ''
  +    # Fix relative imports in tests
  +    touch test/python/dagcircuit/__init__.py
  +  '';
   
     # *** Tests ***
     checkInputs = [
       ddt
       hypothesis
  -    ipywidgets
       nbformat
       nbconvert
  -    pillow
  -    pydot
  -    pygraphviz
  -    pylatexenc
       pytestCheckHook
     ];
  +  dontUseSetuptoolsCheck = true;  # can't find setup.py, so fails. tested by pytest
   
     pythonImportsCheck = [
       "qiskit"
       "qiskit.transpiler.passes.routing.cython.stochastic_swap.swap_trial"
     ];
   
  -  dontUseSetuptoolsCheck = true;  # can't find setup.py, so fails. tested by pytest
  -
     disabledTests = [
  -    "test_long_name"  # generated circuit images differ for some reason
       "test_jupyter_jobs_pbars" # needs IBMQ provider package (qiskit-ibmq-provider), circular dependency
     ];
   
  
positive.code: , pythonOlder
  , buildPythonPackage
  , fetchFromGitHub
  , cython
  , dill
  , jsonschema
  , numpy
  , marshmallow
  , marshmallow-polyfield
  , matplotlib
  , networkx
  , ply
  , psutil
  , scipy
  , sympy
    # test requirements
  , ddt
  , hypothesis
  , ipywidgets
  , nbformat
  , nbconvert
  , pillow
  , pydot
  , python
  , pygraphviz
  , pylatexenc
  , pytestCheckHook
  }:
  
  buildPythonPackage rec {
    pname = "qiskit-terra";
    version = "0.12.0";
  
    disabled = pythonOlder "3.5";
  
  
negative.code:     owner = "Qiskit";
      repo = pname;
      rev = version;
      sha256 = "03fgqmyahgmkf5dbw19n9c1v8p4kmpk50wxhhc8435cclvs26x9j";
    };
  
    nativeBuildInputs = [ cython ];
  
    propagatedBuildInputs = [
      dill
      fastjsonschema
      jsonschema
      numpy
      marshmallow
  