added missing docstring
This commit is contained in:
@@ -23,6 +23,14 @@ def qibo_qft(nqubits, init_state, swaps):
|
|||||||
@pytest.mark.parametrize("nqubits, tolerance, is_mps",
|
@pytest.mark.parametrize("nqubits, tolerance, is_mps",
|
||||||
[(1, 1e-6, True), (2, 1e-6, False), (5, 1e-3, True), (10, 1e-3, False)])
|
[(1, 1e-6, True), (2, 1e-6, False), (5, 1e-3, True), (10, 1e-3, False)])
|
||||||
def test_eval(nqubits: int, tolerance: float, is_mps: bool):
|
def test_eval(nqubits: int, tolerance: float, is_mps: bool):
|
||||||
|
|
||||||
|
"""Evaluate circuit with Quimb backend.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
nqubits (int): Total number of qubits in the system.
|
||||||
|
tolerance (float): Maximum limit allowed for difference in results
|
||||||
|
is_mps (bool): True if state is MPS and False for tensor network structure
|
||||||
|
"""
|
||||||
# hack quimb to use the correct number of processes
|
# hack quimb to use the correct number of processes
|
||||||
# TODO: remove completely, or at least delegate to the backend
|
# TODO: remove completely, or at least delegate to the backend
|
||||||
# implementation
|
# implementation
|
||||||
@@ -35,9 +43,7 @@ def test_eval(nqubits: int, tolerance: float, is_mps: bool):
|
|||||||
# Test qibo
|
# Test qibo
|
||||||
qibo.set_backend(backend=config.qibo.backend,
|
qibo.set_backend(backend=config.qibo.backend,
|
||||||
platform=config.qibo.platform)
|
platform=config.qibo.platform)
|
||||||
#qibo_time, (qibo_circ, result_sv) = time(
|
|
||||||
#lambda: qibo_qft(nqubits, init_state, swaps=True)
|
|
||||||
#)
|
|
||||||
qibo_circ, result_sv= qibo_qft(nqubits, init_state, swaps=True)
|
qibo_circ, result_sv= qibo_qft(nqubits, init_state, swaps=True)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user