Circuit transformation utilities for quantum backends.
This namespace provides functionality for adapting quantum circuits to specific hardware backends by transforming operations not supported by the backend into equivalent sequences of supported operations.
Circuit transformation utilities for quantum backends. This namespace provides functionality for adapting quantum circuits to specific hardware backends by transforming operations not supported by the backend into equivalent sequences of supported operations.
(transform-circuit circuit supported-operations)
(transform-circuit circuit supported-operations options)
Transform a quantum circuit to use only operations supported by a given backend.
This function takes a quantum circuit and the supported operations, and returns a new circuit where all operations have been decomposed into the supported operations.
Parameters:
Returns: A map containing:
Example: (transform-circuit my-circuit #{:h :x :cnot} {:max-iterations 50}) ;=> {:quantum-circuit <transformed-circuit>, :transformed-operation-count 3, :unsupported-operations []}
Transform a quantum circuit to use only operations supported by a given backend. This function takes a quantum circuit and the supported operations, and returns a new circuit where all operations have been decomposed into the supported operations. Parameters: - circuit: Quantum circuit to transform - supported-operations: Set of operation types supported - options: Optional map with transformation options: :max-iterations - Maximum number of decomposition iterations (default: 100) :transform-unsupported? - Whether to transform unsupported operations (default: true) Returns: A map containing: - :quantum-circuit - The transformed circuit - :transformed-operation-count - Count of operations that were transformed - :unsupported-operations - List of operation types that couldn't be transformed Example: (transform-circuit my-circuit #{:h :x :cnot} {:max-iterations 50}) ;=> {:quantum-circuit <transformed-circuit>, :transformed-operation-count 3, :unsupported-operations []}
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close