BoundCA function

Given an array of operations acting on a single input, produces a new operation that performs each given operation in sequence. The modifier CA indicates that all operations in the array are adjointable and controllable.

function BoundCA (operations : ('T => Unit is Adj + Ctl)[]) : ('T => Unit is Adj + Ctl)

Type Parameters

'T

The target on which each of the operations in the array act.

Input

operations

A sequence of operations to be performed on a given input.

Functors
Adjoint Controlled

Input: 'T

Output: Unit

Output

A new operation that performs each given operation in sequence on its input.

Functors
Adjoint Controlled

Input: 'T

Output: Unit

Examples

The following are equivalent:

let bound = BoundCA([U, V]);
bound(x);

and

U(x); V(x);

See also

  • microsoft.quantum.canon.bound