Skip to content

Commit ddbeb5d

Browse files
authored
Merge pull request #627 from sandialabs/more-gecr-aliases
More Gecr Aliases
2 parents 63e1ec9 + fe89305 commit ddbeb5d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pygsti/tools/internalgates.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,8 @@ def standard_gatename_unitaries():
196196
* 'Gsqrtiswap' : square-root of ISWAP gate, used in some superconducting qubit platforms.
197197
* 'Gxx', 'Gzz' : MS-style parity gates
198198
* 'Gcres', 'Gecres' : Cross-resonance and echoed cross-resonance gates. Native gate operations common on transmon systems (including IBM).
199-
199+
* 'Gecr' : alternative name for the echoed cross-resonance gate, matching OpenQASM / IBM conventions.
200+
200201
* Non-Clifford gates:
201202
202203
* 'Gt', 'Gtdag' : the T and inverse T gates (T is a Z rotation by pi/4).
@@ -302,7 +303,8 @@ def u_op(exp):
302303
std_unitaries['Gcres'] = _spl.expm(-1j*_np.pi/4*sigmaxz)
303304
std_unitaries['Gecres'] = _np.array([[0, 1, 0., 1j], [1., 0, -1j, 0.],
304305
[0., 1j, 0, 1], [-1j, 0., 1, 0]], complex)/_np.sqrt(2)
305-
306+
std_unitaries['Gecr'] = std_unitaries['Gecres'] # alias
307+
306308
std_unitaries['Gzr'] = Gzr()
307309
std_unitaries['Gczr'] = Gczr()
308310

@@ -403,6 +405,7 @@ def standard_gatenames_stim_conversions():
403405
ecr_unitary = _np.array([[0, 1, 0., 1j], [1., 0, -1j, 0.],
404406
[0., 1j, 0, 1], [-1j, 0., 1, 0]], complex)/_np.sqrt(2)
405407
gate_dict['Gecres'] = stim.Tableau.from_unitary_matrix(ecr_unitary, endian='big')
408+
gate_dict['Gecr'] = gate_dict['Gecres']
406409

407410
return gate_dict
408411

0 commit comments

Comments
 (0)