Skip to content

[RFC] Exploring O(1) Geometric Preprocessing (PSF-Zero) for QIR / Q# Compilation #3273

@love-os-architect

Description

@love-os-architect

Hi Q# and Azure Quantum team,

I’d like to open a discussion on a geometric preprocessing approach for quantum compilation that may be relevant to the QIR optimization pipeline.

We have been developing PSF-Zero, a Rust-based geometric preprocessing layer designed to reduce instability and combinatorial explosion before standard transpilation.

Instead of relying purely on heuristic peephole or search-based optimization (which can become unstable at scale), this approach represents local SU(4) blocks in a normalized geometric space using exact Cartan/KAK decomposition. The goal is to reshape circuit structure into compact, canonical forms before they reach downstream optimization and backend-specific lowering stages.

In our current prototype, this operates as a lightweight frontend transformation pass.

Key observations from our experiments:

Reduced search overhead:
Acts as a fast macro-structure normalization step, significantly reducing the need for heuristic search in downstream optimizers.

Improved scaling behavior:
By avoiding global search over circuit structure, the method shows near-linear or constant-like scaling behavior per block in our experiments, including large-scale (up to ~1000-qubit) dense circuit tests without memory/CPU issues.

Structured canonicalization:
Local 2-qubit interactions are transformed into standardized SU(4) canonical forms, which may simplify routing, synthesis, and hardware mapping.

Hardware-agnostic output:
Produces compact entangling representations that can be further lowered efficiently into backend-specific gate sets.

We are particularly interested in whether a geometry-first preprocessing pass like this could:

  • Integrate as a transformation at the QIR level (before or within optimization passes)
  • Improve determinism or stability in deep-circuit compilation flows
  • Complement or reduce reliance on heuristic-heavy optimization stages

I’m curious if similar geometric or analytical preprocessing strategies have been explored within QIR or Q# compilation pipelines.

Would the core team be open to discussing whether this approach could be evaluated against existing optimization passes or benchmarking pipelines?

Repo:
https://github.com/TN-Holdings-LLC/psf-zero

Happy to share detailed benchmarks, run comparative experiments, or adapt the prototype to better align with QIR integration requirements.

Looking forward to any feedback, critique, or pointers to related work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions