Two-ways dict to represent a Layout.
construct a Layout from a bijective dictionary, mapping virtual qubits to physical qubits
Adds a map element between bit and physical_bit.
Adds at the end physical_qubits that map each bit in reg.
Combines self and another_layout into an “edge map”.
Returns a copy of a Layout instance.
Populates a Layout from a dictionary.
Converts a list of integers to a Layout mapping virtual qubits (index of the list) to physical qubits (the list values).
Populates a Layout from a list containing virtual qubits, Qubit or None.
Creates a trivial (“one-to-one”) Layout with the registers and qubits in regs.
Returns the dictionary where the keys are physical (qu)bits and the values are virtual (qu)bits.
Returns the registers in the layout [QuantumRegister(2, ‘qr0’), QuantumRegister(3, ‘qr1’)] :returns: A set of Registers in the layout :rtype: Set
Returns the dictionary where the keys are virtual (qu)bits and the values are physical (qu)bits.
decides which one is physical/virtual based on the type.
Given an ordered list of bits, reorder them according to this layout.
Swaps the map between left and right.