EmbedPauli function
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 and the index of a qubit,
returns a multi-qubit Pauli operator with the given single-qubit
operator at that index and PauliI
at every other index.
function EmbedPauli (pauli : Pauli, location : Int, n : Int) : Pauli[]
Input
pauli : Pauli
A single-qubit Pauli operator to be placed at the given location.
location : Int
An index such that output[location] == pauli
, where output
is
the output of this function.
n : Int
Length of the array to be returned.
Output : Pauli[]
Example
To obtain the array [PauliI, PauliI, PauliX, PauliI]
:
EmbedPauli(PauliX, 2, 3);
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for