Skip to content

Quantum Geometric Machine Learning framework with dual JAX/PyTorch backends for quantum-enhanced data analysis, topological feature extraction, and manifold learning

Notifications You must be signed in to change notification settings

jasonlarkin/qgml

Repository files navigation

QGML: Quantum Geometric Machine Learning

Python 3.9+ License: MIT JAX PyTorch

Quantum Geometric Machine Learning (QGML) is a comprehensive framework that combines quantum geometric structures with machine learning. Features dual JAX and PyTorch backends for optimal performance across different computational environments.

Key Features

Quantum Geometric Analysis

  • Berry curvature computation and topological invariants
  • Quantum metric tensor and geometric loss functions
  • Quantum phase transition detection

Dual Backend Support

  • JAX Backend: XLA compilation, automatic differentiation, TPU support
  • PyTorch Backend: Dynamic graphs, extensive ecosystem, GPU optimization
  • Seamless switching: Change backends with single function call

Specialized Applications

  • Genomics analysis with chromosomal instability detection
  • High-dimensional manifold learning
  • Quantum computing algorithm implementation

Production Ready

  • Comprehensive testing across both backends
  • Extensive documentation and examples
  • Performance benchmarks and optimization guides

Quick Start

Basic Usage

import qgml

# Set computational backend
qgml.set_backend("pytorch") # or "jax"

# Create quantum geometric trainer
trainer = qgml.geometry.QuantumGeometryTrainer(
    hilbert_dim=8,
    feature_dim=4,
    backend="auto" # Uses current backend
)

# Analyze quantum geometric properties
analysis = trainer.analyze_complete_quantum_geometry(
    data_points,
    compute_berry_curvature=True,
    compute_chern_numbers=True
)

Backend Comparison

import qgml

# Compare performance across backends
results = qgml.utils.compare_backends(
    data=my_dataset,
    models=["supervised", "geometric"],
    metrics=["speed", "memory", "accuracy"]
)

print(results.summary())

Backend Performance

Feature JAX Backend PyTorch Backend
Compilation XLA (fast) JIT (moderate)
Memory Efficient Standard
GPU/TPU Excellent GPU excellent, no TPU
Ecosystem Scientific ML/DL focused
Debugging Functional Imperative

Documentation

View Live Documentation

️ Installation

Basic Installation

pip install qgml

With specific backend

# PyTorch backend (default)
pip install qgml[pytorch]

# JAX backend
pip install qgml[jax]

# Both backends
pip install qgml[full]

Development

git clone https://github.com/jasonlarkin/qgml.git
cd qgml
pip install -e .[dev]

Research Applications

  • Genomics: Chromosomal instability analysis
  • Physics: Quantum phase transitions and topological states
  • Finance: High-dimensional manifold learning for risk analysis
  • Quantum Computing: Algorithm design and quantum advantage analysis

Contributing

We welcome contributions! Please see CONTRIBUTING.md.

Citation

@software{qgml2024,
  title={QGML: Quantum Geometric Machine Learning with Dual Backend Support},
  author={Jason Larkin},
  year={2024},
  url={https://github.com/jasonlarkin/qgml}
}

License

MIT License - see LICENSE for details.

About

Quantum Geometric Machine Learning framework with dual JAX/PyTorch backends for quantum-enhanced data analysis, topological feature extraction, and manifold learning

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages