BoolArrayAsPauli 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.Convert
Package: Microsoft.Quantum.Standard
Given a bit string, returns a multi-qubit Pauli operator represented as an array of single-qubit Pauli operators.
function BoolArrayAsPauli (pauli : Pauli, bitApply : Bool, bits : Bool[]) : Pauli[]
Input
pauli : Pauli
Pauli operator to apply to qubits where bitsApply == bits[idx]
.
bitApply : Bool
apply Pauli if bit is this value.
bits : Bool[]
Boolean array.
Output : Pauli[]
Remarks
The Boolean array and the quantum register must be of equal length.
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