unitaria.AbstractNode¶
- class unitaria.AbstractNode(dimension_in: int, dimension_out: int, compute: Callable[[ndarray], ndarray], compute_adjoint: Callable[[ndarray], ndarray], normalization: float | None = None)[source]¶
Bases:
NodeAbstract node without circuit implemention.
This node is meant for the purpose of prototyping or testing. Using
subspace_in,subspace_out,normalization, orcircuiton this node or any of this parents will likely raise an error.You may alternatively use the nodes
Constant...to represent classical objects, since these at least have an inefficient circuit implementation.- Parameters:
dimension_in – The dimension of the input to the matrix or 1 if the node should represent a vector.
dimension_out – The dimension of the vector or the output of the matrix.
compute – Implementation of
Node.compute.compute_adjoint – Implementation of
Node.compute_adjoint.normalization – If given, the node will pretend to have this normalizaton. It does not check that the normalization is larger than the spectral norm of the encoded matrix.