Complex Jacobian computation via real-valued autograd in PyTorch
Project description
complex_jacobian
Jacobian calculation of complex-valued matrix functions using PyTorch.
This package implements automatic differentiation (AD) for complex-valued functions using PyTorch, with a focus on computing Jacobians of functions mapping complex matrices to complex matrices. It is particularly useful in domains like quantum computing and manifold optimization, where complex gradients must be handled with care.
Features
- ✅ Compute complex-valued Jacobians ∂f/∂z and ∂f/∂𝑧̄ (Wirtinger derivatives) using real-valued PyTorch autograd.
- ✅ Specialized support for unitary matrix input — ideal for applications in quantum physics and geometric optimization.
Installation
pip install complex_jacobian
Motivation
PyTorch's autograd system is designed for real-valued functions. However, many applications in science and engineering require differentiation of complex-valued functions, particularly over complex matrices or unitary groups. This package bridges that gap by:
- Representing complex tensors as real + imaginary parts.
- Computing real-valued Jacobians using PyTorch.
- Reconstructing complex derivatives, including Wirtinger derivatives ∂f/∂z and ∂f/∂𝑧̄.
Core Functions
-
complex_jacobian(func, z): Computes the Jacobian of a complex-valued function func evaluated at complex input z, and returns Wirtinger derivatives:- ∂f/∂z (holomorphic part)
- ∂f/∂𝑧̄ (antiholomorphic part)
-
unitary_input_jacobian(func, z): Computes the Jacobian of func(z) under the constraint that z is unitary.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file complex_jacobian-0.1.0.tar.gz.
File metadata
- Download URL: complex_jacobian-0.1.0.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fdd4e6e32ad1230ba0a202844b9d0a4a772d7b82c1e701580b614a51fe65ded9
|
|
| MD5 |
27d73ef4832c7ab40af830e07e22ad40
|
|
| BLAKE2b-256 |
87e6e619bc472778bd770f391dee0fdee01d31640f12931a872cb7a70211fc1f
|
File details
Details for the file complex_jacobian-0.1.0-py3-none-any.whl.
File metadata
- Download URL: complex_jacobian-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac32f8a76847a38d629df0f7ce7aa7fde04efff2440842bcc8225610ed265074
|
|
| MD5 |
c077ca590f769ef939a29f87bd1f9b3d
|
|
| BLAKE2b-256 |
9860c283c56eb0eb691d3e6a1aa1a0e901844adce3437918b9aa823bab67b347
|