CPINN is a Julia framework for solving differential equations that are naturally defined in the complex domain, such as quantum open systems governed by the Lindblad master equation. Unlike standard PINNs that split real and imaginary parts, CPINN operates entirely in the complex domain -- all network parameters, activation functions, and forward/backward passes are complex-valued.
- Fully complex-valued neural network architecture (weights, biases, activations)
- Physics-informed training via ODE residual minimization
- Cholesky-based density matrix parameterization guaranteeing Hermiticity, positive semi-definiteness, and unit trace
- Hard initial-condition enforcement through trial solution construction
- Hybrid loss combining collocation-based residuals and coarse reference matching
- Built on the Lux.jl ecosystem with Zygote-compatible automatic differentiation
- Compatible with NeuralPDE.jl for the NNODE solver
Clone the repository and install dependencies:
git clone https://github.com/QuBioSimulations/cpinn.git
cd cpinn
julia --project=. -e 'using Pkg; Pkg.instantiate()'The repository includes two example scripts that solve the Lindblad master equation for a three-level Lambda-type quantum system driven by Gaussian laser pulses.
Standalone CPINN solver:
julia --project=. examples/CPINN_Lambda_standalone.jlNeuralPDE-based solver (uses NeuralPDE.jl):
julia --project=. examples/CPINN_Lambda_NeuralPDE.jlcpinn/
├── examples/
│ ├── CPINN_Lambda_standalone.jl # Standalone CPINN solver for Lambda system
│ └── CPINN_Lambda_NeuralPDE.jl # NeuralPDE-based solver for Lambda system
├── Project.toml
├── CITATION.cff
├── LICENSE
└── README.md
Key Julia packages required:
- NeuralPDE.jl -- physics-informed neural network solvers
- Lux.jl -- neural network framework
- OrdinaryDiffEq.jl -- ODE solvers
- Optimization.jl -- optimization interface
- Zygote.jl -- automatic differentiation
- ComponentArrays.jl -- structured parameter arrays
- ForwardDiff.jl -- forward-mode AD
- Plots.jl -- visualization
See Project.toml for the complete list.
If you use this software in your research, please cite it using the metadata in CITATION.cff.
A Zenodo DOI will be available after the first release.
This project is licensed under the MIT License. See LICENSE for details.
Roman Sahakyan ORCID: 0009-0001-3100-2581