@@ -1,20 +1,8 @@ | |||||
function bootstrap() { | |||||
abj.add_node(0, { | |||||
position: new THREE.Vector3(0, 0, 0) | |||||
}); | |||||
abj.add_node(1, { | |||||
position: new THREE.Vector3(1, 0, 0) | |||||
}); | |||||
graph.update(); | |||||
} | |||||
window.onload = function() { | window.onload = function() { | ||||
graph.prepare(); | graph.prepare(); | ||||
materials.prepare(); | materials.prepare(); | ||||
gui.prepare(); | gui.prepare(); | ||||
mouse.prepare(); | mouse.prepare(); | ||||
editor.prepare(); | editor.prepare(); | ||||
//bootstrap(); | |||||
gui.loop(); | gui.loop(); | ||||
}; | }; |
@@ -1,7 +1,7 @@ | |||||
var materials = {}; | var materials = {}; | ||||
var curveProperties = { | var curveProperties = { | ||||
splineDensity: 8, | |||||
splineDensity: 1, | |||||
curvature: 20 | curvature: 20 | ||||
}; | }; | ||||
@@ -13,18 +13,7 @@ materials.prepare = function() { | |||||
materials.edge = new THREE.LineBasicMaterial({ | materials.edge = new THREE.LineBasicMaterial({ | ||||
color: "gray", | color: "gray", | ||||
transparent: false, | transparent: false, | ||||
linewidth: 1 | |||||
}); | |||||
materials.gimbalEdge = new THREE.LineBasicMaterial({ | |||||
color: "black", | |||||
linewidth: 1, | |||||
}); | |||||
materials.tip = new THREE.PointsMaterial({ | |||||
size: 0.4, | |||||
map: tipSprite, | |||||
alphaTest: 0.5, | |||||
transparent: true, | |||||
color: "red" | |||||
linewidth: 3 | |||||
}); | }); | ||||
materials.qubit = new THREE.PointsMaterial({ | materials.qubit = new THREE.PointsMaterial({ | ||||
size: 0.5, | size: 0.5, | ||||
@@ -0,0 +1,2 @@ | |||||
eval(require('fs').readFileSync('../static/scripts/anders_briegel.js', 'utf8')); | |||||
console.log(abj.adj); |
@@ -15,7 +15,7 @@ def get_chp_state(): | |||||
return output | return output | ||||
def _bell_test(): | |||||
def bell_test(): | |||||
chp.init(n) | chp.init(n) | ||||
chp.act_hadamard(0) | chp.act_hadamard(0) | ||||
chp.act_cnot(0, 1) | chp.act_cnot(0, 1) | ||||
@@ -4,7 +4,7 @@ def test_z_measurement(): | |||||
g = GraphState([0]) | g = GraphState([0]) | ||||
assert g.measure_z(0, 0) == 0 | assert g.measure_z(0, 0) == 0 | ||||
assert g.measure_z(0, 1) == 1 | assert g.measure_z(0, 1) == 1 | ||||
# TODO | |||||