quara.objects.operators module¶
- compose_qoperations(*elements)[source]¶
calculates composition of qoperations.
this function can calculate composition of the following combinations of types:
(Gate, Gate) -> Gate
(Gate, State) -> State
(Povm, Gate) -> Povm
(Povm, State) -> List[np.ndarray] dtype=np.float64(probability distribution)
list conststs of these combinations
- tensor_product(*elements)[source]¶
calculates tensor product of
elements.this function can calculate tensor product of the following combinations of types:
(Gate, Gate) -> Gate
(MatrixBasis, MatrixBasis) -> MatrixBasis
(State, State) -> State
(Povm, Povm) -> Povm
list conststs of these combinations
- Returns
tensor product of
elements- Return type
Union[MatrixBasis, State, Povm, Gate]
- Raises
TypeError – Unsupported type combination.