Many typical matrix operations can also be performed on gate matrices, such as obtaining entries, number of rows and columns, transpose, and vertical or horizontal concatenation.
|
|
|
Rows or entries can be accessed with _ or #:
|
|
|
|
|
|
|
The determinant of a gate matrix is a DetGate:
|
|
The native method substitute has also been overloaded to work with gate matrices: the input should be a list of options of the form "A => B" where A is an InputGate and B is a Gate; and the output is another GateMatrix.