Instruction should include qubits it acts on
See original GitHub issueWhat is the expected enhancement?
Qiskit currently lacks a class to represent the concept “a gate together with the qubits it acts on.” This concept is useful because it is the basic unit a quantum circuit is composed of. For example, it can be the type of object appended to a circuit, so that QuantumCircuit.append
can accept a single argument instead of multiple. It can also be used to simplify circuit construction in other ways; for example, circuit = QuantumCircuit(instructions)
where instructions
is an iterable of instructions (in fact it could be an “iterable tree” of instructions). After some discussion with @ajavadia we agree that the Instruction class could be updated to serve this purpose.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Quantum Instruction Set - Computerphile - YouTube
Just what can you do with a quantum computer? Robert Smith of Rigetti Computing takes us through his quantum instruction set.
Read more >Quantum Computing Lecture 1 Bits and Qubits What is ...
Aim to use quantum mechanical phenomena that have no classical counterpart for computational purposes. Central research tasks include: • Building devices — with ......
Read more >Qubits and Defining the Quantum Computer | HowStuffWorks
Qubits represent atoms, ions, photons or electrons and their respective control devices that are working together to act as computer memory and a...
Read more >Creating the Heart of a Quantum Computer: Developing Qubits
To create a qubit, scientists have to find a spot in a material where they can access and control these quantum properties. Once...
Read more >A Practical Quantum Instruction Set Architecture - arXiv
Abstract—We introduce an abstract machine archi- tecture for classical/quantum computations—including compilation—along with a quantum instruction lan-.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks @jakelishman, it’s good to know there is work being done on this front. In
circuit = QuantumCircuit(instructions)
I meant thatinstructions
could have typeIterable[Instruction]
whereInstruction
is the (proposed) class that represents “gate + qubits” which does not actually exist in Qiskit currently. By “iterable tree” I meant that it could in fact be a recursive typeInstructionTree = Union[Instruction, Iterable[InstructionTree]]
because this can be flattened into a list of instructions. The qubit ordering wouldn’t be an issue if the user refers to the qubits directly rather than by index.Closing this as it’s not the direction that’s been taken for the data model, because we’re separating the concept of “operation” (
Instruction
, in this case) from its runtime operands (qubits, clbits, some parameters, etc). This is to keep better composibility throughout the library, which will (hopefully) be helping our internal memory usage and avoid a lot of spurious copying in the library.