*
Symbol of Operator.
Overloads
| Name | Description |
|---|---|
(const Operator lhs * const Operator rhs) -> Operator | Multiplies two operators together, creating a product operator. |
(const Operator lhs * const OperatorNamed rhs) -> Operator | Multiplies a general Operator with an OperatorNamed to create an OperatorProduct. |
(const Operator lhs * StateVector rhs) -> StateVector | Applies an operator to a state vector. |
(const Operator lhs * BasisState rhs) -> BasisState | Applies an operator to a basis state. |
(const Operator lhs * const RealMatrix rhs) -> RealMatrix | Out-of-place Operator-vector product operator. |
(const Operator lhs * const ComplexMatrix rhs) -> ComplexMatrix | Out-of-place Operator-vector product operator. |
(const Operator lhs * const RealSparseMatrix rhs) -> RealSparseMatrix | Out-of-place Operator-vector product operator. |
(const Operator lhs * const ComplexSparseMatrix rhs) -> ComplexSparseMatrix | Out-of-place Operator-vector product operator. |
(const Operator lhs * const complex rhs) -> Operator | Multiplies an operator by complex scalar. |
(const Operator lhs * const integer rhs) -> Operator | Multiplies an operator by integer scalar. |
(const Operator lhs * const real rhs) -> Operator | Multiplies an operator by real scalar. |
(const Operator lhs * const Operator rhs) -> Operator
Multiplies two operators together, creating a product operator.
Parameters
- lhs: Left-hand side value.
- rhs: The second operator in the product.
Returns
A unique pointer to the resulting product operator.
Example
var prod1 = X(0) * Y(0) // OperatorProduct of X(0) and Y(0)
var prod2 = X(0) * X(1) // OperatorProduct of X(0) and X(1)
var prod3 = Z(0) * X(0) // OperatorProduct of Z(0) and X(0)
(const Operator lhs * const OperatorNamed rhs) -> Operator
Multiplies a general Operator with an OperatorNamed to create an OperatorProduct.
Parameters
- lhs: Left-hand side value.
- rhs: The right-hand side OperatorNamed operand.
(const Operator lhs * StateVector rhs) -> StateVector
Applies an operator to a state vector.
Parameters
- lhs: Left-hand side value.
- rhs: The qubit state to be modified.
Returns
The modified qubit state.
(const Operator lhs * BasisState rhs) -> BasisState
Applies an operator to a basis state.
Parameters
- lhs: Left-hand side value.
- rhs: The qubit state to be modified.
Returns
The modified qubit state.
(const Operator lhs * const RealMatrix rhs) -> RealMatrix
Out-of-place Operator-vector product operator.
Parameters
- lhs: Left-hand side value.
- rhs: The vector to modify.
(const Operator lhs * const ComplexMatrix rhs) -> ComplexMatrix
Out-of-place Operator-vector product operator.
Parameters
- lhs: Left-hand side value.
- rhs: The vector to modify.
(const Operator lhs * const RealSparseMatrix rhs) -> RealSparseMatrix
Out-of-place Operator-vector product operator.
Parameters
- lhs: Left-hand side value.
- rhs: The vector to modify.
(const Operator lhs * const ComplexSparseMatrix rhs) -> ComplexSparseMatrix
Out-of-place Operator-vector product operator.
Parameters
- lhs: Left-hand side value.
- rhs: The vector to modify.
(const Operator lhs * const complex rhs) -> Operator
Multiplies an operator by complex scalar.
Parameters
- lhs: Left-hand side value.
- rhs: The scalar value.
(const Operator lhs * const integer rhs) -> Operator
Multiplies an operator by integer scalar.
Parameters
- lhs: Left-hand side value.
- rhs: The scalar value.
(const Operator lhs * const real rhs) -> Operator
Multiplies an operator by real scalar.
Parameters
- lhs: Left-hand side value.
- rhs: The scalar value.