You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 21, 2024. It is now read-only.
Superposition : the test harness could log the actual state of the system after prep vs the expected state before asserting that they are the same (the change would add state prep and logging using DumpMachine to AssertEqualOnZeroState)
BasicGates : a similar improvement, but a bit more extra code to write a unified test wrapper (since all tests in it just use AssertOperationsEqualReferenced). Since the actual test compares the unitaries, we might want to add a DumpDiffOnOneInput that would:
Measurements : the test harness already reports the number of incorrect classifications; in addition, it can print the states which were misclassified in human-readable format, taking an array of string representations of states as an extra parameter to operations like DistinguishTwoStates_OneQubit and logging the mismatches. We'd have to be careful not to log 50 lines of mismatches, though... Maybe keep track of different kinds of mismatches and report aggregates in the end of the test (e.g., "Classified |0⟩ as |1⟩ 15 times, classified |1⟩ as |0⟩ 21 times")?
JointMeasurements : same as in Measurements
DeutschJozsaAlgorithm
SolveSATWithGrover
and GraphColoring : use logging approach similar to RippleCarryAdder to produce more readable results for testing oracles on basis states (so that the solver knows which input state is processed incorrectly, not just that there is an error).
There are probably other katas that allow similar improvements - please share the ideas in the comments!
Several katas could have better error messaging:
DumpMachinetoAssertEqualOnZeroState)AssertOperationsEqualReferenced). Since the actual test compares the unitaries, we might want to add aDumpDiffOnOneInputthat would:DistinguishTwoStates_OneQubitand logging the mismatches. We'd have to be careful not to log 50 lines of mismatches, though... Maybe keep track of different kinds of mismatches and report aggregates in the end of the test (e.g., "Classified |0⟩ as |1⟩ 15 times, classified |1⟩ as |0⟩ 21 times")?There are probably other katas that allow similar improvements - please share the ideas in the comments!