Quantum Circuit Simulator for Openclaw

A high-performance, Python-based quantum statevector simulator for exploring quantum algorithms and gate operations directly within your AI agent environment.

michaelzhangty
v1.0.0
Mar 10, 2026
0
939
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install quantum-sim

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install quantum-sim using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Quantum Circuit Simulator?

The Quantum Circuit Simulator is a robust tool designed for Openclaw Skills that enables developers to model quantum logic without external dependencies like Qiskit. By utilizing a pure Python 3 statevector engine, it provides a lightweight yet powerful environment for simulating up to 20 qubits, offering detailed insights into complex amplitudes and measurement probabilities. This skill bridges the gap between theoretical quantum mechanics and practical experimentation within the Openclaw Skills ecosystem.

This simulator is particularly useful for developers who need to demonstrate quantum concepts or test algorithms without the overhead of heavy quantum frameworks. It supports a wide array of single and two-qubit gates and provides both human-readable ASCII visualizations and machine-readable JSON data, making it a versatile addition to any collection of Openclaw Skills.

Quantum Circuit Simulator Use Cases

  • Visualizing quantum entanglement through Bell and GHZ state presets.
  • Testing custom quantum algorithms using a flexible, line-based QASM-like syntax.
  • Teaching or learning quantum computing fundamentals like the Quantum Fourier Transform (QFT).
  • Demonstrating the power of Grover search and quantum teleportation protocols.
  • Integrating quantum probability data into larger data science workflows via JSON output.

How Quantum Circuit Simulator Works

  1. The skill initializes a statevector representing the starting state of the specified number of qubits, supporting up to 2^20 dimensions.
  2. It parses the QASM-like instructions or selected preset to determine the precise sequence of quantum gates to apply.
  3. Mathematical transformations are performed using either standard Python libraries or optimized Numpy matrix operations if available.
  4. The engine calculates the final complex amplitudes and measurement probabilities for each basis state based on the applied gates.
  5. Results are rendered as a visual ASCII histogram for immediate inspection or a machine-readable JSON object for downstream processing.

Quantum Circuit Simulator Setup

The Quantum Circuit Simulator is designed to run in environments with Python 3. Follow these steps to get started with this component of your Openclaw Skills:

# List all available presets and descriptions
python3 scripts/quantum_sim.py --list-presets

# Run a 5-qubit GHZ state simulation
python3 scripts/quantum_sim.py --preset ghz --qubits 5

# Execute a custom quantum circuit using inline QASM
python3 scripts/quantum_sim.py --qasm "qubits 3; h 0; cx 0 1; cx 0 2"

Quantum Circuit Simulator Data Schema & Taxonomy

The skill organizes its output into structured data blocks, which is essential for developers using Openclaw Skills for data analysis:

Key Description
label The name of the preset or circuit executed.
n_qubits The total number of qubits simulated.
statevector Complex amplitudes (real and imaginary) for all basis states.
probabilities The probability distribution across all possible states.
counts Simulated measurement shots for each state.
gates A list of the gates applied during the simulation.

Quantum Circuit Simulator Advanced Features

  • Dynamic qubit scaling allowing for simulations of up to 20 qubits with a minimal 16MB memory footprint.
  • JSON output mode for seamless integration with other Openclaw Skills and automated data pipelines.
  • Support for precision rotation gates including Rx, Ry, Rz, and Phase (P) gates using radian values.
  • Automatic performance optimization that detects and utilizes Numpy for faster matrix operations on larger qubit counts.
  • Comprehensive teleportation protocol simulation that models a full 3-qubit unitary workflow.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*