simon

Run Simon's algorithm on quantum circuits to recover hidden bitstrings.

30|2|Updated Apr 16, 2026
One-click install
npx skills add https://github.com/unitarylab/quantum-skills --skill simon
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: simon
Source: https://github.com/unitarylab/quantum-skills/tree/main/algorithms/cryptography/simon
Command: npx skills add https://github.com/unitarylab/quantum-skills --skill simon

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Simon's algorithm finds the hidden bitstring s in a function f with the promise f(x) = f(x ⊕ s). It enables demonstration of quantum speedups and the hidden-subgroup structure behind Shor's algorithm in an educational setting.

Core Features & Use Cases

  • Builds and runs the Simon oracle U_f for a given hidden string s, performs the mid-circuit measurement of the output register, and completes the interference step to reveal linear equations over GF(2).
  • Provides end-to-end tooling for learning, prototyping, and validating small-n quantum circuits that exhibit the Simon problem, including classical post-processing to recover s.
  • Returns runtime results such as the recovered s, status, and a circuit diagram path to aid analysis and visualization.

Quick Start

Run the included Simon Algorithm example to recover the hidden string s.

Frequently Asked Questions about simon

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

FAQPage Schema
How do I find the hidden bitstring in Simon's problem using a quantum circuit?

Simon's algorithm finds the hidden bitstring s by querying a quantum oracle U_f, performing mid-circuit measurement, and applying F2 linear-algebra post-processing to reveal linear equations over GF(2).

What is mid-circuit measurement and why is it needed for Simon's algorithm?

Mid-circuit measurement measures the output register during the quantum circuit execution to complete the interference step. This reveals linear equations over GF(2) needed to recover the hidden bitstring s in Simon's algorithm.

Do I need a specific quantum backend to run Simon's algorithm for small n circuits?

Running Simon's algorithm requires a Torch backend that supports mid-circuit measurement to execute the oracle and interference steps for small n quantum circuits in Python.

How does Simon's algorithm relate to Shor's algorithm and the hidden-subgroup problem?

Simon's algorithm demonstrates the hidden-subgroup structure underlying Shor's algorithm, enabling educational prototyping of small-n quantum circuits to exhibit quantum speedups for finding a hidden bitstring s.

What classical post-processing is required after running a Simon's algorithm quantum circuit?

After running the quantum circuit, you apply F2 linear-algebra post-processing using Gaussian elimination to solve linear equations over GF(2) and recover the hidden bitstring s from measurement results.