*=
Symbol of Qbit.
Overloads
| Name | Description |
|---|---|
(Qbit lhs *= const complex coefficient) -> Qbit | Multiplies the Qbit coefficient by a complex value in place. |
(Qbit lhs *= const bool coefficient) -> Qbit | Multiplies the Qbit coefficient by a bool (converted to complex) value in place. |
(Qbit lhs *= const real coefficient) -> Qbit | Multiplies the Qbit coefficient by a real (converted to complex) value in place. |
(Qbit lhs *= const integer coefficient) -> Qbit | Multiplies the Qbit coefficient by a integer (converted to complex) value in place. |
(Qbit lhs *= const complex coefficient) -> Qbit
Multiplies the Qbit coefficient by a complex value in place.
Parameters
- lhs: Left-hand side value.
- coefficient: The coefficient that multiplies the qubit product state.
Example
var q = Qbit(4); q *= 2.0 + 5.0i // Returns (2 + 5i)|0000>
(Qbit lhs *= const bool coefficient) -> Qbit
Multiplies the Qbit coefficient by a bool (converted to complex) value in place.
Parameters
- lhs: Left-hand side value.
- coefficient: The coefficient that multiplies the qubit product state.
Example
var q = Qbit(4); q *= true // Returns (1 + 0i)|0000>
(Qbit lhs *= const real coefficient) -> Qbit
Multiplies the Qbit coefficient by a real (converted to complex) value in place.
Parameters
- lhs: Left-hand side value.
- coefficient: The coefficient that multiplies the qubit product state.
Example
var q = Qbit(4); q *= 2.0 // Returns (2 + 0i)|0000>
(Qbit lhs *= const integer coefficient) -> Qbit
Multiplies the Qbit coefficient by a integer (converted to complex) value in place.
Parameters
- lhs: Left-hand side value.
- coefficient: The coefficient that multiplies the qubit product state.
Example
var q = Qbit(4); q *= 3 // Returns (3 + 0i)|0000>