teaguetomesh / c2qa-modular-qc

A compiler for distributed quantum architectures
2 stars 0 forks source link

Wei #11

Closed weiT1993 closed 2 years ago

weiT1993 commented 2 years ago

Updating Device and Module structures.

device = Device(device_graph: networkx graph, [module graphs: networkx graph])
device.modules = [Module: arquin.device.main.Module]
device.global_edges = [[qubit_a: Qiskit qubit, qubit_b]]
device.local_edges = [[qubit_a: Qiskit qubit, qubit_b]]
device.size = number of qubits

The compiled DAGs are stored in each Module.

module = Module(graph: networkx graph, index: int)
module.dag = local compiled dag
module.edges = [[qubit_a: Qiskit qubit, qubit_b]]
module.mapping = [virtual device qubit]

device.global_edges, device.local_edges and module.edges are all represented by physical qubits. Physical qubits are labelled module_i_j for qubit j in module i.

teaguetomesh commented 2 years ago

Okay I've gone through and merged the changes I had originally made in compat branch into this pull request. I also renamed moved device/main.py -> device.py, module/main.py -> module.py, compiler/main.py -> compiler/modular_compiler.py

teaguetomesh commented 2 years ago

These changes currently break test.py so I'm working through that right now

weiT1993 commented 2 years ago

You can leave test.py for now as I am making more changes on my branch. Let's merge and close this so I can update wei branch to incorporate other changes?

teaguetomesh commented 2 years ago

we should really be deleting branches once they merge and then open new ones to make new changes. They don't need to always have the same name