Microsoft.Quantum.Canon

Operations

AndLadder operation

Performs a controlled "AND ladder" on a register of target qubits.

ApplyAnd operation

Inverts a given target qubit if and only if both control qubits are in the 1 state, using measurement to perform the adjoint operation.

ApplyAndChain operation

Computes a chain of AND gates

ApplyBound operation
ApplyBoundA operation
ApplyBoundC operation
ApplyBoundCA operation
ApplyCCNOTChain operation

Implements a cascade of CCNOT gates controlled on corresponding bits of two qubit registers, acting on the next qubit of one of the registers. Starting from the qubits at position 0 in both registers as controls, CCNOT is applied to the qubit at position 1 of the target register, then controlled by the qubits at position 1 acting on the qubit at position 2 in the target register, etc., ending with an action on the target qubit in position Length(nQubits)-1.

ApplyCNOTChain operation

Computes the parity of a register of qubits in-place.

ApplyCNOTChainWithTarget operation

Computes the parity of an array of qubits into a target qubit.

ApplyControlledOnBitString operation

Applies a unitary operation on the target register, controlled on a a state specified by a given bit mask.

ApplyControlledOnInt operation

Applies a unitary operation on the target register if the control register state corresponds to a specified positive integer.

ApplyCurriedOp operation
ApplyCurriedOpA operation
ApplyCurriedOpC operation
ApplyCurriedOpCA operation
ApplyDiagonalUnitary operation

Applies an array of complex phases to numeric basis states of a register of qubits.

ApplyFermionicSWAP operation

Applies the Fermionic SWAP.

ApplyIf operation

Applies an operation conditioned on a classical bit.

ApplyIfA operation

Applies a adjointable operation conditioned on a classical bit.

ApplyIfC operation

Applies a controllable operation conditioned on a classical bit.

ApplyIfCA operation

Applies a unitary operation conditioned on a classical bit.

ApplyIfElseB operation

Applies one of two operations, depending on the value of a classical bit.

ApplyIfElseBA operation

Applies one of two adjointable operations, depending on the value of a classical bit.

ApplyIfElseBC operation

Applies one of two controllable operations, depending on the value of a classical bit.

ApplyIfElseBCA operation

Applies one of two unitary operations, depending on the value of a classical bit.

ApplyIfElseR operation

Applies one of two operations, depending on the value of a classical result.

ApplyIfElseRA operation

Applies one of two adjointable operations, depending on the value of a classical result.

ApplyIfElseRC operation

Applies one of two controllable operations, depending on the value of a classical result.

ApplyIfElseRCA operation

Applies one of two unitary operations, depending on the value of a classical result.

ApplyIfOne operation

Applies an operation conditioned on a classical result value being one.

ApplyIfOneA operation

Applies an adjointable operation conditioned on a classical result value being one.

ApplyIfOneC operation

Applies a controllable operation conditioned on a classical result value being one.

ApplyIfOneCA operation

Applies a unitary operation conditioned on a classical result value being one.

ApplyIfZero operation

Applies an operation conditioned on a classical result value being zero.

ApplyIfZeroA operation

Applies an adjointable operation conditioned on a classical result value being zero.

ApplyIfZeroC operation

Applies a controllable operation conditioned on a classical result value being zero.

ApplyIfZeroCA operation

Applies a unitary operation conditioned on a classical result value being zero.

ApplyLowDepthAnd operation

Inverts a given target qubit if and only if both control qubits are in the 1 state, with T-depth 1, using measurement to perform the adjoint operation.

ApplyMultiControlledC operation

Applies a multiply controlled version of a singly controlled operation. The modifier C indicates that the single-qubit operation is controllable.

ApplyMultiControlledCA operation

Applies a multiply controlled version of a singly controlled operation. The modifier CA indicates that the single-qubit operation is controllable and adjointable.

ApplyMultiplyControlledAnd operation

Implements a multiple-controlled Toffoli gate, assuming that target qubit is initialized 0. The adjoint operation assumes that the target qubit will be reset to 0.

ApplyMultiplyControlledLowDepthAnd operation

