Beispiel #1
0
def additional_metadata_gate_model(program, rigetti_metadata):
    return AdditionalMetadata(action=program, rigettiMetadata=rigetti_metadata)
Beispiel #2
0
def additional_metadata_annealing(problem, dwave_metadata):
    return AdditionalMetadata(action=problem, dwaveMetadata=dwave_metadata)
def test_incorrect_dwave_metadata(program):
    AdditionalMetadata(dwaveMetadata=program)
def test_incorrect_action(dwave_metadata):
    AdditionalMetadata(action=dwave_metadata)
def test_additional_metadata_correct_gate_model(program):
    metadata = AdditionalMetadata(action=program)
    assert metadata.action == program
    assert AdditionalMetadata.parse_raw(metadata.json()) == metadata
def test_additional_metadata_correct_annealing(problem, dwave_metadata):
    metadata = AdditionalMetadata(action=problem, dwaveMetadata=dwave_metadata)
    assert metadata.action == problem
    assert metadata.dwaveMetadata == dwave_metadata
    assert AdditionalMetadata.parse_raw(metadata.json()) == metadata
def test_missing_properties():
    AdditionalMetadata()