ApplyPauli 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

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]);