Implements a multiple-controlled Toffoli gate, assuming that target qubit is initialized 0. The adjoint operation assumes that the target qubit will be reset to 0. Requires a Rz depth of 1, while the number of helper qubits are exponential in the number of qubits.

ApplyOpRepeatedlyOver operation

Applies the same op over a qubit register multiple times.

ApplyOpRepeatedlyOverA operation

Applies the same op over a qubit register multiple times.

ApplyOpRepeatedlyOverC operation

Applies the same op over a qubit register multiple times.

ApplyOpRepeatedlyOverCA operation

Applies the same op over a qubit register multiple times.

ApplyOperationRepeatedly operation
ApplyOperationRepeatedlyA operation
ApplyOperationRepeatedlyC operation
ApplyOperationRepeatedlyCA operation
ApplyPauli operation

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

ApplyPauliFromBitString operation

Applies a Pauli operator on each qubit in an array if the corresponding bit of a Boolean array matches a given input.

ApplyQuantumFourierTransform operation

Performs the Quantum Fourier Transform on a quantum register containing an integer in the little-endian representation.

ApplyQuantumFourierTransformBE operation

Performs the Quantum Fourier Transform on a quantum register containing an integer in the big-endian representation.

ApplyReversedOpBigEndianA operation

Warning

ApplyReversedOpBigEndianA has been deprecated. Please use ApplyReversedOpBEA operation instead.

Please use ApplyReversedOpBEA operation.

ApplyReversedOpBigEndianC operation

Warning

ApplyReversedOpBigEndianC has been deprecated. Please use ApplyReversedOpBEC operation instead.

Please use ApplyReversedOpBEC operation.

ApplyReversedOpBigEndianCA operation

Warning

ApplyReversedOpBigEndianCA has been deprecated. Please use ApplyReversedOpBECA operation instead.

Please use ApplyReversedOpBEC operation.

ApplyReversedOpLittleEndianA operation

Warning

ApplyReversedOpLittleEndianA has been deprecated. Please use ApplyReversedOpLEA operation instead.

Please use ApplyReversedOpLEA operation.

ApplyReversedOpLittleEndianC operation

Warning

ApplyReversedOpLittleEndianC has been deprecated. Please use ApplyReversedOpLEC operation instead.

Please use ApplyReversedOpLEC operation.

ApplyReversedOpLittleEndianCA operation

Warning

ApplyReversedOpLittleEndianCA has been deprecated. Please use ApplyReversedOpLECA operation instead.

Please use ApplyReversedOpLEC operation.

ApplyRippleCarryComparatorLE operation

Warning

ApplyRippleCarryComparatorLE has been deprecated. Please use CompareUsingRippleCarry operation instead.

Please use CompareUsingRippleCarry operation.

ApplySeriesOfOps operation

Applies a list of ops and their targets sequentially on an array.

ApplySeriesOfOpsA operation

Applies a list of ops and their targets sequentially on an array. (Adjoint)

ApplySeriesOfOpsC operation

Applies a list of ops and their targets sequentially on an array. (Controlled)

ApplySeriesOfOpsCA operation

Applies a list of ops and their targets sequentially on an array. (Adjoint + Controlled)

ApplyToEach operation

Applies a single-qubit operation to each element in a register.

ApplyToEachA operation

Applies a single-qubit operation to each element in a register. The modifier A indicates that the single-qubit operation is adjointable.

ApplyToEachC operation

Applies a single-qubit operation to each element in a register. The modifier C indicates that the single-qubit operation is controllable.

ApplyToEachCA operation

Applies a single-qubit operation to each element in a register. The modifier CA indicates that the single-qubit operation is controllable and adjointable.

ApplyToEachIndex operation

Applies a single-qubit operation to each indexed element in a register.

ApplyToEachIndexA operation

Applies a single-qubit operation to each indexed element in a register. The modifier A indicates that the single-qubit operation is adjointable.

ApplyToEachIndexC operation

Applies a single-qubit operation to each indexed element in a register. The modifier C indicates that the single-qubit operation is controllable.

ApplyToEachIndexCA operation

