Drawable

public protocol Drawable

Print/draw a quantum circuit

  • Prints a circuit with the given qubitCount in a view.

    Declaration

    Swift

    func drawCircuit(_ circuit: [Gate], qubitCount: Int) -> Result<SQCView, DrawCircuitError>

    Parameters

    circuit

    Circuit to be printed in a view..

    qubitCount

    Number of qubits in the circuit.

    Return Value

    A view with a representation of the circuit inside. Or DrawCircuitError error.

Public methods

  • drawCircuit(_:) Extension method

    Prints a circuit in a view.

    Declaration

    Swift

    public func drawCircuit(_ circuit: [Gate]) -> Result<SQCView, DrawCircuitError>

    Parameters

    circuit

    Circuit to be printed in a view..

    Return Value

    A view with a representation of the circuit inside. Or DrawCircuitError error.