Local quantum simulator implementing the QuantumBackend protocol.
This adapter provides a local simulation of quantum circuits using the domain layer's quantum state and circuit functionality. It serves as both a reference implementation and a testing backend.
Local quantum simulator implementing the QuantumBackend protocol. This adapter provides a local simulation of quantum circuits using the domain layer's quantum state and circuit functionality. It serves as both a reference implementation and a testing backend.
Input/Output adapters for quantum computing library
Input/Output adapters for quantum computing library
No vars found in this namespace.
JSON I/O adapter for quantum circuits and data.
This module provides methods to export and import quantum circuits and data in JSON format, allowing for easy serialization and deserialization of quantum information.
JSON I/O adapter for quantum circuits and data. This module provides methods to export and import quantum circuits and data in JSON format, allowing for easy serialization and deserialization of quantum information.
No vars found in this namespace.
OpenQASM I/O adapter for quantum circuits.
This module provides methods to export quantum circuits to OpenQASM format, which is a standard quantum assembly language used by many quantum computing platforms.
OpenQASM I/O adapter for quantum circuits. This module provides methods to export quantum circuits to OpenQASM format, which is a standard quantum assembly language used by many quantum computing platforms.
No vars found in this namespace.
Core visualization API - unified interface to quantum visualization tools.
This namespace provides a single entry point for all quantum visualization functionality. It now supports both the new unified multimethod API and maintains backward compatibility with the original delegation-based API.
New Unified API:
Legacy API:
Core visualization API - unified interface to quantum visualization tools. This namespace provides a single entry point for all quantum visualization functionality. It now supports both the new unified multimethod API and maintains backward compatibility with the original delegation-based API. New Unified API: - visualize (format, data, options) - multimethod-based unified interface Legacy API: - ascii-*, svg-*, html-* functions - maintained for backward compatibility
ASCII-based visualization for quantum states and circuits.
This namespace provides text-based visualizations that can be displayed in terminals, REPLs, and simple text outputs. All functions return strings containing formatted ASCII art representations.
ASCII-based visualization for quantum states and circuits. This namespace provides text-based visualizations that can be displayed in terminals, REPLs, and simple text outputs. All functions return strings containing formatted ASCII art representations.
Common utilities for quantum visualization - shared calculations and data extraction.
This namespace contains shared functions used across different visualization formats. It focuses on pure data transformation and calculation, keeping format-specific rendering logic in the individual format namespaces.
Common utilities for quantum visualization - shared calculations and data extraction. This namespace contains shared functions used across different visualization formats. It focuses on pure data transformation and calculation, keeping format-specific rendering logic in the individual format namespaces.
Mathematical coordinate transformations for quantum visualization.
This namespace handles 3D to 2D projections for Bloch sphere visualization and other coordinate system transformations needed for quantum state graphics.
Mathematical coordinate transformations for quantum visualization. This namespace handles 3D to 2D projections for Bloch sphere visualization and other coordinate system transformations needed for quantum state graphics.
HTML page templates and styling for quantum visualizations
HTML page templates and styling for quantum visualizations
SVG-based visualization for quantum states and circuits.
This namespace provides scalable vector graphics (SVG) generation using Hiccup for high-quality quantum visualization that can be embedded in web pages or saved as standalone files.
SVG-based visualization for quantum states and circuits. This namespace provides scalable vector graphics (SVG) generation using Hiccup for high-quality quantum visualization that can be embedded in web pages or saved as standalone files.
No vars found in this namespace.
Bernstein-Vazirani Algorithm
The Bernstein-Vazirani algorithm is a quantum algorithm that efficiently determines a hidden bit string s using only one query to a quantum oracle. It is a foundational example of quantum speedup over classical algorithms, demonstrating how quantum circuits can solve specific problems more efficiently than their classical counterparts.
This implementation builds the quantum circuit for the Bernstein-Vazirani algorithm and executes it on a specified quantum backend.
The algorithm uses a quantum oracle Uf that computes f(x) = s·x (mod 2), where s is the hidden string and x is the input bit string.
The algorithm requires only one query to the oracle to determine the hidden string s, while classical algorithms would require n queries for an n-bit string.
Bernstein-Vazirani Algorithm The Bernstein-Vazirani algorithm is a quantum algorithm that efficiently determines a hidden bit string s using only one query to a quantum oracle. It is a foundational example of quantum speedup over classical algorithms, demonstrating how quantum circuits can solve specific problems more efficiently than their classical counterparts. This implementation builds the quantum circuit for the Bernstein-Vazirani algorithm and executes it on a specified quantum backend. The algorithm uses a quantum oracle Uf that computes f(x) = s·x (mod 2), where s is the hidden string and x is the input bit string. The algorithm requires only one query to the oracle to determine the hidden string s, while classical algorithms would require n queries for an n-bit string.
Deutsch Algorithm
The Deutsch algorithm is a quantum algorithm that determines whether a given function f: {0,1} → {0,1} is constant (f(0) = f(1)) or balanced (f(0) ≠ f(1)) using only one quantum query, compared to 2 classical queries needed.
This implementation builds the quantum circuit for the Deutsch algorithm and executes it on a specified quantum backend.
Deutsch Algorithm The Deutsch algorithm is a quantum algorithm that determines whether a given function f: {0,1} → {0,1} is constant (f(0) = f(1)) or balanced (f(0) ≠ f(1)) using only one quantum query, compared to 2 classical queries needed. This implementation builds the quantum circuit for the Deutsch algorithm and executes it on a specified quantum backend.
Grover's Search Algorithm
Grover's algorithm provides a quadratic speedup for searching unsorted databases. For N items, classical search requires O(N) queries, while Grover's requires O(√N). The number of Grover iterations is approximately π√N/4, where N is the size of the search space.
This implementation builds the quantum circuit for Grover's algorithm and executes it on a specified quantum backend.
The algorithm consists of:
The oracle function should take a computational basis state index and return true for target states.
The diffusion operator applies inversion about the average amplitude.
Grover's Search Algorithm Grover's algorithm provides a quadratic speedup for searching unsorted databases. For N items, classical search requires O(N) queries, while Grover's requires O(√N). The number of Grover iterations is approximately π√N/4, where N is the size of the search space. This implementation builds the quantum circuit for Grover's algorithm and executes it on a specified quantum backend. The algorithm consists of: 1. Initializing a uniform superposition state |+⟩^⊗n 2. Repeating Grover iterations: a. Apply the oracle Uf to mark target states b. Apply the diffusion operator (inversion about average) 3. Measuring the final state to find the target item with high probability The oracle function should take a computational basis state index and return true for target states. The diffusion operator applies inversion about the average amplitude.
Implementation of quantum modular arithmetic operations needed for Shor's algorithm.
This namespace provides functions to create quantum circuits that implement modular addition, multiplication, and exponentiation operations.
Implementation of quantum modular arithmetic operations needed for Shor's algorithm. This namespace provides functions to create quantum circuits that implement modular addition, multiplication, and exponentiation operations.
Contains the quantum algorithm for period finding, e.g. for Shor's algorithm. This algorithm uses quantum phase estimation to find the period of a modular exponentiation function.
Contains the quantum algorithm for period finding, e.g. for Shor's algorithm. This algorithm uses quantum phase estimation to find the period of a modular exponentiation function.
Quantum Phase Estimation (QPE) algorithm implementation.
The Quantum Phase Estimation algorithm is a fundamental quantum algorithm that estimates the eigenvalue of a unitary operator. Given a unitary operator U and one of its eigenstates |ψ⟩ such that U|ψ⟩ = e^(iφ)|ψ⟩, QPE estimates the phase φ.
Algorithm Overview:
The precision of the phase estimate depends on the number of precision qubits used. With n precision qubits, the phase can be estimated to within 2π/2^n.
Key Functions:
Example Usage: (def simulator (create-simulator)) (def result (quantum-phase-estimation simulator (/ Math/PI 4) 3 :plus)) (:estimated-phase (:result result)) ; => ~0.7854 (π/4)
Quantum Phase Estimation (QPE) algorithm implementation. The Quantum Phase Estimation algorithm is a fundamental quantum algorithm that estimates the eigenvalue of a unitary operator. Given a unitary operator U and one of its eigenstates |ψ⟩ such that U|ψ⟩ = e^(iφ)|ψ⟩, QPE estimates the phase φ. Algorithm Overview: 1. Initialize precision qubits in superposition (|+⟩ states) 2. Prepare eigenstate qubit in a known eigenstate of U 3. Apply controlled-U^(2^k) operations for k = 0 to n-1 4. Apply inverse Quantum Fourier Transform to precision qubits 5. Measure precision qubits to extract phase estimate The precision of the phase estimate depends on the number of precision qubits used. With n precision qubits, the phase can be estimated to within 2π/2^n. Key Functions: - quantum-phase-estimation-circuit: Build QPE circuit - quantum-phase-estimation: Execute complete QPE algorithm - parse-measurement-to-phase: Convert measurement results to phase estimates - analyze-qpe-results: Analyze QPE measurement statistics Example Usage: (def simulator (create-simulator)) (def result (quantum-phase-estimation simulator (/ Math/PI 4) 3 :plus)) (:estimated-phase (:result result)) ; => ~0.7854 (π/4)
Simon's Algorithm
Simon's algorithm solves the hidden subgroup problem for the group (Z₂)ⁿ. Given a function f: {0,1}ⁿ → {0,1}ⁿ that is either one-to-one or two-to-one, and if two-to-one then f(x) = f(x ⊕ s) for some hidden string s ≠ 0ⁿ, the algorithm finds s with exponential speedup over classical methods.
The algorithm requires only O(n) quantum operations to find the hidden period, while classical algorithms would require O(2^(n/2)) queries to find s.
This implementation builds the quantum circuit for Simon's algorithm and executes it on a specified quantum backend.
The algorithm uses a quantum oracle Uf that computes f(x) = f(x ⊕ s), where s is the hidden period and x is the input bit string.
Simon's Algorithm Simon's algorithm solves the hidden subgroup problem for the group (Z₂)ⁿ. Given a function f: {0,1}ⁿ → {0,1}ⁿ that is either one-to-one or two-to-one, and if two-to-one then f(x) = f(x ⊕ s) for some hidden string s ≠ 0ⁿ, the algorithm finds s with exponential speedup over classical methods. The algorithm requires only O(n) quantum operations to find the hidden period, while classical algorithms would require O(2^(n/2)) queries to find s. This implementation builds the quantum circuit for Simon's algorithm and executes it on a specified quantum backend. The algorithm uses a quantum oracle Uf that computes f(x) = f(x ⊕ s), where s is the hidden period and x is the input bit string.
Implementation of fundamental quantum algorithms using the qclojure domain
Implementation of fundamental quantum algorithms using the qclojure domain
No vars found in this namespace.
Protocol and interface for quantum computing hardware backends.
This namespace defines the protocol for connecting to and executing quantum circuits on real quantum hardware or simulators. It provides a clean abstraction layer that allows the application to work with different quantum computing providers and simulators.
Protocol and interface for quantum computing hardware backends. This namespace defines the protocol for connecting to and executing quantum circuits on real quantum hardware or simulators. It provides a clean abstraction layer that allows the application to work with different quantum computing providers and simulators.
OpenQASM 3.0 conversion functions for quantum circuits.
This namespace provides conversion between quantum circuit data structures and OpenQASM 3.0 format strings. QASM 3.0 is the latest version of the OpenQASM quantum assembly language with improved syntax and features.
OpenQASM 3.0 conversion functions for quantum circuits. This namespace provides conversion between quantum circuit data structures and OpenQASM 3.0 format strings. QASM 3.0 is the latest version of the OpenQASM quantum assembly language with improved syntax and features.
Quantum circuit representation and execution
Quantum circuit representation and execution
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.
Quantum gate operations for quantum state manipulation
Quantum gate operations for quantum state manipulation
Mathematical operations and utilities for quantum algorithms.
Mathematical operations and utilities for quantum algorithms.
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.
Core quantum state representation and operations
Core quantum state representation and operations
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close