예제 #1
0
def feature_map():
    # BUILD FEATURE MAP HERE - START

    # import required qiskit libraries if additional libraries are required

    # build the feature map
    feature_dim = 3  # equal to the dimension of the data

    feature_map = ZZFeatureMap(feature_dimension=feature_dim, reps=4)
    feature_map.draw()
    # BUILD FEATURE MAP HERE - END

    #return the feature map which is either a FeatureMap or QuantumCircuit object
    return feature_map
예제 #2
0
def feature_map():
    # BUILD FEATURE MAP HERE - START

    # import required qiskit libraries if additional libraries are required

    # build the feature map
    feature_dim = 3  # equal to the dimension of the data

    feature_map = ZZFeatureMap(feature_dimension=feature_dim, reps=2)
    feature_map.draw()
    # BUILD FEATURE MAP HERE - END

    #return the feature map which is either a FeatureMap or QuantumCircuit object
    return feature_map  # the write_and_run function writes the content in this cell into the file "variational_circuit.py"