Liking cljdoc? Tell your friends :D

org.soulspace.qclojure.domain.gate-decomposition


decompose-operationclj

(decompose-operation operation supported-operations)

Decompose an operation into a sequence of more primitive operations using the operation catalog.

Parameters:

  • operation: operation map to decompose
  • supported-operations: Set of operation types supported or keyword for hardware target

Returns: Vector of operation maps representing the decomposition, or the original operation if no decomposition is available or if it cannot be fully decomposed to supported operations

Decompose an operation into a sequence of more primitive operations using the operation catalog.

Parameters:
- operation: operation map to decompose
- supported-operations: Set of operation types supported or keyword for hardware target

Returns:
Vector of operation maps representing the decomposition, or the original operation 
if no decomposition is available or if it cannot be fully decomposed to supported operations
sourceraw docstring

decompose-swap-if-neededclj

(decompose-swap-if-needed swap-op supported-operations)

Decompose a SWAP gate if it's not natively supported.

Parameters:

  • swap-op: SWAP operation map to decompose
  • supported-operations: Set of operation types supported by the backend

Returns: Vector of operation maps representing the decomposition, or the original SWAP operation if supported

Decompose a SWAP gate if it's not natively supported.

Parameters:
- swap-op: SWAP operation map to decompose
- supported-operations: Set of operation types supported by the backend

Returns:
Vector of operation maps representing the decomposition, or the original SWAP operation if supported
sourceraw docstring

resolve-supported-operationsclj

(resolve-supported-operations supported-operations)

Resolve supported operations - converts keyword targets to gate sets or returns the set as-is.

Parameters:

  • supported-operations: Either a keyword (hardware target) or a set of operation types

Returns: Set of supported operation types

Resolve supported operations - converts keyword targets to gate sets or returns the set as-is.

Parameters:
- supported-operations: Either a keyword (hardware target) or a set of operation types

Returns:
Set of supported operation types
sourceraw docstring

transform-operationsclj

(transform-operations operations supported-operations max-iterations)

Transform the operations in a circuit to use only supported operations.

Parameters:

  • operations: Original vector of operation maps
  • supported-operations: Set of operation types supported or keyword for hardware target
  • max-iterations: Maximum decomposition iterations to prevent infinite loops

Returns: A vector of transformed operations that are all supported or operations that couldn't be further decomposed

Transform the operations in a circuit to use only supported operations.

Parameters:
- operations: Original vector of operation maps
- supported-operations: Set of operation types supported or keyword for hardware target
- max-iterations: Maximum decomposition iterations to prevent infinite loops

Returns:
A vector of transformed operations that are all supported or
operations that couldn't be further decomposed
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close