How to use the blueqat.gate.slicing function in blueqat

To help you get started, we’ve selected a few blueqat examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Blueqat / Blueqat / tests / test_slicing.py View on Github external
def test_slicing5():
    assert_slicing(slicing(s[::2], 10), range(10)[::2])
github Blueqat / Blueqat / tests / test_slicing.py View on Github external
def test_slicing6():
    assert_slicing(slicing(s[1::2], 10), range(10)[1::2])
github Blueqat / Blueqat / tests / test_slicing.py View on Github external
def test_slicing17():
    assert_slicing(slicing(s[8:4:-1], 10), range(10)[8:4:-1])
github Blueqat / Blueqat / tests / test_slicing.py View on Github external
def test_slicing14():
    assert_slicing(slicing(s[7::-2], 10), range(10)[7::-2])
github Blueqat / Blueqat / tests / test_slicing.py View on Github external
def test_multi_subscription1():
    assert_slicing(slicing((1, -1), 10), [1, 9])
github Blueqat / Blueqat / tests / test_slicing.py View on Github external
def test_slicing3():
    assert_slicing(slicing(s[:], 4), range(4)[:])
github Blueqat / Blueqat / tests / test_slicing.py View on Github external
def test_slicing2():
    assert_slicing(slicing(s[:3], 10), range(10)[:3])
github Blueqat / Blueqat / tests / test_slicing.py View on Github external
def test_subscription1():
    assert_slicing(slicing(0, 10), [0])
github Blueqat / Blueqat / tests / test_slicing.py View on Github external
def test_slicing7():
    assert_slicing(slicing(s[100::2], 10), range(10)[100::2])
github Blueqat / Blueqat / tests / test_slicing.py View on Github external
def test_subscription5():
    with pytest.raises(TypeError):
        list(slicing(1.2, 10))