From 228c7e6f13707aad3029b7efb2c45d254b05ce32 Mon Sep 17 00:00:00 2001 From: jli0108 Date: Tue, 27 Jun 2023 14:33:56 -0400 Subject: [PATCH] Fix LaTeX formatting for arbitrary-angle MS gate (#6166) --- cirq-ionq/cirq_ionq/ionq_native_gates.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cirq-ionq/cirq_ionq/ionq_native_gates.py b/cirq-ionq/cirq_ionq/ionq_native_gates.py index bf8bae3b21c..57999fb11bd 100644 --- a/cirq-ionq/cirq_ionq/ionq_native_gates.py +++ b/cirq-ionq/cirq_ionq/ionq_native_gates.py @@ -179,14 +179,14 @@ def __pow__(self, power): class MSGate(cirq.Gate): r"""The Mølmer–Sørensen (MS) gate is a two qubit gate native to trapped ions. - The unitary matrix of this gate for parameters $\phi_0$, $\phi_1$ and $\theta is + The unitary matrix of this gate for parameters $\phi_0$, $\phi_1$ and $\theta$ is $$ \begin{bmatrix} - cos{\theta/2} & 0 & 0 & -i*e^{-i*2*\pi(\phi_0+\phi_1)}*sin{\theta/2} \\ - 0 & cos{\theta/2} & -i*e^{-i*2*\pi(\phi_0-\phi_1)}*sin{\theta/2} & 0 \\ - 0 & -i*e^{i*2*\pi(\phi_0-\phi_1)}*sin(\theta/2) & cos{\theta/2} & 0 \\ - -i*e^{i*2*\pi(\phi_0+\phi_1)}*sin{\theta/2} & 0 & 0 & cos{\theta/2} + \cos\frac{\theta}{2} & 0 & 0 & -ie^{-i2\pi(\phi_0+\phi_1)}\sin\frac{\theta}{2} \\ + 0 & \cos\frac{\theta}{2} & -ie^{-i2\pi(\phi_0-\phi_1)}\sin\frac{\theta}{2} & 0 \\ + 0 & -ie^{i2\pi(\phi_0-\phi_1)}\sin\frac{\theta}{2} & \cos\frac{\theta}{2} & 0 \\ + -ie^{i2\pi(\phi_0+\phi_1)}\sin\frac{\theta}{2} & 0 & 0 & \cos\frac{\theta}{2} \end{bmatrix} $$