Fix up linux build.
This commit is contained in:
parent
c81db288b0
commit
b76dc184b3
21 changed files with 86 additions and 66 deletions
|
@ -11,24 +11,24 @@ class LineNode;
|
|||
class BlochSphereNode : public AbstractVisualNode
|
||||
{
|
||||
public:
|
||||
BlochSphereNode(const Point& location);
|
||||
BlochSphereNode(const Point& location);
|
||||
|
||||
void setContent(BlochSphere* content);
|
||||
void setContent(BlochSphere* content);
|
||||
|
||||
void update(SceneInfo* sceneInfo) override;
|
||||
void update(SceneInfo* sceneInfo) override;
|
||||
|
||||
void setSize(double size);
|
||||
void setSize(double size);
|
||||
private:
|
||||
double mSize{ 1.0 };
|
||||
bool mContentDirty{ true };
|
||||
BlochSphere* mContent{ nullptr };
|
||||
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;
|
||||
};
|
||||
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;
|
||||
};
|
||||
|
|
|
@ -3,21 +3,23 @@
|
|||
#include "TestRenderUtils.h"
|
||||
|
||||
#include "BlochSphereNode.h"
|
||||
#include "CircleNode.h"
|
||||
#include "LineNode.h"
|
||||
#include "BlochSphere.h"
|
||||
|
||||
TEST_CASE(TestBlochSphereNode, "quantum_computing")
|
||||
{
|
||||
TestRenderer renderer(100, 100);
|
||||
TestRenderer renderer(100, 100);
|
||||
|
||||
auto node = std::make_unique<BlochSphereNode>(Point(0.5, 0.5));
|
||||
auto node = std::make_unique<BlochSphereNode>(Point(0.5, 0.5));
|
||||
|
||||
Qubit state({ 1.0, 0.0 }, { 0.0, 0.0 });
|
||||
Qubit state({ 1.0, 0.0 }, { 0.0, 0.0 });
|
||||
|
||||
auto bloch_sphere = std::make_unique<BlochSphere>(state);
|
||||
|
||||
node->setSize(100);
|
||||
node->setContent(bloch_sphere.get());
|
||||
auto bloch_sphere = std::make_unique<BlochSphere>(state);
|
||||
|
||||
renderer.getScene()->addNode(node.get());
|
||||
renderer.writeSvg(TestUtils::getTestOutputDir(__FILE__) / "bloch_sphere.svg");
|
||||
}
|
||||
node->setSize(100);
|
||||
node->setContent(bloch_sphere.get());
|
||||
|
||||
renderer.getScene()->addNode(node.get());
|
||||
renderer.writeSvg(TestUtils::getTestOutputDir(__FILE__) / "bloch_sphere.svg");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue