Consistent naming of controlled gates
See original GitHub issueAs discussed with @ewinston, the names of the controlled gates are inconsistent. For instance, the controlled version of HGate
is called CHGate
but YGate
becomes CyGate
. This applies to many others too. We should name them all consistently.
Possible choices would be:
- Only the first letter of the gate name is upper case, i.e.
YGate CyGate RyGate CryGate U3Gate Cu3Gate
- The gate names are full uppercase, i.e.
YGate CYGate RYGate CRYGate U3Gate CU3Gate
- The control gates only prepend a
C
, the gate name is kept, i.e.
YGate CYGate RyGate CRyGate U3Gate CU3Gate
Currently the rotations are called RXGate
, thus 2. and 3. might be the same.
Most rotation gates follow 1., which I personally think looks most aesthetic and fits also with the named gates as Fredkin or Toffoli.
However, I think writing all in uppercase is probably the least error-prone method.
What are the thoughts on this?
Issue Analytics
- State:
- Created 4 years ago
- Comments:14 (14 by maintainers)
Top Results From Across the Web
Quantum logic gate - Wikipedia
Common quantum logic gates by name (including abbreviation), circuit form(s) and the corresponding unitary matrices.
Read more >Circuit Library - Qiskit
Circuit Library ( qiskit.circuit.library )¶. The circuit library is a collection of well-studied and valuable circuits, directives, and gates.
Read more >Gates, States, and Circuits - Gavin E. Crooks
10.3 Decomposition of controlled-unitary gates . ... Phase shift gate [0] The name arrises because this gate shifts the phase of the |1⟩....
Read more >Quantum Information and Computation Chapter 5
This gate flips the second bit if the first is 1, and does nothing if the first bit is 0 (hence the name...
Read more >Constructing Large Controlled Nots - Algorithmic Assertions
For example, go try to find a website or paper describing how to make a reversible increment gate out of Toffoli gates when...
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 Free
Top 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
Yes please I have been wanting to move these gates out of
qiskit.extensions
for 2 years. Moving them toqiskit.circuit.gates
sounds good, and exposing aqiskit.gates
namespace so that one can do:@Cryoris can you start with the gate name standardization/deprecations first and then we do this in steps? Seems everyone is good with uppercase.
IGate
andqc.i
seem fine to me.Achieved via #3695 🚀