Added Rz gate (#290, QAE-1152)
Explanation of changes
Implemented Rz gate
- Added an
Rz
class in the gate_library.
This is essentially a copy of theRxy
gate, except that instead of two parameters,theta
andphi
, there is only onetheta
. I also added aZ
andZ90
class to the gate library which is anRz
wheretheta
is fixed to180
and90
. - Added a pulse factory called
phase_shift
to generate apulse_library.ShiftClockPhase
object.
This is the Rz gate in a transmon qubit. - Added
Rz
referring to thephase_shift
pulse factory in the config of aBasicTransmonElement
.
Motivation of changes
The changes address issue #290 (closed), which stresses that there is no Hadamard gate in the gate library. In a transmon qubit, the Hadamard gate is a combination of two operations, a Y90 followed by a Z. However, there is no way to have a Hadamard gate that contains two sub-gates or operations within it. A pulse operation can have a list of pulses, but this is not true for a gate.
I implemented the Rz
gate since it is useful in any case, and now it enables the user to combine the Y90
gate and the Z
gate to implement a Hadamard on a transmon qubit.
Closes #290 (closed)
Merge checklist
See also merge request guidelines
-
Merge request has been reviewed (in-depth by a knowledgeable contributor), and is approved by a project maintainer. -
New code is covered by unit tests (or N/A). -
New code is documented and docstrings use numpydoc format (or N/A). -
New functionality: considered making private instead of extending public API (or N/A). -
Public API changed: added @deprecated
(or N/A). -
Tested on hardware (or N/A). -
CHANGELOG.md
andAUTHORS.md
have been updated (or N/A). -
Windows tests in CI pipeline pass (manually triggered by maintainers before merging). - Maintainers do not hit Auto-merge, we need to actively check as manual tests do not block pipeline
For reference, the issues workflow is described in the contribution guidelines.
Edited by Edgar Reehuis