Connections
- Quantum and classical channels¶
-
class
netQuil.connections.
QConnect
(*args, transit_devices=[])[source]¶ -
__init__
(*args, transit_devices=[])[source]¶ This is the base class for a quantum connection between multiple agents.
- Parameters
*args (agents) – list of agents to connect
transit_devices (List<Devices>) – list of devices qubits travel through
-
__weakref__
¶ list of weak references to the object (if defined)
-
get
(agent)[source]¶ Pops qubits off of the agent’s queue. Sends qubit through transit and target devices, simulating a quantum network. Return an array of the qubits that have been altered, as well as the time it took the qubit to travel through the network. Some qubits may be lost during transmission. If lost, their value will switch to negative, or, in the case of 0, be set to -inf
- Parameters
agent (Agent) – agent receiving the qubits
- Returns
list of qubits, time to pass through transit and target devices, and the source agent’s time
-
put
(source, target, qubits, source_time)[source]¶ Constructs full list of devices that each qubit must travel through. Sends the qubits through source devices. Places qubits and a list of transit and target devices on the queue. Queue is keyed on the target agent’s name.
- Parameters
source (String) – name of agent where the qubits being sent originated
target (String) – name of agent receiving qubits
qubits (Array) – array of numbers corresponding to qubits the source is sending
source_time (Float) – time of source agent before sending qubits
- Returns
time qubits took to pass through source devices
-
transit_devices
= None¶ Create queue to keep track of multiple requests. Name of queue is name of target agent.
-
-
class
netQuil.connections.
CConnect
(*args, length=0.0)[source]¶ -
__init__
(*args, length=0.0)[source]¶ This is the base class for a classical connection between multiple agents.
- Parameters
*args (agents) – list of agents to connect
length (Float) – distance between first and second agent
-
__weakref__
¶ list of weak references to the object (if defined)
-
agents
= None¶ Create queue to keep track of multiple requests. Name of queue is name of target agent.
-