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, MProcess) -> MProcess
(MProcess, Gate) -> MProcess
(MProcess, MProcess) -> MProcess
(Gate, State) -> State
(Gate, StateEnsemble) -> StateEnsemble
(MProcess, State) -> State or StateEnsemble
(Mprocess, StateEnsemble) -> StateEnsemble
(Povm, Gate) -> Povm
(Povm, MProcess) -> Povm
(Povm, State) -> MultinomialDistribution
(Povm, StateEnsemble) -> List[MultinomialDistribution]
list conststs of these combinations
- Returns
composition of qoperations.
- Return type
Union[Gate, Povm, State, List[float], MProcess, StateEnsemble, MultinomialDistribution]
- Raises
TypeError – Unsupported type combination.
- tensor_product(*elements)[source]
calculates tensor product of
elements.this function can calculate tensor product of the following combinations of types:
(Gate, Gate) -> Gate
(Gate, MProcess) -> MProcess
(MProcess, Gate) -> MProcess
(MProcess, MProcess) -> MProcess
(MatrixBasis, MatrixBasis) -> MatrixBasis
(State, State) -> State
(State, StateEnsemble) -> StateEnsemble
(StateEnsemble, State) -> StateEnsemble
(StateEnsemble, StateEnsemble) -> StateEnsemble
(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.