Applies a single-qubit operation to each indexed element in a register. The modifier CA indicates that the single-qubit operation is adjointable and controllable.

ApplyToElement operation

Applies an operation to a given element of an array.

ApplyToElementA operation

Applies an operation to a given element of an array.

ApplyToElementC operation

Applies an operation to a given element of an array.

ApplyToElementCA operation

Applies an operation to a given element of an array.

ApplyToFirstQubit operation

Applies an operation to the first qubit in the register.

ApplyToFirstQubitA operation

Applies an operation to the first qubit in the register. The modifier A indicates that the operation is adjointable.

ApplyToFirstQubitC operation

Applies operation op to the first qubit in the register. The modifier C indicates that the operation is controllable.

ApplyToFirstQubitCA operation

Applies operation op to the first qubit in the register. The modifier CA indicates that the operation is controllable and adjointable.

ApplyToFirstThreeQubits operation

Applies an operation to the first three qubits in the register.

ApplyToFirstThreeQubitsA operation

Applies an operation to the first three qubits in the register. The modifier A indicates that the operation is adjointable.

ApplyToFirstThreeQubitsC operation

Applies an operation to the first three qubits in the register. The modifier C indicates that the operation is controllable.

ApplyToFirstThreeQubitsCA operation

Applies an operation to the first three qubits in the register. The modifier CA indicates that the operation is controllable and adjointable.

ApplyToFirstTwoQubits operation

Applies an operation to the first two qubits in the register.

ApplyToFirstTwoQubitsA operation

Applies an operation to the first two qubits in the register. The modifier A indicates that the operation is adjointable.

ApplyToFirstTwoQubitsC operation

Applies an operation to the first two qubits in the register. The modifier C indicates that the operation is controllable.

ApplyToFirstTwoQubitsCA operation

Applies an operation to the first two qubits in the register. The modifier CA indicates that the operation is controllable and adjointable.

ApplyToHead operation

Applies an operation to the first element of an array.

ApplyToHeadA operation

Applies an operation to the first element of an array.

ApplyToHeadC operation

Applies an operation to the first element of an array.

ApplyToHeadCA operation

Applies an operation to the first element of an array.

ApplyToMost operation

Applies an operation to all but the last element of an array.

ApplyToMostA operation

Applies an operation to all but the last element of an array.

ApplyToMostC operation

Applies an operation to all but the last element of an array.

ApplyToMostCA operation

Applies an operation to all but the last element of an array.

ApplyToPartition operation

Applies a pair of operations to a given partition of a register into two parts.

ApplyToPartitionA operation

Applies a pair of operations to a given partition of a register into two parts. The modifier A indicates that the operation is adjointable.

ApplyToPartitionC operation

Applies a pair of operations to a given partition of a register into two parts. The modifier C indicates that the operation is controllable.

ApplyToPartitionCA operation

Applies a pair of operations to a given partition of a register into two parts. The modifier CA indicates that the operation is controllable and adjointable.

ApplyToRest operation

Applies an operation to all but the first element of an array.

ApplyToRestA operation

Applies an operation to all but the first element of an array.

ApplyToRestC operation

Applies an operation to all but the first element of an array.

ApplyToRestCA operation

Applies an operation to all but the first element of an array.

ApplyToSubregister operation

Applies an operation to a subregister of a register, with qubits specified by an array of their indices.

ApplyToSubregisterA operation

Applies an operation to a subregister of a register, with qubits specified by an array of their indices. The modifier A indicates that the operation is adjointable.

ApplyToSubregisterC operation

Applies an operation to a subregister of a register, with qubits specified by an array of their indices. The modifier C indicates that the operation is controllable.

ApplyToSubregisterCA operation

Applies an operation to a subregister of a register, with qubits specified by an array of their indices. The modifier CA indicates that the operation is controllable and adjointable.

ApplyToTail operation

Applies an operation to the last element of an array.

ApplyToTailA operation

Applies an operation to the last element of an array.

ApplyToTailC operation

Applies an operation to the last element of an array.

ApplyToTailCA operation

Applies an operation to the last element of an array.

ApplyWith operation

