Skip to content

Commit b288eb4

Browse files
committed
Circuit to OpenQASM conversion breaks when using ECR gates
Fixes #608 Added `"Gecres"` conversion to `"ecr"`. Since `"Gecres"` is the key associated with the ECR unitary and is most likely used in existing processor specs, this seemed like the fix least likely to break existing code.
1 parent 6f11b0d commit b288eb4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pygsti/tools/internalgates.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -730,6 +730,7 @@ def standard_gatenames_openqasm_conversions(version='u3'):
730730
std_gatenames_to_qasm['Gc23'] = ['u3(0, 0, 4.71238898038469)'] # [0, 0, 3] * pi/2 (this is Gzmpi2 / Gpdag)
731731

732732
std_gatenames_to_qasm['Gecr'] = ['ecr']
733+
std_gatenames_to_qasm['Gecres'] = ['ecr']
733734

734735
std_gatenames_to_argmap = {}
735736
std_gatenames_to_argmap['Gzr'] = lambda gatearg: ['u3(0, 0, ' + str(gatearg[0]) + ')']
@@ -785,6 +786,7 @@ def standard_gatenames_openqasm_conversions(version='u3'):
785786
std_gatenames_to_qasm['Gtdag'] = ['rz(5.497787143782138)']
786787

787788
std_gatenames_to_qasm['Gecr'] = ['ecr']
789+
std_gatenames_to_qasm['Gecres'] = ['ecr']
788790

789791
std_gatenames_to_argmap = {}
790792
std_gatenames_to_argmap['Gzr'] = lambda gatearg: ['rz(' + str(gatearg[0]) + ')']

0 commit comments

Comments
 (0)