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:
targetDeclaration
Swift
case not(target: Int) -
Hadamard gate with 1 input:
targetDeclaration
Swift
case hadamard(target: Int) -
Quantum gate that shifts phase of the quantum state in
targetbyradiansDeclaration
Swift
case phaseShift(radians: Double, target: Int) -
Quantum gate that defines a rotation of
radiansaroundaxisof the quantum state intargetDeclaration
Swift
case rotation(axis: Gate.Axis, radians: Double, target: Int) -
Quantum gate built with a
matrixand any number ofinputsDeclaration
Swift
case matrix(matrix: Matrix, inputs: [Int]) -
Oracle gate composed of a
truthtablethat specifies whichcontrolsactivate agateDeclaration
Swift
case oracle(truthTable: [String], controls: [Int], gate: SimplifiedGate) -
Quantum
gatecontrolled withcontrolsDeclaration
Swift
case controlled(gate: SimplifiedGate, controls: [Int])
SimplifiedGate Enumeration Reference