decompose#
Decompose the unitary matrix
Classes
|
This class is to decompose a unitary matrix into the Clements/Reck architecture. |
- class UnitaryDecomposer(unitary: ndarray | Tensor, method: str = 'cssr')[source]#
Bases:
objectThis class is to decompose a unitary matrix into the Clements/Reck architecture.
- Parameters:
unitary (ndarray | Tensor) – The unitary matrix to be decomposed.
method (str) – The decomposition method, only 16 values (
'rssr','rsdr','rdsr','rddr','rssl','rsdl','rdsl','rddl','cssr','csdr','cdsr','cddr','cssl','csdl','cdsl','cddl') are valid. The first char denotes the Clements or Reck architecture. The second char denotes single or double arms of outer phase shifters. The third char denotes single or double arms of inner phase shifters. The last char denotes the position of a column of phase shifters, i.e.,'l'for left and'r'for right. Default:'cssr'