Initial quantum circuit.

This commit is contained in:
jmsgrogan 2023-01-26 11:27:35 +00:00
parent 77ce58c612
commit 20c13c1cdf
38 changed files with 1153 additions and 14 deletions

View file

@ -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;
}