about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/qiskit-terra
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-12-15 19:32:38 +0100
committerAlyssa Ross <hi@alyssa.is>2023-12-15 19:32:38 +0100
commit6b8e2555ef013b579cda57025b17d662e0f1fe1f (patch)
tree5a83c673af26c9976acd5a5dfa20e09e06898047 /nixpkgs/pkgs/development/python-modules/qiskit-terra
parent66ca7a150b5c051f0728f13134e6265cc46f370c (diff)
parent02357adddd0889782362d999628de9d309d202dc (diff)
downloadnixlib-6b8e2555ef013b579cda57025b17d662e0f1fe1f.tar
nixlib-6b8e2555ef013b579cda57025b17d662e0f1fe1f.tar.gz
nixlib-6b8e2555ef013b579cda57025b17d662e0f1fe1f.tar.bz2
nixlib-6b8e2555ef013b579cda57025b17d662e0f1fe1f.tar.lz
nixlib-6b8e2555ef013b579cda57025b17d662e0f1fe1f.tar.xz
nixlib-6b8e2555ef013b579cda57025b17d662e0f1fe1f.tar.zst
nixlib-6b8e2555ef013b579cda57025b17d662e0f1fe1f.zip
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/qiskit-terra')
-rw-r--r--nixpkgs/pkgs/development/python-modules/qiskit-terra/default.nix21
1 files changed, 16 insertions, 5 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/qiskit-terra/default.nix b/nixpkgs/pkgs/development/python-modules/qiskit-terra/default.nix
index 2c290493b063..38c01d252ae1 100644
--- a/nixpkgs/pkgs/development/python-modules/qiskit-terra/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/qiskit-terra/default.nix
@@ -1,11 +1,13 @@
 { stdenv
 , lib
+, pythonAtLeast
 , pythonOlder
 , buildPythonPackage
 , fetchFromGitHub
 , cargo
 , rustPlatform
 , rustc
+, libiconv
   # Python requirements
 , dill
 , numpy
@@ -33,7 +35,7 @@
 , seaborn
   # Crosstalk-adaptive layout pass
 , withCrosstalkPass ? false
-, z3
+, z3-solver
   # test requirements
 , ddt
 , hypothesis
@@ -53,14 +55,15 @@ let
     pylatexenc
     seaborn
   ];
-  crosstalkPackages = [ z3 ];
+  crosstalkPackages = [ z3-solver ];
 in
 
 buildPythonPackage rec {
   pname = "qiskit-terra";
   version = "0.25.1";
+  format = "setuptools";
 
-  disabled = pythonOlder "3.7";
+  disabled = pythonOlder "3.7" || pythonAtLeast "3.11";
 
   src = fetchFromGitHub {
     owner = "qiskit";
@@ -71,10 +74,12 @@ buildPythonPackage rec {
 
   nativeBuildInputs = [ setuptools-rust rustc cargo rustPlatform.cargoSetupHook ];
 
+  buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
+
   cargoDeps = rustPlatform.fetchCargoTarball {
     inherit src;
     name = "${pname}-${version}";
-    hash = "sha256-SXC0UqWjWqLlZvKCRBylSX73r4Vale130KzS0zM8gjQ=";
+    hash = "sha256-f5VLNxv9DKwfRy5zacydfz4Zrkbiee7JecOAbVelSto=";
   };
 
   propagatedBuildInputs = [
@@ -116,6 +121,8 @@ buildPythonPackage rec {
     "test/randomized/"
     # These tests consistently fail on GitHub Actions build
     "test/python/quantum_info/operators/test_random.py"
+    # Too many floating point arithmetic errors
+    "test/visual/mpl/circuit/test_circuit_matplotlib_drawer.py"
   ];
   pytestFlagsArray = [ "--durations=10" ];
   disabledTests = [
@@ -125,6 +132,11 @@ buildPythonPackage rec {
     "TestGraphMatplotlibDrawer"
     "test_copy" # assertNotIn doesn't seem to work as expected w/ pytest vs unittest
 
+    "test_bound_pass_manager" # AssertionError: 0 != 2
+    "test_complex_parameter_bound_to_real" # qiskit.circuit.exceptions.CircuitError: "Invalid param type <class 'complex'> for gate rx."
+    "test_expressions_of_parameter_with_constant" # Floating point arithmetic error
+    "test_handle_measurement" # AssertionError: The two circuits are not equal
+
     # 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
@@ -195,7 +207,6 @@ buildPythonPackage rec {
 
 
   meta = with lib; {
-    broken = true; # tests segfault python
     description = "Provides the foundations for Qiskit.";
     longDescription = ''
       Allows the user to write quantum circuits easily, and takes care of the constraints of real hardware.