AssertOperationsEqualInPlaceCompBasis operation

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.Diagnostics

Package: Microsoft.Quantum.Type2.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