Expand description
Pattern matching for quantum expressions.
This module provides utilities for recognizing and extracting common patterns in quantum computing expressions.
Enums§
- Pattern
- A pattern that can match against expressions.
- Quantum
Gate Pattern - Recognize common quantum gate patterns
- Variational
Pattern - Recognize variational quantum circuit parameter patterns
Functions§
- is_
hermitian_ form - Check if an expression represents a Hermitian operator (A = A†)
- is_
projector_ form - Check if an expression is a projector (P² = P)
- is_
pure_ imaginary - Check if an expression is a pure imaginary number (i * real)
- is_
qaoa_ parameter - Check if expression matches a QAOA parameter
- is_
rotation_ gate - Check if an expression is a rotation gate form: exp(-i * θ * G / 2) Returns the angle and generator if matched
- is_
unit_ complex_ form - Check if an expression is a unit complex number (|z| = 1)
- is_
vqe_ parameter - Check if expression matches a VQE parameter pattern
- match_
pattern - Match a pattern against an expression
- recognize_
gate_ pattern - Try to recognize a quantum gate from its matrix expression
Type Aliases§
- Captures
- Result of pattern matching - captured expressions