Liking cljdoc? Tell your friends :D

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

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.

The simulator can be initialized with a device map or with max-qubits

  • max-qubits
  • native-gates
  • topology
  • noise-model

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.

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.

The simulator can be initialized with a device map or with max-qubits
- max-qubits
- native-gates
- topology
- noise-model

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

all-noise-modelsclj

(all-noise-models)
(all-noise-models devices)

Get all available noise models.

Returns: Map of platform names to noise models

Get all available noise models.

Returns: Map of platform names to noise models
sourceraw docstring

cleanup-completed-jobs!clj

(cleanup-completed-jobs!)
(cleanup-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

create-hardware-simulatorclj

(create-hardware-simulator device)
(create-hardware-simulator device config)

Create a hardware simulator for a specific device.

Parameters:

  • device: Device map with max-qubits, native-gates, topology, noise-model
  • config: Optional simulator configuration

Returns: QuantumHardwareSimulator instance

Create a hardware simulator for a specific device.

Parameters:
- device: Device map with max-qubits, native-gates, topology, noise-model
- config: Optional simulator configuration

Returns: QuantumHardwareSimulator instance
sourceraw docstring

create-noisy-simulatorclj

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

Create a local noisy quantum simulator with comprehensive noise modeling.

Parameters:

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

Returns: QuantumHardwareSimulator instance with noise model, full gate set and fully connected qubits

Create a local noisy quantum simulator with comprehensive noise modeling.

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

Returns: QuantumHardwareSimulator instance with noise model, full gate set
and fully connected qubits
sourceraw docstring

get-simulator-statsclj

(get-simulator-stats)

Get statistics about the hardware simulator state.

Returns: Map with job counts and statistics

Get statistics about the hardware simulator state.

Returns: Map with job counts and statistics
sourceraw docstring

max-qubitsclj

(max-qubits backend)

Get the maximum number of qubits supported by the backend.

Parameters:

  • backend: Backend instance

Returns: Maximum qubit count (default: 16)

Get the maximum number of qubits supported by the backend.

Parameters:
- backend: Backend instance

Returns: Maximum qubit count (default: 16)
sourceraw docstring

native-gatesclj

(native-gates backend)

Get the set of native gates supported by the backend.

Parameters:

  • backend: Backend instance

Returns: Set of native gate keywords (default: all QClojure gates)

Get the set of native gates supported by the backend.

Parameters:
- backend: Backend instance

Returns: Set of native gate keywords (default: all QClojure gates)
sourceraw docstring

noise-modelclj

(noise-model backend)

Get the noise model of the backend.

Parameters:

  • backend: Backend instance

Returns: Noise model map or empty map if none defined

Get the noise model of the backend.

Parameters:
- backend: Backend instance

Returns: Noise model map or empty map if none defined
sourceraw docstring

noise-model-forclj

(noise-model-for platform)
(noise-model-for devices platform)

Get the noise model for a specific platform.

Parameters:

  • platform: Platform name (keyword)

Returns: Noise model map or nil if not found

Get the noise model for a specific platform.

Parameters:
- platform: Platform name (keyword)

Returns: Noise model map or nil if not found
sourceraw docstring

reset-simulator-state!clj

(reset-simulator-state!)

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

Returns: Updated state

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

Returns: Updated state
sourceraw docstring

simulator-stateclj

source

topologyclj

(topology backend)

Get the qubit topology of the backend.

Parameters:

  • backend: Backend instance

Returns: Topology map or default fully connected for 16 qubits

Get the qubit topology of the backend.

Parameters:
- backend: Backend instance

Returns: Topology map or default fully connected for 16 qubits
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close