ket.qulib.math¶
Quantum arithmetic operations for quantum states.
Functions ket.qulib.math¶
| 
 | Add two quantum states or a quantum state and an integer. | 
| 
 | Multiply two quantum states. | 
| 
 | Set the state of a quantum register. | 
- addi(lhs: Quant, rhs: Quant | int, multiplier: int = 1)¶
- Add two quantum states or a quantum state and an integer. - The result is stored in the left-hand side quantum state. - The multiplier is used to scale the right-hand side. - Parameters:
- lhs – Left-hand side quantum state. 
- rhs – Right-hand side quantum state or integer to add. 
- multiplier – Multiplier for the addition (default is 1).