Skip to content

Commit

Permalink
bugfix: wrong package names
Browse files Browse the repository at this point in the history
  • Loading branch information
Nozidoali committed Nov 20, 2024
1 parent 69a2636 commit c71c4ad
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12", "3.13"]

runs-on: ${{ matrix.os }}
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
Expand Down
10 changes: 0 additions & 10 deletions tests/test_algorithms/test_cardinality_reduction.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
#!/usr/bin/env python
# -*- encoding=utf8 -*-

"""
Author: Hanyu Wang
Created time: 2024-03-18 18:02:05
Last Modified by: Hanyu Wang
Last Modified time: 2024-03-18 19:12:39
"""

import random
from itertools import combinations

Expand Down
27 changes: 2 additions & 25 deletions tests/test_algorithms/test_qubit_reduction.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,9 @@
#!/usr/bin/env python
# -*- encoding=utf8 -*-

"""
Author: Hanyu Wang
Created time: 2024-03-18 18:02:05
Last Modified by: Hanyu Wang
Last Modified time: 2024-03-18 19:13:28
"""

import random
from itertools import combinations

import numpy as np
import pytest

from xyz import QState, quantize_state
from xyz import simulate_circuit
from xyz import prepare_state
from xyz import StatePreparationParameters
from xyz import rand_state

from xyz import *
N_TESTS = 10


Expand All @@ -46,14 +30,8 @@ def test_one_state(state_vectors):
# print("target state: ", target_state)
circuit = prepare_state(
target_state,
verbose_level=0,
param=StatePreparationParameters(
enable_m_flow=False,
enable_exact_synthesis=False,
enable_n_flow=True,
),
verbose_level=0
)

# now we measure the distance between the target state and the actual state
state_vector_act = simulate_circuit(circuit)
dist = np.linalg.norm(np.abs(state_vector_act) - np.abs(state_vector_exp))
Expand All @@ -64,5 +42,4 @@ def test_one_state(state_vectors):
f"distance is {dist_strict**2}, state_exp = {state_vector_exp}, state_act = {state_vector_act}"
)
assert False

assert dist**2 < 1e-4 # make sure the distance is small
1 change: 0 additions & 1 deletion xyz/algorithms/optimization/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
from .resynthesis import *
from .mapping import *
from .scheduling import *

0 comments on commit c71c4ad

Please sign in to comment.