DrawCircuitError
public enum DrawCircuitError : Error, Hashable
Errors throwed by Drawable.drawCircuit(_:qubitCount:)
-
Throwed when
qubitCount
is 0, i.e. a circuit requires at least 1 qubitDeclaration
Swift
case qubitCountHasToBeBiggerThanZero
-
Throwed when
gate
informs no inputs/controlsDeclaration
Swift
case gateWithEmptyInputList(gate: Gate)
-
Throwed when
gate
informs the same input qubit twice (or more)Declaration
Swift
case gateWithRepeatedInputs(gate: Gate)
-
Throwed when
gate
informs the same control qubit twice (or more) in the same controlled/oracle gate or in different controlled/oracle gatesDeclaration
Swift
case gateWithRepeatedControls(gate: Gate)
-
Throwed when
gate
tries to use one or more input qubits also as control qubitsDeclaration
Swift
case gateWithOneOrMoreInputsAlsoControls(gate: Gate)
-
Throwed when one or more of the inputs/targets/controls in
gate
reference a qubit that does not existDeclaration
Swift
case gateWithOneOrMoreInputsOrControlsOutOfRange(gate: Gate)