Exemplo n.º 1
0
def test_line_qubit_from_proto_id_invalid():
    with pytest.raises(ValueError, match='abc'):
        _ = v2.line_qubit_from_proto_id('abc')
Exemplo n.º 2
0
def test_line_qubit_from_proto_id():
    assert v2.line_qubit_from_proto_id('1') == cirq.LineQubit(1)
    assert v2.line_qubit_from_proto_id('10') == cirq.LineQubit(10)
    assert v2.line_qubit_from_proto_id('-1') == cirq.LineQubit(-1)