gradient-check

Diagnose gradient flow issues in hybrid quantum-classical training paths.

Updated Jun 17, 2025
One-click install
npx skills add https://github.com/necatiincekara/Quanvolutional-Neural-Network --skill gradient-check
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gradient-check
Source: https://github.com/necatiincekara/Quanvolutional-Neural-Network/tree/main/.agents/skills/gradient-check
Command: npx skills add https://github.com/necatiincekara/Quanvolutional-Neural-Network --skill gradient-check

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Diagnoses vanishing or exploding gradients in the hybrid quantum-classical training path, enabling targeted stabilization to prevent stalls or collapses during optimization.

Core Features & Use Cases

  • Gradient diagnostics: traces gradient flow from loss through classical and quantum parameters, flags zero or unstable gradients, and identifies AMP boundary issues.
  • Scenario coverage: applicable to V6 collapse, trainable quantum instability, and AMP-related failures across training runs.
  • Use Case: when a training run stalls due to low gradient magnitudes, run this skill to surface bottlenecks and actionable fixes.

Quick Start

Run a diagnostic pass to compare gradient magnitudes between quantum and classical components and report stabilization actions.

Frequently Asked Questions about gradient-check

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix vanishing or exploding gradients in a hybrid quantum-classical training path?

This skill diagnoses vanishing or exploding gradients in a hybrid quantum-classical training path by tracing gradient flow from loss through parameters, comparing magnitudes, and proposing fixes like residual connections or gradient scaling.

What causes AMP boundary instability during quantum model training?

AMP boundary instability during quantum model training is caused by gradient flow disruptions at the mixed precision boundary. Diagnostics map these paths and propose gradient scaling adjustments to stabilize the training run.

How do I diagnose V6 collapse in trainable quantum models?

Diagnose V6 collapse in trainable quantum models by checking scripts like model.py and enhanced_training.py to map gradient paths, flag unstable gradients, and surface actionable fixes to prevent optimization stalls.

Can I compare quantum and classical gradient magnitudes to prevent training stalls?

Yes, you can compare quantum and classical gradient magnitudes to prevent training stalls. Running a diagnostic pass surfaces bottlenecks in gradient flow and reports concrete stabilization actions like initialization changes.

What are the limitations of using residual connections for gradient stabilization in hybrid quantum training?

Residual connections for gradient stabilization in hybrid quantum training are limited by underlying architectural constraints in scripts like trainable_quantum_model.py. They cannot fix fundamental V6 collapse if initialization or scaling is also misconfigured.