Browse Source

Test passing ... need more tests tho!

master
Pete Shadbolt 8 years ago
parent
commit
bfddcc993b
3 changed files with 4 additions and 4 deletions
  1. +1
    -1
      abp/viz.py
  2. +1
    -1
      tests/test_graph.py
  3. +2
    -2
      tests/test_normalize_global_phase.py

+ 1
- 1
abp/viz.py View File

@@ -1,6 +1,6 @@
import networkx as nx import networkx as nx
from matplotlib import pyplot as plt from matplotlib import pyplot as plt
import tables
import clifford
import numpy as np import numpy as np
from graph import GraphState from graph import GraphState




+ 1
- 1
tests/test_graph.py View File

@@ -1,5 +1,5 @@
from abp.graph import GraphState from abp.graph import GraphState
import abp.tables as tables
from abp import clifford
import time import time






+ 2
- 2
tests/test_normalize_global_phase.py View File

@@ -1,4 +1,4 @@
from abp import make_tables
from abp import clifford
from abp import qi from abp import qi
import numpy as np import numpy as np


@@ -7,5 +7,5 @@ def test_normalize_global_phase():
u = qi.pz u = qi.pz
phase = np.random.uniform(0, 2*np.pi) phase = np.random.uniform(0, 2*np.pi)
m = np.exp(1j*phase) * u m = np.exp(1j*phase) * u
normalized = make_tables.normalize_global_phase(m)
normalized = clifford.normalize_global_phase(m)
assert np.allclose(normalized, u) assert np.allclose(normalized, u)

Loading…
Cancel
Save