Problem Statement
π€ AI text below π€
Multi-controlled decomposition tests (#1810 ) verify correctness with the DD package via dd::buildFunctionality. That API currently takes qc::QuantumComputation, so tests translate a post-decomposition func.func into QuantumComputation with a local helper (funcOpToQuantumComputation in test_multi_controlled_decomposition.cpp).
That bridge is incomplete by design (only elementary ops after decomposition) and duplicates IR knowledge. Similar patterns appear elsewhere (e.g. QCO matrix tests that build a `QuantumComputation just to get a DD reference). As more MLIR/QCO passes need unitary checks, round-tripping through the classic IR becomes a recurring tax.
Proposed Solution
Extend the DD layer so a narrow class of MLIR/QCO programs can be consumed directly:
- Port or wrap
buildFunctionality (and later simulate) for static unitary QCO fragments (e.g. static qubits + elementary / controlled gates after decomposition).
- Track SSA qubit values β DD wire indices without going through
QuantumComputation.
Problem Statement
π€ AI text below π€
Multi-controlled decomposition tests (#1810 ) verify correctness with the DD package via
dd::buildFunctionality. That API currently takesqc::QuantumComputation, so tests translate a post-decompositionfunc.funcintoQuantumComputationwith a local helper (funcOpToQuantumComputationintest_multi_controlled_decomposition.cpp).That bridge is incomplete by design (only elementary ops after decomposition) and duplicates IR knowledge. Similar patterns appear elsewhere (e.g. QCO matrix tests that build a `QuantumComputation just to get a DD reference). As more MLIR/QCO passes need unitary checks, round-tripping through the classic IR becomes a recurring tax.
Proposed Solution
Extend the DD layer so a narrow class of MLIR/QCO programs can be consumed directly:
buildFunctionality(and latersimulate) for static unitary QCO fragments (e.g. static qubits + elementary / controlled gates after decomposition).QuantumComputation.