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 by radians

    Declaration

    Swift

    case phaseShift(radians: Double, target: Int)
  • Quantum gate that defines a rotation of radians around axis of the quantum state in target

    Declaration

    Swift

    case rotation(axis: Gate.Axis, radians: Double, target: Int)
  • Quantum gate built with a matrix and any number of inputs

    Declaration

    Swift

    case matrix(matrix: Matrix, inputs: [Int])
  • Oracle gate composed of a truthtable that specifies which controls activate a gate

    Declaration

    Swift

    case oracle(truthTable: [String], controls: [Int], gate: SimplifiedGate)
  • Quantum gate controlled with controls

    Declaration

    Swift

    case controlled(gate: SimplifiedGate, controls: [Int])