Module qdk_sim::linalg [−][src]
Expand description
Provides common linear algebra functions and traits.
Traits
Represent types that can be conjugated by 2-dimensional arrays; that is, as $UXU^{\dagger}$.
Represents types that have hermitian conjugates (e.g.: $A^\dagger$ for a matrix $A$ is defined as the complex conjugate transpose of $A$, $(A^\dagger)_{ij} = A_{ji}^*$).
The tensor product operator ($\otimes$).
Represents types for which the trace can be computed.
Functions
Given an array representing an operator acting on single-qubit states, returns a new operator that acts on $n$-qubit states.
Given a view of an array representing a matrix acting on two-qubit states, extends that array to act on $n$ qubits.
Given a two-index array (i.e.: a matrix) of dimensions 2^n × 2^n for some n, permutes the left and right indices of the matrix. Used to represent, for example, swapping qubits in a register.
Returns a new array of the same type and shape as a given array, but containing only zeros.