AssertOperationsEqualInPlaceCompBasis operation
Namespace: Microsoft.Quantum.Diagnostics
Package: Microsoft.Quantum.QSharp.Core
Checks if the operation givenU is equal to the operation expectedU on
the given input size by checking the action of the operations only on
the vectors from the computational basis.
This is a necessary, but not sufficient, condition for the equality of
two unitaries.
operation AssertOperationsEqualInPlaceCompBasis (nQubits : Int, givenU : (Qubit[] => Unit), expectedU : (Qubit[] => Unit is Adj)) : Unit
Input
nQubits : Int
The number of qubits $n$ that the operations givenU and expectedU operate on.
givenU : Qubit[] => Unit
Operation on $n$ qubits to be checked.
expectedU : Qubit[] => Unit is Adj
Reference operation on $n$ qubits that givenU is to be compared against.
Output : Unit
反馈
提交和查看相关反馈