Skip to content

Latest commit

 

History

History
59 lines (37 loc) · 1.69 KB

microsoft.quantum.simulation.multiplygeneratorindex.md

File metadata and controls

59 lines (37 loc) · 1.69 KB
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`.

MultiplyGeneratorIndex function

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

Input

multiplier : Double

The multiplier on the coefficient.

generatorIndex : GeneratorIndex

The GeneratorIndex to be multiplied.

Output : GeneratorIndex

A GeneratorIndex representing a term with coefficient a factor multiplier larger.

Example

let gen = GeneratorIndex(([1,2,3],[coeff]),[1,2,3]);
let ((idxPaulis, idxDoubles), idxQubits) = MultiplyGeneratorIndex(multiplier, gen);
// idxDoubles[0] == multiplier * coeff;

See Also

  • Microsoft.Quantum.Simulation.GeneratorIndex