-
Throwed when a gate without
controlsis 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
truthTableuses more qubits than are availble incontrolsDeclaration
Swift
case gateTruthTableCanNotBeRepresentedWithGivenControlCount -
Throwed when an entry in
truthTableis either an emptry string or it is not composed only of 0’s and 1’sDeclaration
Swift
case gateTruthTableEntriesHaveToBeNonEmptyStringsComposedOnlyOfZerosAndOnes
GateError Enumeration Reference