ControlledRotation user defined type
Namespace: Microsoft.Quantum.MachineLearning
Package: Microsoft.Quantum.MachineLearning
Describes a controlled rotation in terms of its target and control indices, rotation axis, and index into a model parameter vector.
newtype ControlledRotation = ((TargetIndex : Int, ControlIndices : Int[]), Axis : Pauli, ParameterIndex : Int);
Named Items
TargetIndex : Int
Index of the target qubit for this controlled rotation.
ControlIndices : Int[]
An array of the control qubit indices for this rotation.
Axis : Pauli
The axis for this rotation.
ParameterIndex : Int
An index into a model parameter vector describing the angle for this rotation.
Example
The following represents a rotation about the $X$-axis of the first qubit in a register, controlled on the second qubit, and with an angle given by the fourth parameter in a sequential model:
let controlledRotation = ControlledRotation(
(0, [1]),
PauliX,
3
)
Remarks
An uncontrolled rotation can be represented by setting ControlIndices
to an empty array of indexes, new Int[0].
反馈
提交和查看相关反馈