Given two operations, applies one as conjugated with the other.

ApplyWithA operation

Given two operations, applies one as conjugated with the other.

ApplyWithC operation

Given two operations, applies one as conjugated with the other.

ApplyWithCA operation

Given two operations, applies one as conjugated with the other.

ApplyWithInputTransformation operation

Given an operation that accepts some input, a function that returns an output compatible with that operation, and an input to that function, applies the operation using the function to transform the input to a form expected by the operation.

ApplyWithInputTransformationA operation

Given an operation that accepts some input, a function that returns an output compatible with that operation, and an input to that function, applies the operation using the function to transform the input to a form expected by the operation.

ApplyWithInputTransformationC operation

Given an operation that accepts some input, a function that returns an output compatible with that operation, and an input to that function, applies the operation using the function to transform the input to a form expected by the operation.

ApplyWithInputTransformationCA operation

Given an operation that accepts some input, a function that returns an output compatible with that operation, and an input to that function, applies the operation using the function to transform the input to a form expected by the operation.

ApproximateQFT operation

Apply the Approximate Quantum Fourier Transform (AQFT) to a quantum register.

ApproximatelyApplyDiagonalUnitary operation

Applies an array of complex phases to numeric basis states of a register of qubits, truncating small rotation angles according to a given tolerance.

ApproximatelyMultiplexPauli operation

Applies a Pauli rotation conditioned on an array of qubits, truncating small rotation angles according to a given tolerance.

ApproximatelyMultiplexZ operation

Applies a Pauli Z rotation conditioned on an array of qubits, truncating small rotation angles according to a given tolerance.

AssertHighestBit operation

Warning

AssertHighestBit has been deprecated. Please use AssertMostSignificantBit operation instead.

Please use AssertMostSignificantBit operation.

AssertLessThanPhaseLE operation

Warning

AssertLessThanPhaseLE has been deprecated. Please use AssertPhaseLessThan operation instead.

Please use AssertPhaseLessThan operation.

AssertPhase operation

Warning

AssertPhase has been deprecated. Please use AssertPhase operation instead.

CNOTChain operation

Warning

CNOTChain has been deprecated. Please use ApplyCNOTChain operation instead.

CNOTChainTarget operation

Warning

CNOTChainTarget has been deprecated. Please use ApplyCNOTChainWithTarget operation instead.

CX operation

