Liking cljdoc? Tell your friends :D

org.soulspace.qclojure.application.error-mitigation

Error mitigation strategies for quantum computing.

This namespace provides a comprehensive suite of error mitigation techniques to improve the fidelity of quantum circuit execution on noisy hardware.

Key strategies implemented:

  • Zero Noise Extrapolation (ZNE)
  • Readout Error Mitigation
  • Symmetry Verification
  • Virtual Distillation
  • Circuit Optimization Integration

The mitigation pipeline analyzes circuits and noise models to automatically select and apply the most effective strategies for each use case.

Error mitigation strategies for quantum computing.

This namespace provides a comprehensive suite of error mitigation techniques
to improve the fidelity of quantum circuit execution on noisy hardware.

Key strategies implemented:
- Zero Noise Extrapolation (ZNE)
- Readout Error Mitigation  
- Symmetry Verification
- Virtual Distillation
- Circuit Optimization Integration

The mitigation pipeline analyzes circuits and noise models to automatically
select and apply the most effective strategies for each use case.
raw docstring

analyze-circuit-noise-profileclj

(analyze-circuit-noise-profile circuit noise-model)

Analyze circuit characteristics to recommend mitigation strategies.

Analyze circuit characteristics to recommend mitigation strategies.
sourceraw docstring

apply-circuit-optimizationclj

(apply-circuit-optimization circuit supported-gates)

Apply circuit optimization as part of error mitigation.

Apply circuit optimization as part of error mitigation.
sourceraw docstring

apply-error-mitigationclj

(apply-error-mitigation circuit backend mitigation-config)

Apply comprehensive error mitigation strategies to improve circuit fidelity.

This is the main entry point for error mitigation. It analyzes the circuit and noise model, selects appropriate strategies, and orchestrates their application.

Apply comprehensive error mitigation strategies to improve circuit fidelity.

This is the main entry point for error mitigation. It analyzes the circuit
and noise model, selects appropriate strategies, and orchestrates their application.
sourceraw docstring

apply-symmetry-verificationclj

(apply-symmetry-verification circuit measurement-results)

Apply advanced symmetry verification for error detection.

Production implementation with sophisticated symmetry analysis.

Apply advanced symmetry verification for error detection.

Production implementation with sophisticated symmetry analysis.
sourceraw docstring

apply-virtual-distillationclj

(apply-virtual-distillation circuit backend num-copies num-shots)

Apply virtual distillation using multiple circuit copies.

Virtual distillation improves fidelity by:

  1. Running multiple copies of the circuit
  2. Applying post-processing to extract high-fidelity results
  3. Using probabilistic error cancellation

Production implementation uses realistic circuit simulation.

Apply virtual distillation using multiple circuit copies.

Virtual distillation improves fidelity by:
1. Running multiple copies of the circuit
2. Applying post-processing to extract high-fidelity results
3. Using probabilistic error cancellation

Production implementation uses realistic circuit simulation.
sourceraw docstring

compute-parity-expectationclj

(compute-parity-expectation measurement-results num-qubits)

Compute parity expectation values for symmetry verification.

For n qubits, computes <Z₁Z₂...Zₙ> expectation value.

Compute parity expectation values for symmetry verification.

For n qubits, computes <Z₁Z₂...Zₙ> expectation value.
sourceraw docstring

create-calibration-matrixclj

(create-calibration-matrix num-qubits readout-errors)

Create calibration matrix from readout error characterization.

For n qubits, this creates a 2^n x 2^n matrix where element (i,j) represents P(measure state i | prepared state j).

Uses tensor product to properly construct multi-qubit calibration matrices.

Create calibration matrix from readout error characterization.

For n qubits, this creates a 2^n x 2^n matrix where element (i,j)
represents P(measure state i | prepared state j).

Uses tensor product to properly construct multi-qubit calibration matrices.
sourceraw docstring

create-error-mitigation-backendclj

(create-error-mitigation-backend base-backend mitigation-config)

Create a backend wrapper that applies error mitigation transparently.

This higher-order function wraps any quantum backend to add comprehensive error mitigation capabilities without changing the backend interface.

Create a backend wrapper that applies error mitigation transparently.

This higher-order function wraps any quantum backend to add comprehensive
error mitigation capabilities without changing the backend interface.
sourceraw docstring

create-single-qubit-readout-matrixclj

(create-single-qubit-readout-matrix readout-errors)

Create readout error matrix for a single qubit.

Returns 2x2 matrix where element (i,j) = P(measure i | prepared j).

Create readout error matrix for a single qubit.

Returns 2x2 matrix where element (i,j) = P(measure i | prepared j).
sourceraw docstring

detect-symmetry-violationsclj

(detect-symmetry-violations circuit measurement-results)

