qdk_chemistry.algorithms.state_preparation.sparse_isometry module
Sparse isometry module for quantum state preparation.
This module implements sparse isometry algorithms for efficient quantum circuit generation from electronic structure wavefunctions. Sparse isometry methods leverage the sparsity of quantum states to create optimized circuits that prepare only the non-zero amplitude components, significantly reducing circuit depth and gate count compared to dense state preparation methods.
SparseIsometryStatePrep: Enhanced sparse isometry method. This method performs duplicate row removal, all-ones row removal, and diagonal matrix rank reduction besides standard GF2 Gaussian elimination. It tracks both CNOT and X operations for optimal circuit reconstruction and can be more efficient than standard GF2 for matrices with specific structural patterns.
The sparse isometry algorithms are particularly well-suited for quantum chemistry applications where electronic structure wavefunctions often have a small number of dominant determinants.
The implementations prepare the same quantum state with much more efficient circuits, featuring significantly reduced gate counts and circuit depths compared to traditional isometry methods.
Algorithm Details:
SparseIsometry: Applies enhanced preprocessing, GF2 Gaussian elimination, and postprocessing, performs dense state preparation on the reduced space, then applies recorded operations (CX and X) in reverse to expand back to the full space.
- class qdk_chemistry.algorithms.state_preparation.sparse_isometry.SparseIsometryStatePreparationSettings[source]
Bases:
SettingsSettings for SparseIsometryStatePreparation.
- update(values)[source]
Apply setting overrides, translating the deprecated pre-rename keys.
dense_preparation_methodand the transpilation keys used to live on this algorithm. They now belong to the nested algorithm selected bydense_state_prep, so they are folded into that reference instead of being rejected as unknown settings.- Parameters:
values (
dict) – Setting overrides, possibly containing deprecated keys.- Raises:
ValueError – If
dense_preparation_methodis not one of the supported values.- Return type: