# cirq.block_diag¶

cirq.block_diag(*blocks: numpy.ndarray) → numpy.ndarray[source]

Concatenates blocks into a block diagonal matrix.

Parameters

*blocks – Square matrices to place along the diagonal of the result.

Returns

A block diagonal matrix with the given blocks along its diagonal.

Raises

ValueError – A block isn’t square.