Naming rotations
See original GitHub issueThis issue seeks to settle the naming convention for factory functions that produce gate instances given rotation angles. I found the following factories:
Rx, Ry, Rz, GivensRotation, ISwapRotation, MS
These are clearly inconsistent. Proposals:
Rx, Ry, Rz, Rgivens, Riswap, Rms
rx, ry, rz, rgivens, riswap, rms
XRotation, YRotation, ZRotation, GivensRotation, ISwapRotation, MSRotation
x_rotation, y_rotation, z_rotation, givens_rotation, iswap_rotation, ms_rotation
I’m uneasy about conventions that lead to names like cirq.rms
since this may be interpreted as “root mean square”.
To broaden the set of examples, here are some names we may reasonably anticipate in future:
Rzz, pauli_string_rotation
Context: comment
Thoughts?
Issue Analytics
- State:
- Created 4 years ago
- Comments:16 (1 by maintainers)
Top Results From Across the Web
Rotations - Varsity Tutors
A rotation is a transformation in a plane that turns every point of a preimage through a specified angle and direction about a...
Read more >1.7 Rules for Rotations
In geometry, a transformation is an operation that moves, flips, or changes a shape to create a new shape. A rotation is an...
Read more >Rotations - Google Workspace Marketplace
Rotations enables users to provide a list of names that should be rotated through in naming calendar events.
Read more >Rotation - MathBitsNotebook(JR)
Rotations may be clockwise (CW) or counterclockwise (CCW). • Naming (lettering) a figure in a translation occurs in the same direction in both...
Read more >Name Rotation - GeoGebra
Name Rotation. Author: 99007497. Topic: Rotation. GeoGebra Applet Press Enter to start activity. New Resources. Exploring Line Reflections in the Coordinate ...
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
Rms
reads like root mean square.Rgivens
andRiswap
are sorta logical given the first three, but very weird on their own. Violates python naming convention.rms
reads like root mean square.rgivens
andriswap
are sorta logical given the first three, but very weird on their own. Semi-violates python naming convention in that there would normally be an underscore after ther
.The names for X/Y/Z are too long IMO. The most common gates should have short names.
MSRotation
seems wrong; like sayingHadamardRotation
. I get what it means but it’s odd. Violates python naming convention.Too long x/y/z.
ms_rotation
seems strange.Lacks consistency across them, but honestly I like this one the best by far. Avoiding the rotation word for two qubit operations seems to be a good idea.
The only major problem, I think, is that it will be confusing to have
iswap
andISWAP
.ok