Expand description
Quantum state encoders (TorchQuantum-compatible)
This module provides encoding schemes for classical data into quantum states:
- GeneralEncoder: Configurable encoder with custom gate sequences
- PhaseEncoder: Phase encoding using RZ gates
- StateEncoder: Direct state vector encoding
- AmplitudeEncoder: Amplitude encoding
Structs§
- Encoding
Op - Encoding operation specification
- TQAngle
Encoder - Angle encoder - encodes data as angles in rotation gates More flexible than PhaseEncoder with configurable scaling
- TQGeneral
Encoder - General encoder with configurable gate sequence
- TQIQP
Encoder - IQP (Instantaneous Quantum Polynomial) encoder Encodes data using IQP-style circuit with entangling ZZ interactions
- TQMagnitude
Encoder - Magnitude encoder - encodes data in the magnitude of amplitudes Each classical value is mapped to the magnitude of a computational basis state
- TQMulti
Phase Encoder - Multi-phase encoder - applies multiple rotation gates to each qubit Each feature is encoded with a sequence of gates (e.g., RX, RY, RZ)
- TQPhase
Encoder - Phase encoder (applies same rotation type to all qubits)
- TQState
Encoder - Amplitude/State encoder (direct state preparation)
Traits§
- TQEncoder
- Base encoder trait
Type Aliases§
- TQAmplitude
Encoder - Alias for amplitude encoding