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.
Native gates for IonQ devices on Amazon Braket
Native gates for IonQ devices on Amazon Braket
Native gates for Rigetti devices on Amazon Braket
Native gates for Rigetti devices on Amazon Braket
Gates supported by Braket simulators
Gates supported by Braket simulators
(decompose-circuit-for-hardware circuit target-gates)
Decompose a quantum circuit for specific hardware.
Parameters:
Returns: Decomposed circuit or throws if decomposition impossible
Decompose a quantum circuit for specific hardware. Parameters: - circuit: Vector of [gate-name & params] operations - target-gates: Set of native gates for target hardware or keyword Returns: Decomposed circuit or throws if decomposition impossible
(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-decomposition-for-target gate-name target-set & [params])
Get decomposition for a specific target gate set.
Parameters:
Returns: Vector of decomposed gates or nil if not possible
Get decomposition for a specific target gate set. Parameters: - gate-name: Gate to decompose - target-set: Target hardware gate set keyword or set of gates - params: Optional parameters for parametric gates Returns: Vector of decomposed gates or nil if not possible
(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-for-hardware hardware-key)
Get native gates for a specific hardware platform.
Parameters:
Returns: Set of gate names native to that hardware, or nil if unknown
Example: (get-native-gates-for-hardware :braket-ionq) ;=> #{:rx :ry :rz :cnot}
Get native gates for a specific hardware platform. Parameters: - hardware-key: Keyword identifying the hardware platform Returns: Set of gate names native to that hardware, or nil if unknown Example: (get-native-gates-for-hardware :braket-ionq) ;=> #{:rx :ry :rz :cnot}
(minimal-native-set-for-hardware gate-set hardware-key)
Find the minimal set of native gates needed to implement a gate set on specific hardware.
Parameters:
Returns: Minimal set of native gates needed for that hardware, or empty set if hardware unknown
Example: (minimal-native-set-for-hardware #{:x :y :z} :braket-ionq) ;=> #{:rx :ry :rz}
Find the minimal set of native gates needed to implement a gate set on specific hardware. Parameters: - gate-set: Set of gate keywords - hardware-key: Keyword identifying the target hardware platform Returns: Minimal set of native gates needed for that hardware, or empty set if hardware unknown Example: (minimal-native-set-for-hardware #{:x :y :z} :braket-ionq) ;=> #{:rx :ry :rz}
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