# program_unitary¶

pyquil.unitary_tools.program_unitary(program, n_qubits)[source]

Return the unitary of a pyQuil program.

Parameters

program (Program) – A program consisting only of Gate.:

Return type

ndarray

Returns

a unitary corresponding to the composition of the program’s gates.