Liking cljdoc? Tell your friends :D

org.soulspace.qclojure.adapter.backend.noisy-simulator

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:

{: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.
raw docstring

amplitude-damping-kraus-operatorsclj

(amplitude-damping-kraus-operators gamma)

Generate Kraus operators for amplitude damping (T1 decay).

Models energy dissipation where |1⟩ decays to |0⟩. Kraus operators: K₀ = [[1, 0], [0, √(1-γ)]], K₁ = [[0, √γ], [0, 0]]

Parameters:

  • gamma: Damping parameter (0 <= gamma <= 1)

Returns: Vector of Kraus operators using fastmath complex numbers

Generate Kraus operators for amplitude damping (T1 decay).

Models energy dissipation where |1⟩ decays to |0⟩.
Kraus operators: K₀ = [[1, 0], [0, √(1-γ)]], K₁ = [[0, √γ], [0, 0]]

Parameters:
- gamma: Damping parameter (0 <= gamma <= 1)

Returns: Vector of Kraus operators using fastmath complex numbers
sourceraw docstring

apply-advanced-gate-noiseclj

(apply-advanced-gate-noise state gate noise-config)

Apply advanced noise model during gate operation.

Parameters:

  • state: Current quantum state
  • gate: Gate operation
  • noise-config: Advanced noise configuration

Returns: State after gate operation and noise

Apply advanced noise model during gate operation.

Parameters:
- state: Current quantum state
- gate: Gate operation
- noise-config: Advanced noise configuration

Returns: State after gate operation and noise
sourceraw docstring

apply-advanced-readout-noiseclj

(apply-advanced-readout-noise results readout-config)

Apply advanced readout noise with potential correlations.

Parameters:

  • results: Clean measurement results
  • readout-config: Advanced readout error configuration

Returns: Noisy measurement results

Apply advanced readout noise with potential correlations.

Parameters:
- results: Clean measurement results
- readout-config: Advanced readout error configuration

Returns: Noisy measurement results
sourceraw docstring

apply-depolarizing-noiseclj

(apply-depolarizing-noise state qubit noise-prob)

Apply simple depolarizing noise to a quantum state.

Apply simple depolarizing noise to a quantum state.
sourceraw docstring

apply-matrix-to-amplitudeclj

(apply-matrix-to-amplitude amplitude-pair matrix)

Apply a 2x2 matrix to a single amplitude pair in a quantum state.

Performs proper complex matrix-vector multiplication: [new-a0] = [m00 m01] [a0] [new-a1] [m10 m11] [a1]

Parameters:

  • amplitude-pair: [a0 a1] where each is a fastmath Vec2 complex number
  • matrix: 2x2 matrix [[m00 m01] [m10 m11]] with fastmath complex elements

Returns: [new-a0 new-a1] as fastmath complex numbers

Apply a 2x2 matrix to a single amplitude pair in a quantum state.

Performs proper complex matrix-vector multiplication:
[new-a0] = [m00 m01] [a0]
[new-a1]   [m10 m11] [a1]

Parameters:
- amplitude-pair: [a0 a1] where each is a fastmath Vec2 complex number
- matrix: 2x2 matrix [[m00 m01] [m10 m11]] with fastmath complex elements

Returns: [new-a0 new-a1] as fastmath complex numbers
sourceraw docstring

apply-quantum-channelclj

(apply-quantum-channel state kraus-operators qubit-index)

Apply a complete quantum channel defined by multiple Kraus operators.

For pure state simulators, implements quantum channels by randomly selecting one Kraus operator to apply with equal probability. This is a valid approximation for noise simulation.

Parameters:

  • state: Input quantum state
  • kraus-operators: Vector of Kraus operators with matrices
  • qubit-index: Target qubit

Returns: Output quantum state after channel application

Apply a complete quantum channel defined by multiple Kraus operators.

For pure state simulators, implements quantum channels by randomly selecting
one Kraus operator to apply with equal probability. This is a valid
approximation for noise simulation.

Parameters:
- state: Input quantum state
- kraus-operators: Vector of Kraus operators with matrices
- qubit-index: Target qubit

Returns: Output quantum state after channel application
sourceraw docstring

apply-readout-noiseclj

(apply-readout-noise results prob-0-to-1 prob-1-to-0)

Apply readout error to measurement results.

Apply readout error to measurement results.
sourceraw docstring

apply-single-qubit-kraus-operatorclj

(apply-single-qubit-kraus-operator state kraus-op qubit-index)

Apply a single Kraus operator to a specific qubit in a multi-qubit state.

This implements the proper quantum mechanics for Kraus operator application: |ψ'⟩ = K|ψ⟩ / ||K|ψ⟩||

The Kraus operator matrix should already include any coefficients.

Parameters:

  • state: Quantum state
  • kraus-op: Kraus operator {:matrix matrix}
  • qubit-index: Target qubit (0-indexed)

Returns: New quantum state after applying Kraus operator and normalizing

Apply a single Kraus operator to a specific qubit in a multi-qubit state.

This implements the proper quantum mechanics for Kraus operator application:
|ψ'⟩ = K|ψ⟩ / ||K|ψ⟩||

The Kraus operator matrix should already include any coefficients.

Parameters:
- state: Quantum state
- kraus-op: Kraus operator {:matrix matrix}
- qubit-index: Target qubit (0-indexed)

Returns: New quantum state after applying Kraus operator and normalizing
sourceraw docstring

atom-computing-noiseclj

Noise model for Atom Computing neutral atom systems (future Amazon Braket).

Atom Computing characteristics:

  • 100+ neutral atoms
  • Reconfigurable architectures
  • Long coherence times
  • Potential for large-scale systems
Noise model for Atom Computing neutral atom systems (future Amazon Braket).

Atom Computing characteristics:
- 100+ neutral atoms
- Reconfigurable architectures 
- Long coherence times
- Potential for large-scale systems
sourceraw docstring

calculate-decoherence-paramsclj

(calculate-decoherence-params t1 t2 gate-time)

Calculate decoherence parameters from T1, T2 times and gate duration.

Parameters:

  • t1: T1 relaxation time (microseconds)
  • t2: T2 dephasing time (microseconds)
  • gate-time: Gate operation time (nanoseconds)

Returns: {:gamma-1 gamma-2} decoherence parameters

Calculate decoherence parameters from T1, T2 times and gate duration.

Parameters:
- t1: T1 relaxation time (microseconds)
- t2: T2 dephasing time (microseconds) 
- gate-time: Gate operation time (nanoseconds)

Returns: {:gamma-1 gamma-2} decoherence parameters
sourceraw docstring

cleanup-noisy-completed-jobs!clj

(cleanup-noisy-completed-jobs!)
(cleanup-noisy-completed-jobs! max-age-ms)

Remove completed jobs older than specified time (in milliseconds).

Parameters:

  • max-age-ms: Maximum age for completed jobs (default: 1 hour)

Returns: Number of jobs cleaned up

Remove completed jobs older than specified time (in milliseconds).

Parameters:
- max-age-ms: Maximum age for completed jobs (default: 1 hour)

Returns: Number of jobs cleaned up
sourceraw docstring

coherent-error-kraus-operatorclj

(coherent-error-kraus-operator angle axis)

Generate Kraus operator for coherent (systematic) errors.

Parameters:

  • angle: Rotation angle in radians
  • axis: Rotation axis (:x, :y, or :z)

Returns: Single Kraus operator for coherent rotation

Generate Kraus operator for coherent (systematic) errors.

Parameters:
- angle: Rotation angle in radians
- axis: Rotation axis (:x, :y, or :z)

Returns: Single Kraus operator for coherent rotation
sourceraw docstring

compare-hardware-platformsclj

(compare-hardware-platforms circuit platform-models)

Compare circuit fidelity across different quantum hardware platforms.

Parameters:

  • circuit: Quantum circuit to analyze
  • platform-models: Map of platform names to noise models

Returns: Map of platform comparisons with fidelity estimates and characteristics

Compare circuit fidelity across different quantum hardware platforms.

Parameters:
- circuit: Quantum circuit to analyze
- platform-models: Map of platform names to noise models

Returns: Map of platform comparisons with fidelity estimates and characteristics
sourceraw docstring

create-advanced-noisy-simulatorclj

(create-advanced-noisy-simulator noise-model)
(create-advanced-noisy-simulator noise-model config)

Create an advanced noisy quantum simulator with comprehensive noise modeling.

Parameters:

  • noise-model: Advanced noise model configuration
  • config: Optional simulator configuration

Returns: AdvancedNoisyQuantumSimulator instance

Create an advanced noisy quantum simulator with comprehensive noise modeling.

Parameters:
- noise-model: Advanced noise model configuration
- config: Optional simulator configuration

Returns: AdvancedNoisyQuantumSimulator instance
sourceraw docstring

create-noisy-simulatorclj

(create-noisy-simulator noise-model)

Create a simple noisy quantum simulator.

Create a simple noisy quantum simulator.
sourceraw docstring

depolarizing-kraus-operatorsclj

(depolarizing-kraus-operators p)

Generate Kraus operators for depolarizing noise channel.

The depolarizing channel applies each Pauli operator with probability p/4, and leaves the state unchanged with probability 1-3p/4.

For proper normalization: Σᵢ Kᵢ† Kᵢ = I

Parameters:

  • p: Total error probability (0 <= p <= 3/4 for physical channel)

Returns: Vector of Kraus operators with coefficients applied to matrices

Generate Kraus operators for depolarizing noise channel.

The depolarizing channel applies each Pauli operator with probability p/4,
and leaves the state unchanged with probability 1-3p/4.

For proper normalization: Σᵢ Kᵢ† Kᵢ = I

Parameters:
- p: Total error probability (0 <= p <= 3/4 for physical channel)

Returns: Vector of Kraus operators with coefficients applied to matrices
sourceraw docstring

estimate-circuit-fidelityclj

(estimate-circuit-fidelity circuit noise-model)

Estimate the overall fidelity of a circuit under given noise model.

This provides a rough estimate based on gate counts and noise strengths.

Estimate the overall fidelity of a circuit under given noise model.

This provides a rough estimate based on gate counts and noise strengths.
sourceraw docstring

get-braket-noise-modelsclj

(get-braket-noise-models)

Get all available Amazon Braket quantum hardware noise models.

Returns: Map of device names to noise model configurations

Get all available Amazon Braket quantum hardware noise models.

Returns: Map of device names to noise model configurations
sourceraw docstring

get-noisy-simulator-statsclj

(get-noisy-simulator-stats)

Get statistics about the noisy simulator state.

Returns: Map with job counts and statistics

Get statistics about the noisy simulator state.

Returns: Map with job counts and statistics
sourceraw docstring

high-fidelity-superconductingclj

High-fidelity superconducting qubit noise model.

High-fidelity superconducting qubit noise model.
sourceraw docstring

high-noiseclj

source

ibm-brisbane-noiseclj

Noise model for IBM Brisbane (superconducting) available on Amazon Braket.

IBM Brisbane characteristics:

  • 127 qubits
  • Falcon r5.11 processor
  • Heavy-hex topology
  • Advanced error suppression
Noise model for IBM Brisbane (superconducting) available on Amazon Braket.

IBM Brisbane characteristics:
- 127 qubits
- Falcon r5.11 processor
- Heavy-hex topology
- Advanced error suppression
sourceraw docstring

ibm-kyoto-noiseclj

Noise model for IBM Kyoto (superconducting) available on Amazon Braket.

IBM Kyoto characteristics:

  • 127 qubits
  • Condor r1 processor
  • Enhanced error correction features
  • Dynamic decoupling capabilities
Noise model for IBM Kyoto (superconducting) available on Amazon Braket.

IBM Kyoto characteristics:
- 127 qubits
- Condor r1 processor
- Enhanced error correction features
- Dynamic decoupling capabilities
sourceraw docstring

ibm-lagos-noiseclj

Noise model based on IBM Lagos quantum computer characteristics.

Noise model based on IBM Lagos quantum computer characteristics.
sourceraw docstring

ibm-like-noiseclj

source

ionq-aria-noiseclj

Noise model for IonQ Aria (trapped ion) available on Amazon Braket.

IonQ Aria characteristics:

  • 25 qubits (#AQ 20)
  • Improved single-qubit gate fidelity (~99.9%)
  • Improved two-qubit gate fidelity (~99.5%)
  • Better connectivity and faster gates than Harmony
Noise model for IonQ Aria (trapped ion) available on Amazon Braket.

IonQ Aria characteristics:
- 25 qubits (#AQ 20)
- Improved single-qubit gate fidelity (~99.9%)
- Improved two-qubit gate fidelity (~99.5%)
- Better connectivity and faster gates than Harmony
sourceraw docstring

ionq-forte-noiseclj

Noise model for IonQ Forte (trapped ion) available on Amazon Braket.

IonQ Forte characteristics:

  • 32 qubits (#AQ 29)
  • Latest generation with highest fidelity
  • Enhanced error correction capabilities
  • Fastest gate times in IonQ family
Noise model for IonQ Forte (trapped ion) available on Amazon Braket.

IonQ Forte characteristics:
- 32 qubits (#AQ 29)
- Latest generation with highest fidelity
- Enhanced error correction capabilities
- Fastest gate times in IonQ family
sourceraw docstring

ionq-harmony-noiseclj

Noise model for IonQ Harmony (trapped ion) available on Amazon Braket.

IonQ Harmony characteristics:

  • 11 qubits
  • Very high single-qubit gate fidelity (~99.8%)
  • High two-qubit gate fidelity (~99.0-99.3%)
  • Long coherence times
  • Slower gate times due to laser operations
Noise model for IonQ Harmony (trapped ion) available on Amazon Braket.

IonQ Harmony characteristics:
- 11 qubits
- Very high single-qubit gate fidelity (~99.8%)
- High two-qubit gate fidelity (~99.0-99.3%)
- Long coherence times
- Slower gate times due to laser operations
sourceraw docstring

noisy-stateclj

source

oxford-lucy-noiseclj

Noise model for Oxford Quantum Computing Lucy (trapped ion) available on Amazon Braket.

Oxford Lucy characteristics:

  • 8 qubits
  • High-fidelity trapped ion qubits
  • Competitive with IonQ systems
  • Focus on networking and modular architectures
Noise model for Oxford Quantum Computing Lucy (trapped ion) available on Amazon Braket.

Oxford Lucy characteristics:
- 8 qubits
- High-fidelity trapped ion qubits
- Competitive with IonQ systems
- Focus on networking and modular architectures
sourceraw docstring

phase-damping-kraus-operatorsclj

(phase-damping-kraus-operators gamma)

Generate Kraus operators for phase damping (T2 dephasing).

Models random phase flips without energy loss. Kraus operators: K₀ = [[1, 0], [0, √(1-γ)]], K₁ = [[0, 0], [0, √γ]]

Parameters:

  • gamma: Dephasing parameter (0 <= gamma <= 1)

Returns: Vector of Kraus operators using fastmath complex numbers

Generate Kraus operators for phase damping (T2 dephasing).

Models random phase flips without energy loss.
Kraus operators: K₀ = [[1, 0], [0, √(1-γ)]], K₁ = [[0, 0], [0, √γ]]

Parameters:
- gamma: Dephasing parameter (0 <= gamma <= 1)

Returns: Vector of Kraus operators using fastmath complex numbers
sourceraw docstring

quera-aquila-noiseclj

Noise model for QuEra Aquila (neutral atom) available on Amazon Braket.

QuEra Aquila characteristics:

  • 256 neutral atoms
  • Reconfigurable connectivity
  • Rydberg blockade mechanism
  • Unique noise sources from atom loading/transport
Noise model for QuEra Aquila (neutral atom) available on Amazon Braket.

QuEra Aquila characteristics:
- 256 neutral atoms
- Reconfigurable connectivity
- Rydberg blockade mechanism
- Unique noise sources from atom loading/transport
sourceraw docstring

reset-noisy-simulator-state!clj

(reset-noisy-simulator-state!)

Reset the noisy simulator state, clearing all jobs and counters.

Returns: Updated state

Reset the noisy simulator state, clearing all jobs and counters.

Returns: Updated state
sourceraw docstring

rigetti-aspen-m3-noiseclj

Noise model for Rigetti Aspen-M-3 (superconducting) available on Amazon Braket.

Rigetti Aspen-M-3 characteristics:

  • 80 qubits
  • Superconducting transmon qubits
  • Fast gate times but shorter coherence
  • Tunable coupling architecture
Noise model for Rigetti Aspen-M-3 (superconducting) available on Amazon Braket.

Rigetti Aspen-M-3 characteristics:
- 80 qubits
- Superconducting transmon qubits
- Fast gate times but shorter coherence
- Tunable coupling architecture
sourceraw docstring

rigetti-aspen-noiseclj

Noise model based on Rigetti Aspen quantum computer characteristics.

Noise model based on Rigetti Aspen quantum computer characteristics.
sourceraw docstring

xanadu-x-series-noiseclj

Noise model for Xanadu X-Series (photonic) available on Amazon Braket.

Xanadu X-Series characteristics:

  • 216 modes (photonic qumodes)
  • Continuous variable quantum computing
  • Different noise characteristics from discrete systems
  • Gate errors primarily from optical losses and thermal noise
Noise model for Xanadu X-Series (photonic) available on Amazon Braket.

Xanadu X-Series characteristics:
- 216 modes (photonic qumodes)
- Continuous variable quantum computing
- Different noise characteristics from discrete systems
- Gate errors primarily from optical losses and thermal noise
sourceraw docstring

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

× close