|
9 | 9 | # that they have been altered from the originals.
|
10 | 10 | from __future__ import annotations
|
11 | 11 |
|
12 |
| -import math |
13 | 12 | from collections.abc import Iterator, Sequence
|
14 | 13 | from typing import Any, Callable
|
15 | 14 |
|
@@ -191,12 +190,16 @@ def _(op: Instruction, qubits: Sequence[int], kwargs: dict[str, Any]):
|
191 | 190 | return quimb.tensor.Gate("X", params=[], qubits=qubits, **kwargs)
|
192 | 191 |
|
193 | 192 |
|
| 193 | +@_register_gate_func("xx_minus_yy") |
| 194 | +def _(op: Instruction, qubits: Sequence[int], kwargs: dict[str, Any]): |
| 195 | + theta, beta = op.params |
| 196 | + return quimb.tensor.Gate("XXMINUSYY", params=[theta, beta], qubits=qubits, **kwargs) |
| 197 | + |
| 198 | + |
194 | 199 | @_register_gate_func("xx_plus_yy")
|
195 | 200 | def _(op: Instruction, qubits: Sequence[int], kwargs: dict[str, Any]):
|
196 | 201 | theta, beta = op.params
|
197 |
| - return quimb.tensor.Gate( |
198 |
| - "GIVENS2", params=[0.5 * theta, beta + 0.5 * math.pi], qubits=qubits, **kwargs |
199 |
| - ) |
| 202 | + return quimb.tensor.Gate("XXPLUSYY", params=[theta, beta], qubits=qubits, **kwargs) |
200 | 203 |
|
201 | 204 |
|
202 | 205 | @_register_gate_func("y")
|
|
0 commit comments