Applies the controlled-X (CX) gate to a pair of qubits. $$ \begin{align} \left(\begin{matrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 \end{matrix}\right) \end{align}, $$ where rows and columns are organized as in the quantum concepts guide.

CY operation

Applies the controlled-Y (CY) gate to a pair of qubits. $$ \begin{align} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & -i \\ 0 & 0 & i & 0 \end{align}, $$ where rows and columns are organized as in the quantum concepts guide.

CZ operation

Applies the controlled-Z (CZ) gate to a pair of qubits. $$ \begin{align} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & -1 \end{align}, $$ where rows and columns are organized as in the quantum concepts guide.

CascadeCCNOT operation

Warning

CascadeCCNOT has been deprecated. Please use ApplyCCNOTChain operation instead.

CascadeCNOT operation

Warning

CascadeCNOT has been deprecated. Please use ApplyCNOTChain operation instead.

Please use @"microsoft.quantum.canon.applycnotchain".

Delay operation

Applies a given operation with a delay.

DelayA operation

Applies a given operation with a delay.

DelayC operation

Applies a given operation with a delay.

DelayCA operation

Applies a given operation with a delay.

HY operation

Applies the Y-basis analog to the Hadamard transformation that interchanges the Z and Y axes. The Y Hadamard transformation $H_Y = S H$ on a single qubit is: \begin{align} H_Y \mathrel{:=} \frac{1}{\sqrt{2}} \begin{bmatrix} 1 & 1 \\ i & -i \end{bmatrix}. \end{align}

InPlaceMajority operation

Warning

InPlaceMajority has been deprecated. Please use ApplyMajorityInPlace operation instead.

Please use @"microsoft.quantum.arithmetic.applymajorityinplace".

InPlaceXorBE operation

Warning

InPlaceXorBE has been deprecated. Please use <xref:ApplyReversedOpLECA(ApplyXorInPlace(value, _), target)> instead.

This operation has been removed.

InPlaceXorLE operation

Warning

InPlaceXorLE has been deprecated. Please use <xref:Microsoft.Quantum.Measurement.ApplyXorInPlace> instead.

Please use @"Microsoft.Quantum.Measurement.ApplyXorInPlace".

IntegerIncrementLE operation

Warning

IntegerIncrementLE has been deprecated. Please use IncrementByInteger operation instead.

Please use IncrementByInteger operation.

IntegerIncrementPhaseLE operation

Warning

IntegerIncrementPhaseLE has been deprecated. Please use IncrementPhaseByInteger operation instead.

Please use IncrementPhaseByInteger operation.

IterateThroughCartesianPower operation

Applies an operation for each index in the Cartesian power of an integer range.

IterateThroughCartesianProduct operation

Applies an operation for each index in the Cartesian product of several ranges.

ModularAddProductLE operation

Warning

ModularAddProductLE has been deprecated. Please use MultiplyAndAddByModularInteger operation instead.

Please use MultiplyAndAddByModularInteger operation.

ModularAddProductPhaseLE operation

Warning

ModularAddProductPhaseLE has been deprecated. Please use MultiplyAndAddPhaseByModularInteger operation instead.

Please use MultiplyAndAddPhaseByModularInteger operation.

ModularIncrementLE operation

Warning

ModularIncrementLE has been deprecated. Please use <xref:Microsoft.Quantum.Arithmetic.ModularIncrementByInteger> instead.

Please use @"Microsoft.Quantum.Arithmetic.ModularIncrementByInteger".

ModularIncrementPhaseLE operation

Warning

ModularIncrementPhaseLE has been deprecated. Please use IncrementPhaseByModularInteger operation instead.

Please use IncrementPhaseByModularInteger operation.

ModularMultiplyByConstantLE operation

Warning

ModularMultiplyByConstantLE has been deprecated. Please use MultiplyByModularInteger operation instead.

Please use MultiplyByModularInteger operation.

MultiplexOperations operation

Applies an array of operations controlled by an array of number states. That is, applies Multiply-controlled unitary operation $U$ that applies a unitary $V_j$ when controlled by $n$-qubit number state $\ket{j}$. $U = \sum^{2^n-1}_{j=0}\ket{j}\bra{j}\otimes V_j$.

MultiplexOperationsBruteForceFromGenerator operation

Applies multiply-controlled unitary operation $U$ that applies a unitary $V_j$ when controlled by n-qubit number state $\ket{j}$. $U = \sum^{N-1}_{j=0}\ket{j}\bra{j}\otimes V_j$.

MultiplexOperationsFromGenerator operation

Applies a multiply-controlled unitary operation $U$ that applies a unitary $V_j$ when controlled by n-qubit number state $\ket{j}$. $U = \sum^{N-1}_{j=0}\ket{j}\bra{j}\otimes V_j$.

MultiplexOperationsFromGeneratorImpl operation

Implementation step of MultiplexOperationsFromGenerator.

MultiplexOperationsWithAuxRegister operation

Implementation step of MultiplexOperations.

MultiplexPauli operation

Applies a Pauli rotation conditioned on an array of qubits.

MultiplexZ operation

Applies a Pauli Z rotation conditioned on an array of qubits.

NoOp operation

Performs the identity operation (no-op) on an argument.

PermuteQubits operation

Permutes qubits by using the SWAP operation.

QFT operation

Performs the Quantum Fourier Transform on a quantum register containing an integer in the big-endian representation.

QFTLE operation

Performs the Quantum Fourier Transform on a quantum register containing an integer in the little-endian representation.

RAll0 operation

Performs a phase shift operation. $R=\boldone-(1-e^{i \phi})\ket{0\cdots 0}\bra{0\cdots 0}$.

RAll1 operation

Performs a phase shift operation. $R=\boldone-(1-e^{i \phi})\ket{1\cdots 1}\bra{1\cdots 1}$.

Repeat operation

Repeats an operation a given number of times.

RepeatA operation

Repeats an operation a given number of times.

RepeatC operation

Repeats an operation a given number of times.

RepeatCA operation

Repeats an operation a given number of times.

SwapReverseRegister operation

Uses SWAP gates to Reversed the order of the qubits in a register.

Trotter1ImplCA operation

Implementation of the first-order Trotter–Suzuki integrator.

Trotter2ImplCA operation

Implementation of the second-order Trotter–Suzuki integrator.

TrotterArbitraryImplCA operation

Recursive implementation of even-order Trotter–Suzuki integrator.

Functions

Angle function

Returns 1, if index has an odd number of 1s and -1, if index has an even number of 1s.

AnyOutsideToleranceCP function
AnyOutsideToleranceD function
ArrangedQubits function

Arrange control, target, and helper qubits according to an index

BigEndianToLittleEndian function

Warning

BigEndianToLittleEndian has been deprecated. Please use BigEndianAsLittleEndian function instead.

Please use BigEndianAsLittleEndian function.

Bound function

Given an array of operations acting on a single input, produces a new operation that performs each given operation in sequence.

BoundA function

Given an array of operations acting on a single input, produces a new operation that performs each given operation in sequence. The modifier A indicates that all operations in the array are adjointable.

BoundC function

Given an array of operations acting on a single input, produces a new operation that performs each given operation in sequence. The modifier C indicates that all operations in the array are controllable.

BoundCA function

Given an array of operations acting on a single input, produces a new operation that performs each given operation in sequence. The modifier CA indicates that all operations in the array are adjointable and controllable.

CControlled function

Given an operation op, returns a new operation which applies the op if a classical control bit is true. If false, nothing happens.

CControlledA function

Given an operation op, returns a new operation which applies the op if a classical control bit is true. If false, nothing happens. The modifier A indicates that the operation is adjointable.

CControlledC function

Given an operation op, returns a new operation which applies the op if a classical control bit is true. If false, nothing happens. The modifier C indicates that the operation is controllable.

CControlledCA function

Given an operation op, returns a new operation which applies the op if a classical control bit is true. If false, nothing happens. The modifier CA indicates that the operation is controllable and adjointable.

Compose function

Returns the composition of two functions.

ComposedOutput function

Returns the output of the composition of inner and outer for a given input.

ConjugatedBy function

Given outer and inner operations, returns a new operation that conjugates the inner operation by the outer operation.

ConjugatedByA function

Given outer and inner operations, returns a new operation that conjugates the inner operation by the outer operation.

ConjugatedByC function

Given outer and inner operations, returns a new operation that conjugates the inner operation by the outer operation.

ConjugatedByCA function

Given outer and inner operations, returns a new operation that conjugates the inner operation by the outer operation.

ControlledOnBitString function

Returns a unitary operation that applies an oracle on the target register if the control register state corresponds to a specified bit mask.

ControlledOnInt function

Returns a unitary operator that applies an oracle on the target register if the control register state corresponds to a specified positive integer.

CurriedOp function

Returns a curried version of an operation on two inputs. That is, given an operation with two inputs, this function applies Curry's isomorphism $f(x, y) \equiv f(x)(y)$ to return an operation of one input which returns an operation of one input.

DecomposeIntoTimeStepsCA function

Warning

DecomposeIntoTimeStepsCA has been deprecated. Please use DecomposedIntoTimeStepsCA function instead.

DecomposedIntoTimeStepsCA function

Returns an operation implementing the Trotter–Suzuki integrator for a given operation.

Delayed function

Returns an operation that applies given operation with given argument.

DelayedA function

Returns an operation that applies given operation with given argument.

DelayedC function

Returns an operation that applies given operation with given argument.

DelayedCA function

Returns an operation that applies given operation with given argument.

EmbedPauli function

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.

Fst function

Given a pair, returns its first element.

GrayCode function

Creates Gray code sequences

HammingWeightI function

Computes the Hamming weight of an integer, i.e., the number of 1s in its binary expansion.

Ignore function

Ignores the output of an operation or function.

IsRangeEmpty function

Returns true if and only if input range is empty.

IsResultOne function

Tests if a given Result value is equal to One.

IsResultZero function

Tests if a given Result value is equal to Zero.

LittleEndianToBigEndian function

Warning

LittleEndianToBigEndian has been deprecated. Please use LittleEndianAsBigEndian function instead.

Please use LittleEndianAsBigEndian function.

MultiplexZCoefficients function

Implementation step of multiply-controlled Z rotations.

MultiplexerBruteForceFromGenerator function

Returns a multiply-controlled unitary operation $U$ that applies a unitary $V_j$ when controlled by n-qubit number state $\ket{j}$. $U = \sum^{2^n-1}_{j=0}\ket{j}\bra{j}\otimes V_j$.

MultiplexerFromGenerator function

Returns a multiply-controlled unitary operation $U$ that applies a unitary $V_j$ when controlled by n-qubit number state $\ket{j}$. $U = \sum^{2^n-1}_{j=0}\ket{j}\bra{j}\otimes V_j$.

OperationPow function

Raises an operation to a power. That is, given an operation representing a gate $U$, returns a new operation $U^m$ for a power $m$.

OperationPowA function

Raises an operation to a power. The modifier A indicates that the operation is adjointable. That is, given an operation representing a gate $U$, returns a new operation $U^m$ for a power $m$.

OperationPowC function

Raises an operation to a power. The modifier C indicates that the operation is controllable. That is, given an operation representing a gate $U$, returns a new operation $U^m$ for a power $m$.

OperationPowCA function

Raises an operation to a power. The modifier A indicates that the operation is controllable and adjointable. That is, given an operation representing a gate $U$, returns a new operation $U^m$ for a power $m$.

RestrictedToSubregister function

Restricts an operation to an array of indices of a register, i.e., a subregister.

RestrictedToSubregisterA function

Restricts an operation to an array of indices of a register, i.e., a subregister. The modifier A indicates that the operation is adjointable.

RestrictedToSubregisterC function

Restricts an operation to an array of indices of a register, i.e., a subregister. The modifier C indicates that the operation is controllable.

RestrictedToSubregisterCA function

Restricts an operation to an array of indices of a register, i.e., a subregister. The modifier CA indicates that the operation is controllable and adjointable.

Snd function

Given a pair, returns its second element.

StackCapacity function

Warning

StackCapacity has been deprecated.

StackLength function

Warning

StackLength has been deprecated.

StackNew function

Warning

StackNew has been deprecated.

StackPeek function

Warning

StackPeek has been deprecated.

StackPop function

Warning

StackPop has been deprecated.

StackPush function

Warning

StackPush has been deprecated.

TransformedOperation function

Given a function and an operation, returns a new operation whose input is transformed by the given function.

TransformedOperationA function

Given a function and an operation, returns a new operation whose input is transformed by the given function.

TransformedOperationC function

Given a function and an operation, returns a new operation whose input is transformed by the given function.

TransformedOperationCA function

Given a function and an operation, returns a new operation whose input is transformed by the given function.

TrotterStepSize function

Computes Trotter step size in recursive implementation of Trotter simulation algorithm.

UncurriedOp function

Given a function which returns operations, returns a new operation which takes both inputs as a tuple.

UncurriedOpA function

Given a function which returns operations, returns a new operation which takes both inputs as a tuple. The modifier A indicates that the operations are adjointable.

UncurriedOpC function

Given a function which returns operations, returns a new operation which takes both inputs as a tuple. The modifier C indicates that the operations are controllable.

UncurriedOpCA function

Given a function which returns operations, returns a new operation which takes both inputs as a tuple. The modifier CA indicates that the operations are controllable and adjointable.

WeightOnePaulis function

Returns an array of all weight-1 Pauli operators on a given number of qubits.

WithFirstInputApplied function
XOR function

Warning

XOR has been deprecated. Please use Xor function instead.

Please use @"microsoft.quantum.logical.xor".

User Defined Types

CCNOTop user defined type

The signature type of CCNOT gate.

ResultStack user defined type

Warning

ResultStack has been deprecated.