hadamard-transform

Apply Hadamard transforms to n qubits and output state vectors, probabilities, and SVG circuit diagrams.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires unitarylab, and includes scripts (resource) components.

What problem does it solve?

Generate uniform superposition states by applying the Hadamard transform to n qubits, enabling exploration and verification of quantum state transformations.

Core Features & Use Cases

  • Uniform superposition generation: Apply H^⊗n to |0⟩^n to produce an equal superposition over all 2^n basis states.
  • Self-inverse verification: Validate that H^⊗n is its own inverse by applying it twice and comparing to the original state.
  • Educational demonstrations: Use simple simulations to compare state vectors, probabilities, and circuit diagrams across runtimes.

Quick Start

Run the Hadamard transform on n qubits using the provided algorithm to generate a uniform superposition.

Frequently Asked Questions about hadamard-transform

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

FAQPage Schema
How do I create a uniform superposition over all basis states using a Hadamard transform on n qubits?

To create a uniform superposition, you apply the Hadamard transform H^⊗n to the |0⟩^n state, producing an equal superposition over all 2^n basis states. The Skill outputs the resulting state vectors, probabilities, and an SVG circuit diagram.

How does applying a Hadamard gate twice verify its self-inverse property on a quantum statevector?

Applying a Hadamard gate twice verifies its self-inverse property by returning the transformed quantum statevector back to its original state. The reflexive_test mode compares the doubly-transformed state to confirm it matches the initial input.

Can I use this Hadamard transform simulation with Qiskit and PennyLane backends?

Yes, the Hadamard transform simulation supports educational demonstrations and circuit exploration across Qiskit and PennyLane. It requires a deterministic run path and a statevector backend to output accurate state vectors and probabilities.

What is the Hadamard transform used for in quantum computing circuit exploration?

The Hadamard transform is used to generate uniform superposition states, enabling exploration and verification of quantum state transformations. It provides state vectors, probabilities, and SVG circuit diagrams to visualize these transformations.

Do I need a statevector backend to run Hadamard transform simulations and output probabilities?

Yes, you need a statevector backend to run Hadamard transform simulations. A deterministic run path is required to accurately calculate and output the state vectors and corresponding probabilities for the generated superposition.