示例#1
0
    public void TestFlattenBroken()
    {
        var a1 = new QuantumSuperPosition <string>(new Dictionary <string, ComplexRational> {
            { "hey", BigRational.One },
        });
        var a2 = new QuantumSuperPosition <string>(new Dictionary <string, ComplexRational> {
            { "hey", -BigRational.One },
        });
        var s2 = new QuantumSuperPosition <QuantumSuperPosition <string> >(new Dictionary <QuantumSuperPosition <string>, ComplexRational> {
            { a1, BigRational.One / 5 * 3 },
            { a2, BigRational.One / 5 * 4 }
        });

        TestingUtilities.AssertThrows(() => s2.Flatten());
    }