搜索

PythonReactSEOPDF
OpenClaw

optical-quantum-kernel

Simulates a quantum kernel using optical fiber storage and linear optics.

aadipapp0 来源安装数☆ 0 仓库 Starsv0.1.0

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

SkillHub CLI

skillhub install aadipapp/optical-quantum-skill

打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。

将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。

查看来源 ↗使用指南

技能说明

Optical Quantum Kernel Skill

This skill simulates a photonic quantum computer that uses optical fibers for storage and linear optics for computation. It calculates the quantum kernel (similarity) between two data vectors by encoding them into optical phases, passing them through simulated fibers (with loss), and interfering them.

Security Features

  • Resource Bounding: Capped at 8 modes to prevent resource exhaustion.
  • Input Validation: Strict checks on input vector dimensions and limits.
  • Physics-Based Constraints: Includes attenuation and phase noise for realism.

Commands

  • simulate: Run the quantum kernel simulation on two input vectors.

来源信息

Source
github
Repository
openclaw/skills
Path
skills/aadipapp/optical-quantum-skill
Version
0.1.0
Commit
6bbd0201011bb79d226d65d67722cb5123d04354
分类来源
rules
状态
active
可见性
public

这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。

README

Optical Quantum Kernel Simulation

This skill simulates a "Quantum Kernel Trick" using a physics-based model of an optical quantum computer.

The Physics Model

  1. Optical Fiber Storage: The quantum state (photons) travels through optical fibers.
    • Loop: Storage is simulated as a fiber loop.
    • Loss: Attenuation ($0.2 dB/km$) reduces the signal amplitude.
    • Noise: Random phase drift simulates thermal fluctuations in the fiber.
  2. Linear Optics:
    • Encoding: Data is mapped to the phase of optical modes.
    • Computation: A 50:50 Beam Splitter interferes the modes.
  3. Measurement: Photodetectors measure the intensity at the output ports to estimate the kernel (similarity).

Security Features

  • Bounded Resources: The simulation acts as a "Sandbox", strictly creating only up to 8 optical modes/qubits. This prevents Denial of Service (DoS) via memory exhaustion.
  • Input Sanitization: Verifies that inputs are valid numerical vectors before processing.

Usage

Calculate the kernel (similarity) between two vectors:

python3 scripts/optical_kernel.py "0.5,1.2" "0.5,1.2"
# Expected: High kernel value (~1.0)

Orthogonal/Different vectors:

python3 scripts/optical_kernel.py "0.1,0.2" "0.9,0.8"
# Expected: Lower kernel value

Publishing to ClawHub

To publish this skill:

clawhub publish

来源内容

SKILL.md
# Optical Quantum Kernel Skill

This skill simulates a photonic quantum computer that uses optical fibers for storage and linear optics for computation.
It calculates the quantum kernel (similarity) between two data vectors by encoding them into optical phases, passing them through simulated fibers (with loss), and interfering them.

## Security Features
- **Resource Bounding**: Capped at 8 modes to prevent resource exhaustion.
- **Input Validation**: Strict checks on input vector dimensions and limits.
- **Physics-Based Constraints**: Includes attenuation and phase noise for realism.

## Commands

- `simulate`: Run the quantum kernel simulation on two input vectors.
README
# Optical Quantum Kernel Simulation

This skill simulates a "Quantum Kernel Trick" using a physics-based model of an optical quantum computer.

## The Physics Model
1.  **Optical Fiber Storage**: The quantum state (photons) travels through optical fibers.
    -   **Loop**: Storage is simulated as a fiber loop.
    -   **Loss**: Attenuation ($0.2 dB/km$) reduces the signal amplitude.
    -   **Noise**: Random phase drift simulates thermal fluctuations in the fiber.
2.  **Linear Optics**: 
    -   **Encoding**: Data is mapped to the phase of optical modes.
    -   **Computation**: A 50:50 Beam Splitter interferes the modes.
3.  **Measurement**: Photodetectors measure the intensity at the output ports to estimate the kernel (similarity).

## Security Features
- **Bounded Resources**: The simulation acts as a "Sandbox", strictly creating only up to 8 optical modes/qubits. This prevents Denial of Service (DoS) via memory exhaustion.
- **Input Sanitization**: Verifies that inputs are valid numerical vectors before processing.

## Usage

Calculate the kernel (similarity) between two vectors:

```bash
python3 scripts/optical_kernel.py "0.5,1.2" "0.5,1.2"
# Expected: High kernel value (~1.0)
```

Orthogonal/Different vectors:
```bash
python3 scripts/optical_kernel.py "0.1,0.2" "0.9,0.8"
# Expected: Lower kernel value
```

## Publishing to ClawHub

To publish this skill:
```bash
clawhub publish
```

相关技能

OpenClaw

ad-compliance-reviewer

danyangliu-sandwichlab

Review ads and campaign setup for policy compliance on Meta (Facebook/Instagram), Google Ads, TikTok Ads, YouTube Ads, Amazon Ads, and DSP/programmatic.

OpenClaw

afrexai-seo-content-engine

1kalin

Complete SEO content creation system for AI agents. Research keywords, analyze competitors, write optimized articles, and track rankings — all through natural conversation. No APIs required.