Exemple #1
0
def test_NxDevice(isa_dict, noise_model_dict):
    graph = isa_to_graph(ISA.from_dict(isa_dict))
    nxdev = NxDevice(graph)

    device_raw = {'isa': isa_dict,
                  'noise_model': noise_model_dict,
                  'is_online': True,
                  'is_retuning': False}
    dev = Device(DEVICE_FIXTURE_NAME, device_raw)

    nx.is_isomorphic(nxdev.qubit_topology(), dev.qubit_topology())
    isa = nxdev.get_isa()
    assert isa.qubits[0].type == 'Xhalves'
Exemple #2
0
def test_NxDevice(isa_dict, noise_model_dict):
    graph = isa_to_graph(ISA.from_dict(isa_dict))
    nxdev = NxDevice(graph)

    device_raw = {
        "isa": isa_dict,
        "noise_model": noise_model_dict,
        "is_online": True,
        "is_retuning": False,
    }
    dev = Device(DEVICE_FIXTURE_NAME, device_raw)

    nx.is_isomorphic(nxdev.qubit_topology(), dev.qubit_topology())
    isa = nxdev.get_isa()
    assert isa.qubits[0].type == "Xhalves"