-
Throwed when a gate without
controls
is used in a circuitDeclaration
Swift
case gateControlsCanNotBeAnEmptyList
-
Throwed when the matrix provided by a gate is not unitary
Declaration
Swift
case gateMatrixIsNotUnitary
-
Throwed when the number of rows in a matrix used to build a quantum gate is not a power of 2. A matrix has to handle all possible combinations for a given number of qubits which is (number of qubits)^2
Declaration
Swift
case gateMatrixRowCountHasToBeAPowerOfTwo
-
Throwed when an entry in
truthTable
uses more qubits than are availble incontrols
Declaration
Swift
case gateTruthTableCanNotBeRepresentedWithGivenControlCount
-
Throwed when an entry in
truthTable
is either an emptry string or it is not composed only of 0’s and 1’sDeclaration
Swift
case gateTruthTableEntriesHaveToBeNonEmptyStringsComposedOnlyOfZerosAndOnes