Operation registry and catalog for quantum backends.
This namespace provides a comprehensive catalog of operations, quantum gates and measurements, that can be supported by different quantum backends. Backends can reference this registry to declare their supported operation sets.
Operation registry and catalog for quantum backends. This namespace provides a comprehensive catalog of operations, quantum gates and measurements, that can be supported by different quantum backends. Backends can reference this registry to declare their supported operation sets.
Basic gate set with common single and two-qubit gates.
Basic gate set with common single and two-qubit gates.
(expand-gate-set gate-set)
Expand a gate set to include all decomposition dependencies.
This function takes a set of gates and recursively adds all gates that are needed to implement them through decomposition.
Parameters:
Returns: Expanded set including all dependencies
Expand a gate set to include all decomposition dependencies. This function takes a set of gates and recursively adds all gates that are needed to implement them through decomposition. Parameters: - gate-set: Set of gate keywords Returns: Expanded set including all dependencies
Map of gate aliases to their canonical names.
This allows backends and users to reference gates by common alternative names. All aliases resolve to the canonical gate name used in the gate catalog.
Map of gate aliases to their canonical names. This allows backends and users to reference gates by common alternative names. All aliases resolve to the canonical gate name used in the gate catalog.
(get-gate-dependencies gate-name)
Get the decomposition dependencies for a gate.
Parameters:
Returns: Vector of gate names this gate decomposes into, or empty if native
Get the decomposition dependencies for a gate. Parameters: - gate-name: Keyword identifying the gate Returns: Vector of gate names this gate decomposes into, or empty if native
(get-gate-info gate-name)
Get detailed information about a specific gate.
Parameters:
Returns: Gate definition map or nil if not found
Get detailed information about a specific gate. Parameters: - gate-name: Keyword identifying the gate (aliases supported) Returns: Gate definition map or nil if not found
(get-gate-info-with-alias gate-name)
Get gate information, resolving aliases first.
Parameters:
Returns: Gate definition map or nil if not found
Example: (get-gate-info-with-alias :not) ;=> Returns X gate info (get-gate-info-with-alias :phase-flip) ;=> Returns Z gate info
Get gate information, resolving aliases first. Parameters: - gate-name: Keyword identifying the gate (may be an alias) Returns: Gate definition map or nil if not found Example: (get-gate-info-with-alias :not) ;=> Returns X gate info (get-gate-info-with-alias :phase-flip) ;=> Returns Z gate info
(get-gates-by-type gate-type)
Get all gates of a specific type.
Parameters:
Returns: Set of gate names
Get all gates of a specific type. Parameters: - gate-type: One of :single-qubit, :two-qubit, :multi-qubit, :parametric Returns: Set of gate names
(get-native-gates)
Get all gates marked as native (hardware-implementable).
Returns: Set of gate names that are typically native to hardware
Get all gates marked as native (hardware-implementable). Returns: Set of gate names that are typically native to hardware
(minimal-native-set gate-set)
Find the minimal set of native gates needed to implement a gate set.
Parameters:
Returns: Minimal set of native gates needed
Find the minimal set of native gates needed to implement a gate set. Parameters: - gate-set: Set of gate keywords Returns: Minimal set of native gates needed
Gates typically supported natively by quantum simulators.
Gates typically supported natively by quantum simulators.
(normalize-gate-set gate-set)
Normalize a gate set by resolving all aliases to canonical names.
Parameters:
Returns: Set with all aliases resolved to canonical names
Example: (normalize-gate-set #{:not :phase-flip :h}) ;=> #{:x :z :h}
Normalize a gate set by resolving all aliases to canonical names. Parameters: - gate-set: Set of gate keywords (may include aliases) Returns: Set with all aliases resolved to canonical names Example: (normalize-gate-set #{:not :phase-flip :h}) ;=> #{:x :z :h}
Complete catalog of operations with their properties. Operations can be gates or measurements, with various types and parameters.
Complete catalog of operations with their properties. Operations can be gates or measurements, with various types and parameters.
Gate set with parametric rotations.
Gate set with parametric rotations.
(resolve-gate-alias gate-name)
Resolve a gate name through any aliases.
Parameters:
Returns: Canonical gate name
Example: (resolve-gate-alias :not) ;=> :x (resolve-gate-alias :phase-flip) ;=> :z (resolve-gate-alias :h) ;=> :h (no alias)
Resolve a gate name through any aliases. Parameters: - gate-name: Keyword that might be an alias Returns: Canonical gate name Example: (resolve-gate-alias :not) ;=> :x (resolve-gate-alias :phase-flip) ;=> :z (resolve-gate-alias :h) ;=> :h (no alias)
Typical gate set for superconducting quantum processors.
Typical gate set for superconducting quantum processors.
Typical gate set for trapped ion quantum processors.
Typical gate set for trapped ion quantum processors.
Universal gate set sufficient for any quantum computation.
Universal gate set sufficient for any quantum computation.
(validate-gate-set gate-set)
Validate a gate set, resolving aliases first.
Parameters:
Returns: True if all gates are known (after alias resolution)
Example: (validate-gate-set #{:not :phase-flip :h}) ;=> true
Validate a gate set, resolving aliases first. Parameters: - gate-set: Set of gate keywords (may include aliases) Returns: True if all gates are known (after alias resolution) Example: (validate-gate-set #{:not :phase-flip :h}) ;=> true
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close