class QPanda::ShorAlg

Overview

Shor Algorthm. More…

#include <Shor.h>

class ShorAlg
{
public:
    // construction

    ShorAlg(int target);

    // methods

    void set_decomposition_starter(int smallest_base);
    bool exec();
    std::pair<int, int> get_results();
};

Detailed Documentation

Shor Algorthm.

Construction

ShorAlg(int target)

Parameters:

target

the number to initialize the large number

Methods

void set_decomposition_starter(int smallest_base)

Parameters:

set

the smallest base, default = 2

bool exec()

execute the prime factorization for target number

Returns:

whether the process succeed

std::pair<int, int> get_results()

get the decomposition result

Returns:

get the decomposition result