Documentation for microsoft::quantum::QirAdaptor

microsoft::quantum::QirAdaptor

More...

#include <QirAdaptor/QirAdaptor.hpp>

Public Types

Name
using IAllocationManager::AllocationManagerPtr AllocationManagerPtr
using Validator::ValidatorPtr ValidatorPtr
Validator class used to check that an IR fulfils a given specification.
using std::shared_ptr< ILogger > ILoggerPtr

Public Functions

Name
QirAdaptor(ConfigurationManager & configuration_manager, String const & name, ILoggerPtr const & logger, bool debug, llvm::TargetMachine * target_machine =nullptr, AllocationManagerPtr qubit_allocation_manager =BasicAllocationManager::createNew(), AllocationManagerPtr result_allocation_manager =BasicAllocationManager::createNew())
QirAdaptor()
QirAdaptor(QirAdaptor const & )
QirAdaptor(QirAdaptor && )
QirAdaptor & operator=(QirAdaptor const & )
QirAdaptor & operator=(QirAdaptor && )
~QirAdaptor() =default
void apply(llvm::Module & module)
Applies the adaptor to a module.
bool verify(llvm::Module & module)
Verifies that a module is a valid LLVM IR.
bool validate(llvm::Module & module)
Validates that a module complies with the specified QIR adaptor.
AllocationManagerPtr getQubitAllocationManager()
AllocationManagerPtr getResultAllocationManager()
String const & name() const
llvm::PassBuilder & passBuilder()
Returns a reference to the pass builder.
llvm::LoopAnalysisManager & loopAnalysisManager()
Returns a reference to the loop analysis manager.
llvm::FunctionAnalysisManager & functionAnalysisManager()
Returns a reference to the function analysis manager.
llvm::CGSCCAnalysisManager & gsccAnalysisManager()
Returns a reference to the GSCC analysis manager.
llvm::ModuleAnalysisManager & moduleAnalysisManager()
Returns a reference to the module analysis manager.
llvm::ModulePassManager & modulePassManager()
Returns the module pass manager associated with the adaptor.
ConfigurationManager & configurationManager()
Returns the configuration manager.

Protected Functions

Name
void setValidator(ValidatorPtr && validator)
Sets the validator.

Friends

Name
class QirAdaptorFactory

Detailed Description

class microsoft::quantum::QirAdaptor;

QirAdaptor class that defines a set of rules which constitutes the adaptor definition. Each of the rules can be used to transform a generic QIR and/or validate that the QIR is compliant with said rule.

Public Types Documentation

using AllocationManagerPtr

using microsoft::quantum::QirAdaptor::AllocationManagerPtr =  IAllocationManager::AllocationManagerPtr;

Allocation manager pointer type. Used to reference to concrete allocation manager implementations which defines the allocation logic of the adaptor.

using ValidatorPtr

using microsoft::quantum::QirAdaptor::ValidatorPtr =  Validator::ValidatorPtr;

Validator class used to check that an IR fulfils a given specification.

using ILoggerPtr

using microsoft::quantum::QirAdaptor::ILoggerPtr =  std::shared_ptr<ILogger>;

Public Functions Documentation

function QirAdaptor

explicit QirAdaptor(
    ConfigurationManager & configuration_manager,
    String const & name,
    ILoggerPtr const & logger,
    bool debug,
    llvm::TargetMachine * target_machine =nullptr,
    AllocationManagerPtr qubit_allocation_manager =BasicAllocationManager::createNew(),
    AllocationManagerPtr result_allocation_manager =BasicAllocationManager::createNew()
)

function QirAdaptor

QirAdaptor()

function QirAdaptor

QirAdaptor(
    QirAdaptor const & 
)

function QirAdaptor

QirAdaptor(
    QirAdaptor && 
)

function operator=

QirAdaptor & operator=(
    QirAdaptor const & 
)

function operator=

QirAdaptor & operator=(
    QirAdaptor && 
)

function ~QirAdaptor

~QirAdaptor() =default

function apply

void apply(
    llvm::Module & module
)

Applies the adaptor to a module.

function verify

bool verify(
    llvm::Module & module
)

Verifies that a module is a valid LLVM IR.

function validate

bool validate(
    llvm::Module & module
)

Validates that a module complies with the specified QIR adaptor.

function getQubitAllocationManager

AllocationManagerPtr getQubitAllocationManager()

function getResultAllocationManager

AllocationManagerPtr getResultAllocationManager()

function name

String const  & name() const

function passBuilder

llvm::PassBuilder & passBuilder()

Returns a reference to the pass builder.

function loopAnalysisManager

llvm::LoopAnalysisManager & loopAnalysisManager()

Returns a reference to the loop analysis manager.

function functionAnalysisManager

llvm::FunctionAnalysisManager & functionAnalysisManager()

Returns a reference to the function analysis manager.

function gsccAnalysisManager

llvm::CGSCCAnalysisManager & gsccAnalysisManager()

Returns a reference to the GSCC analysis manager.

function moduleAnalysisManager

llvm::ModuleAnalysisManager & moduleAnalysisManager()

Returns a reference to the module analysis manager.

function modulePassManager

llvm::ModulePassManager & modulePassManager()

Returns the module pass manager associated with the adaptor.

function configurationManager

inline ConfigurationManager & configurationManager()

Returns the configuration manager.

Protected Functions Documentation

function setValidator

void setValidator(
    ValidatorPtr && validator
)

Sets the validator.

Friends

friend QirAdaptorFactory

friend class QirAdaptorFactory(
    QirAdaptorFactory 
);

Updated on 1 August 2023 at 16:25:10 UTC