Skip to content

More Gecr Aliases #627

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 5, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions pygsti/tools/internalgates.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,8 @@ def standard_gatename_unitaries():
* 'Gsqrtiswap' : square-root of ISWAP gate, used in some superconducting qubit platforms.
* 'Gxx', 'Gzz' : MS-style parity gates
* 'Gcres', 'Gecres' : Cross-resonance and echoed cross-resonance gates. Native gate operations common on transmon systems (including IBM).

* 'Gecr' : alternative name for the echoed cross-resonance gate, matching OpenQASM / IBM conventions.

* Non-Clifford gates:

* 'Gt', 'Gtdag' : the T and inverse T gates (T is a Z rotation by pi/4).
Expand Down Expand Up @@ -302,7 +303,8 @@ def u_op(exp):
std_unitaries['Gcres'] = _spl.expm(-1j*_np.pi/4*sigmaxz)
std_unitaries['Gecres'] = _np.array([[0, 1, 0., 1j], [1., 0, -1j, 0.],
[0., 1j, 0, 1], [-1j, 0., 1, 0]], complex)/_np.sqrt(2)

std_unitaries['Gecr'] = std_unitaries['Gecres'] # alias

std_unitaries['Gzr'] = Gzr()
std_unitaries['Gczr'] = Gczr()

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

return gate_dict

Expand Down
Loading