Initial quantum compute and cleaning up win server.

This commit is contained in:
jmsgrogan 2023-01-09 17:31:13 +00:00
parent af50eea208
commit 5362b694e0
45 changed files with 884 additions and 429 deletions

View file

@ -0,0 +1,40 @@
#include "BlochSphereNode.h"
#include "CircleNode.h"
BlochSphereNode::BlochSphereNode(const DiscretePoint& location)
: AbstractVisualNode(location, "BlochSphereNode")
{
}
void BlochSphereNode::setContent(BlochSphere* content)
{
mContent = content;
mContentDirty = true;
}
void BlochSphereNode::setSize(double size)
{
if (size != mSize)
{
mSize = size;
mContentDirty = true;
}
}
void BlochSphereNode::update(FontsManager* fontsManager)
{
if (!mContentDirty)
{
return;
}
mChildren.clear();
auto loc = DiscretePoint(mSize / 2.0, mSize / 2.0);
mOuterCircle = std::make_unique<CircleNode>(loc, mSize/2.0);
addChild(mOuterCircle.get());
}

View file

@ -0,0 +1,34 @@
#pragma once
#include "AbstractVisualNode.h"
#include <memory>
class BlochSphere;
class CircleNode;
class LineNode;
class BlochSphereNode : public AbstractVisualNode
{
public:
BlochSphereNode(const DiscretePoint& location);
void setContent(BlochSphere* content);
void update(FontsManager* fontsManager) override;
void setSize(double size);
private:
double mSize{ 1.0 };
bool mContentDirty{ true };
BlochSphere* mContent{ nullptr };
std::unique_ptr<CircleNode> mOuterCircle;
std::unique_ptr<CircleNode> mInnerCircle;
std::unique_ptr<CircleNode> mCentreCircle;
std::unique_ptr<CircleNode> mStateMarkerCircle;
std::unique_ptr<LineNode> mXAxis;
std::unique_ptr<LineNode> mYAxis;
std::unique_ptr<LineNode> mZAxis;
std::unique_ptr<LineNode> mStateVector;
};