ApplyP 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 single-qubit Pauli operator, applies the corresponding operation to a single qubit.

operation ApplyP (pauli : Pauli, target : Qubit) : Unit is Adj + Ctl

Input

pauli : Pauli

The Pauli operator to be applied.

target : Qubit

The qubit to which pauli is to be applied as an operation.

Output : Unit

Example

The following are equivalent:

ApplyP(PauliX, q);

and

X(q);