Skip to main content

Physics engine for QPhase: Stochastic Differential Equations in Phase Space

Project description

qphase-sde

SDE Solver for QPhase

qphase-sde is a numerical library for solving Stochastic Differential Equations (SDEs), primarily focused on quantum optics applications. It implements common integration schemes and supports multiple computation backends.

Features

  • Integrators:
    • Euler-Maruyama: Basic first-order strong approximation.
    • Milstein: Higher-order scheme for multiplicative noise.
    • SRK: Stochastic Runge-Kutta methods.
  • Backends:
    • NumPy: Standard implementation.
    • Numba: JIT-compiled for better CPU performance.
    • PyTorch/CuPy: Support for GPU acceleration.
  • Model Definition:
    • Define custom Hamiltonians and Dissipators via SDEModel.
    • Supports additive and multiplicative noise.

Installation

pip install qphase-sde

Usage

As a QPhase Plugin

When installed with qphase, you can define sde jobs in your configuration file:

jobs:
  - name: "my_simulation"
    type: "sde"
    config:
      t1: 100.0
      dt: 1e-3
      trajectories: 1000
      model: "models/my_model.py"

Standalone Usage

You can also use the library directly in your Python scripts:

from qphase_sde.engine import Engine, EngineConfig
from qphase_sde.model import SDEModel

# Define model and config
config = EngineConfig(dt=1e-3, t1=10.0)
engine = Engine(config)

# Run simulation
result = engine.run(my_model)

License

MIT License

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

qphase_sde-1.0.0.tar.gz (23.7 kB view details)

Uploaded Source

Built Distribution

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

qphase_sde-1.0.0-py3-none-any.whl (29.8 kB view details)

Uploaded Python 3

File details

Details for the file qphase_sde-1.0.0.tar.gz.

File metadata

  • Download URL: qphase_sde-1.0.0.tar.gz
  • Upload date:
  • Size: 23.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for qphase_sde-1.0.0.tar.gz
Algorithm Hash digest
SHA256 0be042b62e7bfdaffaac1adefc8c4ad8109c96abc6eaae2a0376d9de7bf4bbca
MD5 963556d0babecb390587dc35e863cfde
BLAKE2b-256 8370bcd34aca68fbd41e7569888e0e148d4dfc43a691465b538dc3d798d8c8c2

See more details on using hashes here.

File details

Details for the file qphase_sde-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: qphase_sde-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 29.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for qphase_sde-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 52408b22b95ca378c97af58ff3eb0239cd9572e3c1555271c00e3b41768787bc
MD5 95914f1811bd4b1a9f0165fc22d10888
BLAKE2b-256 bfdc36f1d4a73ac62802a015680cfe16b1a5a77b1d88c6e863f25b2983843b13

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