guix_mirror_bot pushed a commit to branch master
in repository guix.

commit 2952f2802d9319b7b08c1a88d73fcb3b7471f8d4
Author: Orahcio FelĂ­cio de Sousa <[email protected]>
AuthorDate: Mon Nov 2 18:57:22 2026 -0300

    gnu: Add python-qutip-qoc.
    
    * gnu/packages/physics.scm (python-qutip-qoc): New variable.
    
    Merges: guix/guix!12343
    Modified-by: Sharlatan Hellseher <[email protected]>
    Signed-off-by: Sharlatan Hellseher <[email protected]>
---
 gnu/packages/physics.scm | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/gnu/packages/physics.scm b/gnu/packages/physics.scm
index 9651c3d31c4..59d959a542a 100644
--- a/gnu/packages/physics.scm
+++ b/gnu/packages/physics.scm
@@ -931,6 +931,54 @@ solvers.
 @end itemize")
     (license license:bsd-3)))
 
+(define-public python-qutip-qoc
+  (package
+    (name "python-qutip-qoc")
+    (version "0.2.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/qutip/qutip-qoc";)
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0yqf9xm1x9fhxvy1iqgz02d6ycixxln2znbgl5r8sysrz9x422gs"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:test-flags
+      ;; Skip tests for optional jax feature.
+      #~(list "--ignore" "tests/test_jopt_open_system_bug.py")
+      #:phases
+      #~(modify-phases %standard-phases
+          ;; Upstream forgot to update metadata
+          (add-after 'unpack 'relax-requirements
+            (lambda _
+              (substitute* "setup.cfg"
+                (("numpy>=1.16.6,<2.0")
+                 "numpy>=2.0.0")))))))
+    (propagated-inputs
+     (list python-numpy python-qutip-qtrl))
+    (native-inputs
+     (list python-cython
+           python-jupytext
+           python-nbconvert
+           python-ipykernel
+           python-nbclient
+           python-pytest
+           python-setuptools))
+    (home-page "https://github.com/qutip/qutip-qoc";)
+    (synopsis "Quantum Optimal Control package for QuTiP")
+    (description
+     "@acronym{QOC, Quantum Optimal Control} enhances @code{qutip} by 
providing two
+additional algorithms to optimize analytically defined control functions.  The 
first
+one is an extension of @acronym{GOAT, Gradient Optimization of Analytic 
conTrols}.
+The second one @acronym{JOPT, JAX Optimization Thechnique} leverages QuTiPs 
version 5
+new diffrax abilities to directly calculate gradients of JAX defined control 
functions
+using automatic differentiation.")
+    (license license:bsd-3)))
+
 (define-public python-qutip-qtrl
   (package
     (name "python-qutip-qtrl")

Reply via email to