LocallyOptimizableUnitary
- class LocallyOptimizableUnitary[source]
Bases:
Unitary
A locally optimizable unitary-valued function.
A locally optimizable unitary-valued function is one that can be optimized with respect to a fixed environment. A LocallyOptimizableUnitary inherits from Unitary and additionally exposes the
optimize()
abstract method.Attributes
The matrix dimension for this unitary.
The number of real parameters this unitary-valued function takes.
The number of qudits this unitary can act on.
The number of orthogonal states for each qudit.
Methods
check_env_matrix
(env_matrix)Check to ensure the env_matrix is validly shaped.
check_parameters
(params)Check parameters are valid and match the unitary.
get_unitary
([params])Map real-valued params to a UnitaryMatrix.
Return true if this unitary doesn't take parameters.
Return true if this unitary is parameterized.
Return true if this unitary can only act on qubits.
is_qudit_only
(radix)Return true if this unitary can only act on radix-qudits.
Return true if this unitary can only act on qutrits.
is_self_inverse
([params])Checks whether the unitary is its own inverse.
optimize
(env_matrix)Return the optimal parameters with respect to an environment matrix.