Initial quantum circuit.
This commit is contained in:
parent
77ce58c612
commit
20c13c1cdf
38 changed files with 1153 additions and 14 deletions
|
@ -15,4 +15,14 @@ const ComplexNumber& Qubit::getAlpha() const
|
|||
const ComplexNumber& Qubit::getBeta() const
|
||||
{
|
||||
return mBeta;
|
||||
}
|
||||
|
||||
bool Qubit::isIn0State() const
|
||||
{
|
||||
return mAlpha.getReal() == 1.0 && mBeta.getMagnitude() == 0.0;
|
||||
}
|
||||
|
||||
bool Qubit::isIn1State() const
|
||||
{
|
||||
return mBeta.getReal() == 1.0 && mAlpha.getMagnitude() == 0.0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue