Advanced noisy quantum simulator backend implementing realistic quantum computing device simulation with comprehensive noise modeling.
This backend provides local simulation of quantum devices with noise using the domain layer's quantum state and circuit functionality. It serves as both a reference implementation and testing backend for quantum algorithms under realistic noise conditions.
This simulator models various types of quantum noise including:
The noise model can be configured with parameters such as T1 and T2 times, gate operation times, and noise strengths. It supports advanced noise configurations including correlated readout errors and coherent errors with specific rotation angles and axes. The simulator applies noise during gate operations and measurements, simulating realistic quantum device behavior.
The noise model map has the following structure:
{:gate-noise {
:h {:noise-type :depolarizing :noise-strength 0.01}
:x {:noise-type :amplitude-damping :noise-strength 0.02}
:cnot {:noise-type :phase-damping :noise-strength 0.03}
...}
:readout-error {:prob-0-to-1 0.05 :prob-1-to-0 0.02}}
Note: The simulator currently doesn't model crosstalk between qubits.
The simulator supports asynchronous job management, allowing users to submit circuits and retrieve results later. It can be used for testing algorithms, circuit designs, and quantum operations without requiring access to actual quantum hardware.
It also implements the CloudQuantumBackend protocol for mock cloud backend functionality, allowing it to be used in a cloud-like environment for testing purposes.
Advanced noisy quantum simulator backend implementing realistic quantum computing device simulation with comprehensive noise modeling. This backend provides local simulation of quantum devices with noise using the domain layer's quantum state and circuit functionality. It serves as both a reference implementation and testing backend for quantum algorithms under realistic noise conditions. This simulator models various types of quantum noise including: - Depolarizing noise using Kraus operators - Amplitude damping (T1 decay) modeling energy dissipation - Phase damping (T2 dephasing) modeling pure dephasing - Readout errors with configurable bit-flip probabilities - Coherent errors and systematic rotation biases - Gate-specific noise parameters based on real device calibration - Comprehensive Amazon Braket quantum hardware noise models The noise model can be configured with parameters such as T1 and T2 times, gate operation times, and noise strengths. It supports advanced noise configurations including correlated readout errors and coherent errors with specific rotation angles and axes. The simulator applies noise during gate operations and measurements, simulating realistic quantum device behavior. The noise model map has the following structure: ```clojure {:gate-noise { :h {:noise-type :depolarizing :noise-strength 0.01} :x {:noise-type :amplitude-damping :noise-strength 0.02} :cnot {:noise-type :phase-damping :noise-strength 0.03} ...} :readout-error {:prob-0-to-1 0.05 :prob-1-to-0 0.02}} ``` Note: The simulator currently doesn't model crosstalk between qubits. The simulator supports asynchronous job management, allowing users to submit circuits and retrieve results later. It can be used for testing algorithms, circuit designs, and quantum operations without requiring access to actual quantum hardware. It also implements the CloudQuantumBackend protocol for mock cloud backend functionality, allowing it to be used in a cloud-like environment for testing purposes.
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.
This simulator implements an ideal quantum computer without noise, simulating quantum gates and measurements using matrix operations.
The simulator supports asynchronous job management, allowing users to submit circuits and retrieve results later. It can be used for testing algorithms, circuit designs, and quantum operations without requiring access to actual quantum hardware.
It also implements the CloudQuantumBackend protocol for mock cloud backend functionality, allowing it to be used in a cloud-like environment for testing purposes.
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. This simulator implements an ideal quantum computer without noise, simulating quantum gates and measurements using matrix operations. The simulator supports asynchronous job management, allowing users to submit circuits and retrieve results later. It can be used for testing algorithms, circuit designs, and quantum operations without requiring access to actual quantum hardware. It also implements the CloudQuantumBackend protocol for mock cloud backend functionality, allowing it to be used in a cloud-like environment for testing purposes.
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.
Quantum period finding algorithm for Shor's algorithm.
This algorithm is a specialized application of quantum phase estimation (QPE) to find the period of the modular exponentiation function f(x) = a^x mod N.
Instead of reimplementing QPE, this module leverages the existing quantum-phase-estimation algorithm and adapts it for period finding by:
This follows the DRY principle and maintains a clean separation of concerns.
Quantum period finding algorithm for Shor's algorithm. This algorithm is a specialized application of quantum phase estimation (QPE) to find the period of the modular exponentiation function f(x) = a^x mod N. Instead of reimplementing QPE, this module leverages the existing quantum-phase-estimation algorithm and adapts it for period finding by: 1. Setting up the appropriate unitary operator (modular exponentiation) 2. Using QPE to estimate the phase 3. Converting phase estimates to period estimates using continued fractions This follows the DRY principle and maintains a clean separation of concerns.
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