Skip to content
Construct

Known Symbolic/Numeric QRE Discrepancies

This page is generated from @known_discrepancy annotations in the codebase.

Notes:

  • Collected from @known_discrepancy annotations across the psiqdk.workbench.* domains.
  • The list reflects the codebase at generation time; add @known_discrepancy(summary, details) near the affected class/function to update it.

psiqdk.workbench.arithmetic._gidney

CuccaroAdd — Adding qubit register with lhs.num_qubits = 1 or adding two different size registers.

  • Object: class (CuccaroAdd)

Details

For a single qubit this is just a CX / Toffoli if controlled. It defaults to Gidney and does not follow pattern for lhs.num_qubits > 1.Returns an AV twice the true value.When lhs_size < rhs_size, we can do fewer gates. When rhs_size < lhs_size, we replace gates some Toffoli/CX gates with elbow pairs.

CuccaroDepthOptimisedAdd — Adding qubit register with lhs.num_qubits <=3 or adding different size registers.

  • Object: class (CuccaroDepthOptimisedAdd)

Details

For lhs.num_qubits <=3, defaults to CuccaroAdd. Gate counts and AV will be off. For lhs.num_qubits = 1, this can return negative values!.When lhs_size < rhs_size, we can do fewer gates. When rhs_size < lhs_size, we replace gates some Toffoli/CX gates with elbow pairs.

GidneyAdd — Symbolics gives lower AV counts than numeric counterpart, as it uses ZX-optimized expressions.

  • Object: class (GidneyAdd)

Details

In case of adders, an expression for ZX-optimized AV counts is known.Therefore, rather than having AV that matches values from numeric, we use anoptimized AV that is lower than the numeric AV.

psiqdk.workbench.comparators._comparators

CompareGE — Symbolics gives lower AV counts than numeric counterpart, as it uses ZX-optimized expressions.

  • Object: class (CompareGE)

Details

In case of comparators, an expression for ZX-optimized AV counts is known.Therefore, rather than having AV that matches values from numeric, we use anoptimized AV that is lower than the numeric AV.

CompareGT — Symbolics gives lower AV counts than numeric counterpart, as it uses ZX-optimized expressions.

  • Object: class (CompareGT)

Details

In case of comparators, an expression for ZX-optimized AV counts is known.Therefore, rather than having AV that matches values from numeric, we use anoptimized AV that is lower than the numeric AV.

CompareLE — Symbolics gives lower AV counts than numeric counterpart, as it uses ZX-optimized expressions.

  • Object: class (CompareLE)

Details

In case of comparators, an expression for ZX-optimized AV counts is known.Therefore, rather than having AV that matches values from numeric, we use anoptimized AV that is lower than the numeric AV.

CompareLT — Symbolics gives lower AV counts than numeric counterpart, as it uses ZX-optimized expressions.

  • Object: class (CompareLT)

Details

In case of comparators, an expression for ZX-optimized AV counts is known.Therefore, rather than having AV that matches values from numeric, we use anoptimized AV that is lower than the numeric AV.

psiqdk.workbench.qft._qft

QFT — Undercounts AV, elbows and qubit highwater for controlled cases.

  • Object: class (QFT)

Details

There are two issues with symbolic implementation of controlled QFT.First is that there's an off-by-one error for qubit_highwater.Second is that we currently don't have a good way to deal with double for loop symbolically,which leads to wrong elbow counts and as a consequence wrong active volume counts.

psiqdk.workbench.usp._usp

USP — Symbolic-vs-numeric mismatch for power-of-two dimensions

  • Object: class (USP)

Details

Uniform State Preparation currently fails symbolic/numeric parity when d is a power-of-two. An external test skips these cases (e.g., test_usp_symbolics_match_numerics).