Detect violations of known circuit symmetries.

Advanced symmetry detection including:

  • Parity conservation
  • Reflection symmetries
  • Permutation symmetries
  • Custom symmetry constraints
Detect violations of known circuit symmetries.

Advanced symmetry detection including:
- Parity conservation
- Reflection symmetries  
- Permutation symmetries
- Custom symmetry constraints
sourceraw docstring

execute-with-mitigationclj

(execute-with-mitigation circuit backend mitigation-config)

Execute a circuit with comprehensive error mitigation applied.

This is the main integration point that combines circuit optimization, error mitigation, and result post-processing in a single function.

Execute a circuit with comprehensive error mitigation applied.

This is the main integration point that combines circuit optimization,
error mitigation, and result post-processing in a single function.
sourceraw docstring

extract-expectation-valueclj

(extract-expectation-value measurement-results ideal-states)

Extract an expectation value from measurement results for ZNE.

This could be:

  • Probability of success state
  • Parity expectation
  • Custom observable

For now, uses probability of most likely ideal state.

Extract an expectation value from measurement results for ZNE.

This could be:
- Probability of success state
- Parity expectation  
- Custom observable

For now, uses probability of most likely ideal state.
sourceraw docstring

fit-exponential-decayclj

(fit-exponential-decay data-points)

Fit exponential decay model to ZNE data points.

Model: f(x) = a * exp(-b * x) + c Simple linear fit for demonstration.

Fit exponential decay model to ZNE data points.

Model: f(x) = a * exp(-b * x) + c
Simple linear fit for demonstration.
sourceraw docstring

generate-state-labelsclj

(generate-state-labels num-qubits)

Generate binary state labels for n qubits.

Returns vector of strings like ['00', '01', '10', '11'] for 2 qubits.

Generate binary state labels for n qubits.

Returns vector of strings like ['00', '01', '10', '11'] for 2 qubits.
sourceraw docstring

get-strategy-infoclj

(get-strategy-info strategy)

Get metadata information about a mitigation strategy.

Get metadata information about a mitigation strategy.
sourceraw docstring

list-available-strategiesclj

(list-available-strategies)

List all available error mitigation strategies with their metadata.

List all available error mitigation strategies with their metadata.
sourceraw docstring

mitigate-errorsclj

(mitigate-errors circuit backend & [config])

Main API function for applying error mitigation to quantum circuits.

This is the primary entry point for users of the error mitigation system.

Main API function for applying error mitigation to quantum circuits.

This is the primary entry point for users of the error mitigation system.
sourceraw docstring

mitigate-readout-errorsclj

(mitigate-readout-errors measured-counts calibration-matrix num-qubits)

Apply readout error mitigation using calibration matrix.

This inverts the effect of readout errors by solving the linear system: measured_counts = calibration_matrix * true_counts

Production implementation supports arbitrary number of qubits using proper matrix inversion.

Apply readout error mitigation using calibration matrix.

This inverts the effect of readout errors by solving the linear system:
measured_counts = calibration_matrix * true_counts

Production implementation supports arbitrary number of qubits using proper matrix inversion.
sourceraw docstring

scale-noise-modelclj

(scale-noise-model noise-model scale-factor)

Scale the noise parameters in a noise model by a given factor.

Scale the noise parameters in a noise model by a given factor.
sourceraw docstring

select-mitigation-strategiesclj

(select-mitigation-strategies circuit noise-model constraints)

Select optimal mitigation strategies based on circuit analysis and constraints.

Select optimal mitigation strategies based on circuit analysis and constraints.
sourceraw docstring

simulate-circuit-executionclj

(simulate-circuit-execution circuit noise-model num-shots)

Simulate realistic quantum circuit execution under noise.

This provides a more realistic simulation for ZNE by modeling:

  • Gate-dependent error accumulation
  • Readout errors
  • Decoherence effects
  • Circuit depth impact

Returns measurement results that reflect actual quantum hardware behavior.

Simulate realistic quantum circuit execution under noise.

This provides a more realistic simulation for ZNE by modeling:
- Gate-dependent error accumulation
- Readout errors  
- Decoherence effects
- Circuit depth impact

Returns measurement results that reflect actual quantum hardware behavior.
sourceraw docstring

strategy-metadataclj

Metadata about available error mitigation strategies.

Metadata about available error mitigation strategies.
sourceraw docstring

zero-noise-extrapolationclj

(zero-noise-extrapolation circuit backend noise-scales ideal-states num-shots)

Apply Zero Noise Extrapolation to mitigate coherent errors.

Production implementation using realistic circuit simulation instead of mock data.

Apply Zero Noise Extrapolation to mitigate coherent errors.

Production implementation using realistic circuit simulation instead of mock data.
sourceraw docstring

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

× close