uid | title | ms.date | ms.topic | qsharp.kind | qsharp.namespace | qsharp.name | qsharp.summary |
---|---|---|---|---|---|---|---|
Microsoft.Quantum.Simulation.MultiplyGeneratorIndex |
MultiplyGeneratorIndex function |
7/28/2023 12:00:00 AM |
managed-reference |
function |
Microsoft.Quantum.Simulation |
MultiplyGeneratorIndex |
Multiplies the coefficient in a `GeneratorIndex`. |
Warning
This documentation refers to the Classic QDK, which has been replaced by the Modern QDK.
Please see https://aka.ms/qdk.api for the API documentation for the Modern QDK.
Namespace: Microsoft.Quantum.Simulation
Package: Microsoft.Quantum.Standard
Multiplies the coefficient in a GeneratorIndex
.
function MultiplyGeneratorIndex (multiplier : Double, generatorIndex : Microsoft.Quantum.Simulation.GeneratorIndex) : Microsoft.Quantum.Simulation.GeneratorIndex
The multiplier on the coefficient.
The GeneratorIndex
to be multiplied.
A GeneratorIndex
representing a term with coefficient a factor
multiplier
larger.
let gen = GeneratorIndex(([1,2,3],[coeff]),[1,2,3]);
let ((idxPaulis, idxDoubles), idxQubits) = MultiplyGeneratorIndex(multiplier, gen);
// idxDoubles[0] == multiplier * coeff;
- Microsoft.Quantum.Simulation.GeneratorIndex