Skip to content

Commit 0cc9c41

Browse files
author
Christopher J. Wood
committed
Fixed Unitarity unit test failing. Removed .pyc
1 parent 0930591 commit 0cc9c41

File tree

2 files changed

+20
-9
lines changed

2 files changed

+20
-9
lines changed

src/pymparser/mast.pyc

-995 Bytes
Binary file not shown.

test/QuantumChannelTests.m

+20-9
Original file line numberDiff line numberDiff line change
@@ -925,15 +925,26 @@
925925

926926
TestCase[$RegisteredTests, "QuantumChannel:Unitarity",
927927
And[
928-
Unitarity[Unitary @ TP[X]] == 1,
929-
Unitarity[Super[Projector[UnitVector[4,1]], Basis -> "Pauli"]] == 0,
930-
Unitarity[Super[{
931-
{1, 0, 0, 1},
932-
{0, 0, 0, 0},
933-
{0, 0, 0, 0},
934-
{0, 0, 0, 0}
935-
}, Basis -> "Pauli"]] == 0,
936-
Unitarity[Kraus[{Sqrt[1/2]TP[I],Sqrt[1/2]TP[X]}]] == 1/3
928+
Unitarity[
929+
QuantumChannel[{{0,1},{1,0}},
930+
{ChannelRep->Unitary,InputDim->2,OutputDim->2,Basis->"Col"}]
931+
] == 1,
932+
Unitarity[
933+
QuantumChannel[DiagonalMatrix[{1,0,0,0}],
934+
{ChannelRep->Super, InputDim->2, OutputDim->2, Basis -> "Pauli"}]
935+
] == 0,
936+
Unitarity[
937+
QuantumChannel[{
938+
{1, 0, 0, 1},
939+
{0, 0, 0, 0},
940+
{0, 0, 0, 0},
941+
{0, 0, 0, 0}},
942+
{ChannelRep->Super, InputDim->2, OutputDim->2, Basis -> "Pauli"}]
943+
] == 0,
944+
Unitarity[
945+
QuantumChannel[{Sqrt[1/2]{{1,0},{0,1}},Sqrt[1/2]{{0,1},{1,0}}},
946+
{ChannelRep->Kraus, InputDim->2, OutputDim->2, Basis->"Col"}]
947+
] == 1/3
937948
]
938949
]
939950

0 commit comments

Comments
 (0)