Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

complex_jacobian-0.1.0.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

complex_jacobian-0.1.0-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

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

Hashes for complex_jacobian-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fdd4e6e32ad1230ba0a202844b9d0a4a772d7b82c1e701580b614a51fe65ded9
MD5 27d73ef4832c7ab40af830e07e22ad40
BLAKE2b-256 87e6e619bc472778bd770f391dee0fdee01d31640f12931a872cb7a70211fc1f

See more details on using hashes here.

File details

Details for the file complex_jacobian-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for complex_jacobian-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ac32f8a76847a38d629df0f7ce7aa7fde04efff2440842bcc8225610ed265074
MD5 c077ca590f769ef939a29f87bd1f9b3d
BLAKE2b-256 9860c283c56eb0eb691d3e6a1aa1a0e901844adce3437918b9aa823bab67b347

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page