Circuit Identities

Controlled Hadamard Without CH

Difficulty: Easy ★

H is a Z rotated by 45 degrees around the Y axis. Use that to turn a controlled-Z into a controlled-Hadamard.

Objective

Return a two-qubit circuit equal to CH with control q0 and target q1.

Constraints

  • Allowed gates: ry, cx, cz.

Entry Point

build_controlled_hadamard

Checks

  • Exports build_controlled_hadamard().
  • The unitary equals CH(0, 1) up to global phase.

Your Code

Outputpending

Execution results will appear here.