33 lines
622 B
C++
33 lines
622 B
C++
#include "QuantumTerminal.h"
|
|
|
|
QuantumTerminal::QuantumTerminal(TerminalType type, const std::string& label)
|
|
: mLabel(label),
|
|
mType(type)
|
|
{
|
|
|
|
}
|
|
|
|
QuantumTerminal::Type QuantumTerminal::getType() const
|
|
{
|
|
return mType == TerminalType::INPUT ? Type::INPUT_TERMINAL : Type::OUTPUT_TERMINAL;
|
|
}
|
|
|
|
const Qubit& QuantumTerminal::getValue() const
|
|
{
|
|
return mValue;
|
|
}
|
|
|
|
QuantumWire* QuantumTerminal::getConnection() const
|
|
{
|
|
return mConnection;
|
|
}
|
|
|
|
void QuantumTerminal::setConnection(QuantumWire* connection)
|
|
{
|
|
mConnection = connection;
|
|
}
|
|
|
|
void QuantumTerminal::setValue(const Qubit& value)
|
|
{
|
|
mValue = value;
|
|
}
|