SimplifiedGate
public indirect enum SimplifiedGate
extension SimplifiedGate: Hashable
Simplified representation of a quantum gate. Use to easily identify the type of a quantum gate and its components
-
Not gate with 1 input:
target
Declaration
Swift
case not(target: Int)
-
Hadamard gate with 1 input:
target
Declaration
Swift
case hadamard(target: Int)
-
Quantum gate that shifts phase of the quantum state in
target
byradians
Declaration
Swift
case phaseShift(radians: Double, target: Int)
-
Quantum gate that defines a rotation of
radians
aroundaxis
of the quantum state intarget
Declaration
Swift
case rotation(axis: Gate.Axis, radians: Double, target: Int)
-
Quantum gate built with a
matrix
and any number ofinputs
Declaration
Swift
case matrix(matrix: Matrix, inputs: [Int])
-
Oracle gate composed of a
truthtable
that specifies whichcontrols
activate agate
Declaration
Swift
case oracle(truthTable: [String], controls: [Int], gate: SimplifiedGate)
-
Quantum
gate
controlled withcontrols
Declaration
Swift
case controlled(gate: SimplifiedGate, controls: [Int])