ApplyPauli operation

Namespace: Microsoft.Quantum.Canon

Package: Microsoft.Quantum.Standard

Given a multi-qubit Pauli operator, applies the corresponding operation to a register.

operation ApplyPauli (pauli : Pauli[], target : Qubit[]) : Unit is Adj + Ctl

Input

pauli : Pauli[]

A multi-qubit Pauli operator represented as an array of single-qubit Pauli operators.

target : Qubit[]

Register to apply the given Pauli operation on.

Output : Unit

Example

The following are equivalent:

ApplyPauli([PauliY, PauliZ, PauliX], target);

and

Y(target[0]);
Z(target[1]);
X(target[2]);