optical-quantum-skill_skill

This skill simulates a photonic quantum kernel to measure similarity between vectors using optical phase encoding and realistic losses.
  • Python

2.6k

GitHub Stars

3

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill openclaw/skills --skill optical-quantum-skill

  • _meta.json301 B
  • README.md1.4 KB
  • SKILL.md847 B

Overview

This skill simulates an optical quantum kernel that encodes classical vectors into photonic phases, stores them in optical fiber modes, and computes kernel values via linear-optical interference. It emphasizes realism by modeling fiber loss, phase noise, and strict resource limits to keep simulations tractable. The implementation is Python-based and exposes a single simulate command to compute pairwise similarity between two vectors.

How this skill works

Inputs are validated for dimensionality and value ranges, then mapped into phase settings across up to 8 optical modes. The simulation applies attenuation and stochastic phase noise to each mode to mimic fiber storage, passes modes through a linear-optics interferometer, and computes a kernel (overlap) from the resulting interference pattern. Results include the kernel value and diagnostic parameters such as effective loss and noise metrics.

When to use it

  • Prototype quantum kernel methods for machine learning with photonic assumptions.
  • Study the impact of fiber loss and phase noise on kernel-based classifiers.
  • Compare classical kernel approximations to photonic implementations.
  • Teach or demonstrate how encoding and interference produce similarity measures.
  • Benchmark algorithmic robustness under constrained optical resources (≤8 modes).

Best practices

  • Normalize input vectors before encoding to ensure consistent phase mapping.
  • Keep mode count at or below 8 to respect the resource bounding and get reproducible results.
  • Run multiple trials to average out stochastic phase-noise effects for reliable estimates.
  • Inspect diagnostic outputs (loss, noise) when interpreting kernel differences.
  • Use moderate vector dimensionality matching the chosen number of modes to avoid truncation.

Example use cases

  • Compute a photonic quantum kernel between feature vectors for a small classification task.
  • Explore how increasing fiber attenuation degrades kernel separability for two classes.
  • Validate noise-robust feature encodings by comparing kernel stability across trials.
  • Integrate kernel outputs into a classical SVM pipeline to evaluate end-to-end performance.
  • Demonstrate resource-constrained quantum simulations in a workshop or lecture.

FAQ

Vectors must match the configured mode count (up to 8) and meet value range checks; the simulator enforces dimension and magnitude constraints.

Does the simulation model realistic fiber effects?

Yes — it includes attenuation and phase-noise models to approximate optical fiber storage and delivers diagnostics describing their impact.

Can I use more than 8 modes?

No — the skill enforces an 8-mode cap to prevent resource exhaustion and maintain consistent performance and reproducibility.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
optical-quantum-skill skill by openclaw/skills | VeilStrat