ApplySeriesOfOpsA operation

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.Canon

Package: Microsoft.Quantum.Standard

Applies a list of ops and their targets sequentially on an array. (Adjoint)

operation ApplySeriesOfOpsA<'T> (listOfOps : ('T[] => Unit is Adj)[], targets : Int[][], register : 'T[]) : Unit is Adj

Input

listOfOps : 'T[] => Unit is Adj[]

List of ops, each taking a 'T array, to be applied. They are applied sequentially, lowest index first. Each must have an adjoint functor

targets : Int[][]

Nested arrays describing the targets of the op. Each array should contain a list of ints describing the indices to be used.

register : 'T[]

Qubit register to be acted upon.

Output : Unit

Type Parameters

'T

Example

// The following applies Exp([PauliX, PauliY], 0.5) to qubits 0, 1 // then X to qubit 2 let ops = [Exp([PauliX, PauliY], 0.5, _), ApplyToFirstQubitA(X, _)]; let indices = [[0, 1], [2]]; ApplySeriesOfOpsA(ops, indices, qubitArray);

See Also