Microsoft.Quantum.Diagnostics namespace
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.
Operations
Name | Summary |
---|---|
AllowAtMostNCallsCA | Between a call to this operation and its adjoint, asserts that a given operation is called at most a certain number of times. |
AllowAtMostNQubits | Between a call to this operation and its adjoint, asserts that at most a given number of additional qubits are allocated with using statements. |
AssertAllZero | Assert that given qubits are all in $\ket{0}$ state. |
AssertAllZeroWithinTolerance | Assert that given qubits are all in $\ket{0}$ state up to a given tolerance. |
AssertMeasurement | Asserts that measuring the given qubits in the given Pauli basis will always have the given result. |
AssertMeasurementProbability | Asserts that measuring the given qubits in the given Pauli basis will have the given result with the given probability, within some tolerance. |
AssertOperationsEqualInPlace | Given two operations, asserts that they act identically for all input states. |
AssertOperationsEqualInPlaceCompBasis | 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. |
AssertOperationsEqualReferenced | Given two operations, asserts that they act identically for all input states. |
AssertPhase | Asserts that the phase of an equal superposition state has the expected value. |
AssertQubit | Asserts that the qubit q is in the expected eigenstate of the Pauli Z operator. |
AssertQubitIsInStateWithinTolerance | Asserts that a qubit in the expected state. |
AssertQubitWithinTolerance | Asserts that the qubit q is in the expected eigenstate of the Pauli Z operator up to a given tolerance. |
DumpOperation | Given an operation, displays diagnostics about the operation that are made available by the current execution target. |
Functions
Name | Summary |
---|---|
AllEqualityFactB | Asserts that two arrays of boolean values are equal. |
AllEqualityFactI | Asserts that two arrays of integer values are equal. |
Contradiction | Checks whether a classical condition is false, and throws an exception if it is not. |
DumpMachine | Dumps the current target machine's status. |
DumpRegister | Dumps the current target machine's status associated with the given qubits. |
EqualityFactB | Asserts that a classical Bool variable has the expected value. |
EqualityFactC | Asserts that a complex number has the expected value. |
EqualityFactCP | Asserts that a complex number has the expected value. |
EqualityFactI | Asserts that a classical Int variable has the expected value. |
EqualityFactL | Asserts that a classical BigInt variable has the expected value. |
EqualityFactR | Asserts that a classical Result variable has the expected value. |
EqualityWithinToleranceFact | Represents the claim that a classical floating point value has the expected value up to a given absolute tolerance. |
Fact | Checks whether a classical condition is true, and throws an exception if it is not. |
FiniteFact | Checks whether a given floating-point value represents a finite number, and throws an exception if this is not the case. |
NearEqualityFactC | Asserts that a classical complex number has the expected value up to a small tolerance of 1e-10. |
NearEqualityFactCP | Asserts that a classical complex number has the expected value up to a small tolerance of 1e-10. |
NearEqualityFactD | Asserts that a classical floating point value has the expected value up to a small tolerance of 1e-10. |
User-defined types
Name | Summary |
---|---|
EnableTestingViaName | Compiler-recognized attribute via which an alternative name can be defined that may be used when loading a type or callable for testing purposes. |
Test | Compiler-recognized attribute used to mark a unit test. |
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