Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.
This repository was archived by the owner on Jan 12, 2024. It is now read-only.

Libraries contain tests that fail probabilistically #444

Description

The standard libraries contain probabilistic tests that fail occassionally in practice, which disrupts CI runs. The tests should use a fixed random seed or be disabled.

Problem tests:

TestRobustPhaseEstimation

// Probabilistic test. Might fail occasionally
@Test("QuantumSimulator")
operation TestRobustPhaseEstimation() : Unit {

Unhandled exception. Microsoft.Quantum.Simulation.Core.ExecutionFailException: Values were not equal within tolerance.
	Expected:	-2.6179938779914944
	Actual:	-2.629243070435989
 ---> Microsoft.Quantum.Tests.TestRobustPhaseEstimation on D:\a\1\s\submodules\QuantumLibraries\Standard\tests\QcvvTests.qs:line 109

TestEstimateFrequencyBinomial

@Test("QuantumSimulator")
operation TestEstimateFrequencyBinomial() : Unit {
// If this is larger, tests fail less often, but more false negatives
// slip through.

Unhandled exception. Microsoft.Quantum.Simulation.Core.ExecutionFailException: Values were not equal within tolerance.
	Expected:	0.5153
	Actual:	0.5
 ---> Microsoft.Quantum.Tests.EstimateFrequencyBinomialCase on D:\a\1\s\submodules\QuantumLibraries\Standard\tests\QcvvTests.qs:line 57
   at Microsoft.Quantum.Tests.TestEstimateFrequencyBinomial on D:\a\1\s\submodules\QuantumLibraries\Standard\tests\QcvvTests.qs:line 65

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Area-TestingIssue concerns unit or integration tests.Kind-BugSomething isn't workingPkg-StandardIssue relates to the Microsoft.Quantum.Standard package.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions