Skip to content

Enhance ZX simplification algorithms for multi-control gate validation #1429

@coderabbitai

Description

@coderabbitai

Background

As discussed in PR #1380 (#1380 (comment)), the current tests for multi-control gates (MCX, MCZ, MCRZ, CCZ, CRZ) serve as placeholders until the ZX simplification algorithms are properly updated.

Current State

The existing tests verify that multi-control gates transform to ZX diagrams and that concatenating a gate with its inverse yields identity. However, they don't fully validate the correctness of the ZX construction against known decompositions.

Objectives

  • Enhance ZX simplification algorithms to properly handle multi-control gate decompositions
  • Update corresponding tests to validate multi-control gates against known decompositions (e.g., H-MCZ-H for MCX)
  • Ensure the ZX functionality construction is correctly implemented for all multi-control variants

Related Work

  • PR Add multi-control functionality #1380 introduced initial multi-control functionality
  • Tests affected: MultiControlX, MultiControlZ, CCZ, CRZ, MultiCZ, MultiControlRZ, and related variants

Requested by: @keefehuang

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions