DumpOperation operation
Fully qualified name: Std.Diagnostics.DumpOperation
operation DumpOperation(nQubits : Int, op : (Qubit[] => Unit is Adj)) : Unit
Given an operation, dumps the matrix representation of the operation action on the given number of qubits.
The number of qubits on which the given operation acts.
The operation that is to be diagnosed.
When run on the sparse-state simulator, the following snippet
will output the matrix
operation DumpH() : Unit {
DumpOperation(1, qs => H(qs[0]));
}
Calling this operation has no observable effect from within Q#.
Note that if DumpOperation
is called when there are other qubits allocated,
the matrix displayed may reflect any global phase that has accumulated from operations
on those other qubits.