Skip to main content
Chemistry LibreTexts

8.54: Expressing Bell and GHZ States in Vector Format Using Mathcad

  • Page ID
    148205
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    Mathcad provides the kronecker command for matrix tensor multiplication. It requires square matrices for its arguments and therefore cannot be used directly for vector tensor multiplication. However, if a vector is augmented with a null vector (or matrix) to produce a square matrix, vector tensor multiplication can be carried out using kronecker and a submatrix command that discards everything except the first column of the product matrix. This technique is illustrated by putting the Bell and GHZ states in vector format.

    The z- and x-direction spin eigenfunctions and the appropriate null vector are required.

    \[ \begin{matrix} z_u = \begin{pmatrix} 1 \\ 0 \end{pmatrix} & z_d = \begin{pmatrix} 0 \\ 1 \end{pmatrix} & x_u = \frac{1}{ \sqrt{2}} \begin{pmatrix} 1 \\ 1 \end{pmatrix} & x_d = \frac{1}{ \sqrt{2}} \begin{pmatrix} 1 \\ -1 \end{pmatrix} & n = \begin{pmatrix} 0 \\ 0 \end{pmatrix} \end{matrix} \nonumber \]

    The Mathcad syntax for tensor multiplication of two 2-dimensional vectors.

    \[ \psi \text{(a, b)} = \text{submatrix(kronecker(augment(a, n), augment(b, n)), 1, 4, 1, 1)} \nonumber \]

    The four maximally entangled Bell states will be expressed in both the z- and x-basis.

    \[ | \Phi_p \rangle = \frac{1}{ \sqrt{2}} \left[ | \uparrow_1 \rangle | \uparrow_2 \rangle + | \downarrow_1 \rangle | \downarrow_2 \rangle \right] = \frac{1}{ \sqrt{2}} \left[ \begin{pmatrix} 1 \\ 0 \end{pmatrix} \otimes \begin{pmatrix} 1 \\ 0 \end{pmatrix} + \begin{pmatrix} 0 \\ 1 \end{pmatrix} \otimes \begin{pmatrix} 0 \\ 1 \end{pmatrix} \right] = \frac{1}{ \sqrt{2}} \begin{pmatrix} 1 \\ 0 \\ 0 \\ 1 \end{pmatrix} \nonumber \]

    \[ \begin{matrix} \Phi_p = \frac{1}{ \sqrt{2}} \left( \psi (z_u,~z_u) + \psi (z_d,~z_d) \right) & \Phi_p = \begin{pmatrix} 0.707 \\ 0 \\ 0 \\ 0.707 \end{pmatrix} & \Phi_p = \frac{1}{ \sqrt{2}} \left( \psi (x_u,~x_u) \right) + \left( \psi (x_d,~x_d) \right) & \Phi_p = \begin{pmatrix} 0.707 \\ 0 \\ 0 \\ 0.707 \end{pmatrix} \end{matrix} \nonumber \]

    \[ | \Phi_m \rangle = \frac{1}{ \sqrt{2}} \left[ | \uparrow_1 \rangle | \uparrow_2 \rangle - | \downarrow_1 \rangle | \downarrow_2 \rangle \right] = \frac{1}{ \sqrt{2}} \left[ \begin{pmatrix} 1 \\ 0 \end{pmatrix} \otimes \begin{pmatrix} 1 \\ 0 \end{pmatrix} - \begin{pmatrix} 0 \\ 1 \end{pmatrix} \otimes \begin{pmatrix} 0 \\ 1 \end{pmatrix} \right] = \frac{1}{ \sqrt{2}} \begin{pmatrix} 1 \\ 0 \\ 0 \\ -1 \end{pmatrix} \nonumber \]

    \[ \begin{matrix} \Phi_m = \frac{1}{ \sqrt{2}} \left( \psi (z_u,~z_u) - \psi (z_d,~z_d) \right) & \Phi_m = \begin{pmatrix} 0.707 \\ 0 \\ 0 \\ -0.707 \end{pmatrix} & \Phi_m = \frac{1}{ \sqrt{2}} \left( \psi (x_u,~x_u) \right) + \left( \psi (x_d,~x_d) \right) & \Phi_m = \begin{pmatrix} 0.707 \\ 0 \\ 0 \\ -0.707 \end{pmatrix} \end{matrix} \nonumber \]

    \[ | \Psi_p \rangle = \frac{1}{ \sqrt{2}} \left[ | \uparrow_1 \rangle | \uparrow_2 \rangle + | \downarrow_1 \rangle | \downarrow_2 \rangle \right] = \frac{1}{ \sqrt{2}} \left[ \begin{pmatrix} 1 \\ 0 \end{pmatrix} \otimes \begin{pmatrix} 0 \\ 1 \end{pmatrix} + \begin{pmatrix} 0 \\ 1 \end{pmatrix} \otimes \begin{pmatrix} 1 \\ 0 \end{pmatrix} \right] = \frac{1}{ \sqrt{2}} \begin{pmatrix} 0 \\ 1 \\ 1 \\ 0 \end{pmatrix} \nonumber \]

    \[ \begin{matrix} \Psi_p = \frac{1}{ \sqrt{2}} \left( \psi (z_u,~z_u) + \psi (z_d,~z_d) \right) & \Phi_p = \begin{pmatrix} 0 \\ 0.707 \\ 0.707 \\ 0 \end{pmatrix} & \Psi_p = \frac{1}{ \sqrt{2}} \left( \psi (x_u,~x_u) \right) - \left( \psi (x_d,~x_d) \right) & \Psi_p = \begin{pmatrix} 0 \\ 0.707 \\ 0.707 \\ 0 \end{pmatrix} \end{matrix} \nonumber \]

    \[ | \Psi_m \rangle = \frac{1}{ \sqrt{2}} \left[ | \uparrow_1 \rangle | \uparrow_2 \rangle - | \downarrow_1 \rangle | \downarrow_2 \rangle \right] = \frac{1}{ \sqrt{2}} \left[ \begin{pmatrix} 1 \\ 0 \end{pmatrix} \otimes \begin{pmatrix} 0 \\ 1 \end{pmatrix} - \begin{pmatrix} 0 \\ 1 \end{pmatrix} \otimes \begin{pmatrix} 1 \\ 0 \end{pmatrix} \right] = \frac{1}{ \sqrt{2}} \begin{pmatrix} 0 \\ 1 \\ -1 \\ 0 \end{pmatrix} \nonumber \]

    \[ \begin{matrix} \Psi_m = \frac{1}{ \sqrt{2}} \left( \psi (z_u,~z_u) - \psi (z_d,~z_d) \right) & \Psi_m = \begin{pmatrix} 0 \\ 0.707 \\ -0.707 \\ 0 \end{pmatrix} & \Psi_m = \frac{1}{ \sqrt{2}} \left( \psi (x_u,~x_u) \right) - \left( \psi (x_d,~x_d) \right) & \Psi_m = \begin{pmatrix} 0 \\ 0.707 \\ -0.707 \\ 0 \end{pmatrix} \end{matrix} \nonumber \]

    The Mathcad syntax for tensor multiplication of three 2-dimensional vectors.

    \[ \Psi \text{(a, b, c)} = \text{submatrix(kronecker(augment(a, n), kronecker(augment(b, n), augment(c, n))), 1, 8, 1, 1)} \nonumber \]

    \[ | \Psi \rangle = \frac{1}{ \sqrt{2}} \left[ \begin{pmatrix} 1 \\ 0 \end{pmatrix} \otimes \begin{pmatrix} 1 \\ 0 \end{pmatrix} \otimes \begin{pmatrix} 1 \\ 0 \end{pmatrix} \pm \begin{pmatrix} 0 \\ 1 \end{pmatrix} \otimes \begin{pmatrix} 0 \\ 1 \end{pmatrix} \otimes \begin{pmatrix} 0 \\ 1 \end{pmatrix} \right] = \frac{1}{ \sqrt{2}} \begin{pmatrix} 1 & 0 & 0 & 0 & 0 & 0 & 0 & \pm 1 \end{pmatrix}^T \nonumber \]

    \[ \begin{matrix} \Psi_1 = \frac{1}{ \sqrt{2}} \left( \psi (z_u,~z_u,~z_u) + \psi (z_d,~z_d,~z_d) \right) & \Psi_1^T = \begin{pmatrix} 0.707 & 0 & 0 & 0 & 0 & 0 & 0 & 0.707 \end{pmatrix} \\ \Psi_2 = \frac{1}{ \sqrt{2}} \left( \psi (z_u,~z_u,~z_u) - \psi (z_d,~z_d,~z_d) \right) & \Psi_2^T = \begin{pmatrix} 0.707 & 0 & 0 & 0 & 0 & 0 & 0 & -0.707 \end{pmatrix} \end{matrix} \nonumber \]

    \[ | \Psi \rangle = \frac{1}{ \sqrt{2}} \left[ \begin{pmatrix} 1 \\ 0 \end{pmatrix} \otimes \begin{pmatrix} 1 \\ 0 \end{pmatrix} \otimes \begin{pmatrix} 0 \\ 1 \end{pmatrix} \pm \begin{pmatrix} 0 \\ 1 \end{pmatrix} \otimes \begin{pmatrix} 0 \\ 1 \end{pmatrix} \otimes \begin{pmatrix} 1 \\ 0 \end{pmatrix} \right] = \frac{1}{ \sqrt{2}} \begin{pmatrix} 0 & 1 & 0 & 0 & 0 & 0 & \pm 1 & 0 \end{pmatrix}^T \nonumber \]

    \[ \begin{matrix} \Psi_3 = \frac{1}{ \sqrt{2}} \left( \psi (z_u,~z_u,~z_d) + \psi (z_d,~z_d,~z_u) \right) & \Psi_3^T = \begin{pmatrix} 0 & 0.707 & 0 & 0 & 0 & 0 & 0.707 & 0 \end{pmatrix} \\ \Psi_4 = \frac{1}{ \sqrt{2}} \left( \psi (z_u,~z_u,~z_d) - \psi (z_d,~z_d,~z_u) \right) & \Psi_4^T = \begin{pmatrix} 0 & 0.707 & 0 & 0 & 0 & 0 & -0.707 & 0 \end{pmatrix} \end{matrix} \nonumber \]

    \[ | \Psi \rangle = \frac{1}{ \sqrt{2}} \left[ \begin{pmatrix} 1 \\ 0 \end{pmatrix} \otimes \begin{pmatrix} 0 \\ 1 \end{pmatrix} \otimes \begin{pmatrix} 1 \\ 0 \end{pmatrix} \pm \begin{pmatrix} 0 \\ 1 \end{pmatrix} \otimes \begin{pmatrix} 1 \\ 0 \end{pmatrix} \otimes \begin{pmatrix} 0 \\ 1 \end{pmatrix} \right] = \frac{1}{ \sqrt{2}} \begin{pmatrix} 0 & 0 & 1 & 0 & 0 & \pm 1 & 0 & 0 \end{pmatrix}^T \nonumber \]

    \[ \begin{matrix} \Psi_5 = \frac{1}{ \sqrt{2}} \left( \psi (z_u,~z_d,~z_u) + \psi (z_d,~z_u,~z_d) \right) & \Psi_5^T = \begin{pmatrix} 0 & 0 & 0.707 & 0 & 0 & 0.707 & 0 & 0 \end{pmatrix} \\ \Psi_6 = \frac{1}{ \sqrt{2}} \left( \psi (z_u,~z_d,~z_u) - \psi (z_d,~z_u,~z_d) \right) & \Psi_6^T = \begin{pmatrix} 0 & 0 & 0.707 & 0 & 0 & -0.707 & 0 & 0 \end{pmatrix} \end{matrix} \nonumber \]

    \[ | \Psi \rangle = \frac{1}{ \sqrt{2}} \left[ \begin{pmatrix} 1 \\ 0 \end{pmatrix} \otimes \begin{pmatrix} 0 \\ 1 \end{pmatrix} \otimes \begin{pmatrix} 0 \\ 1 \end{pmatrix} \pm \begin{pmatrix} 1 \\ 0 \end{pmatrix} \otimes \begin{pmatrix} 1 \\ 0 \end{pmatrix} \otimes \begin{pmatrix} 0 \\ 1 \end{pmatrix} \right] = \frac{1}{ \sqrt{2}} \begin{pmatrix} 0 & 0 & 0 & 1 & \pm 1 & 0 & 0 & 0 \end{pmatrix}^T \nonumber \]

    \[ \begin{matrix} \Psi_7 = \frac{1}{ \sqrt{2}} \left( \psi (z_u,~z_d,~z_d) + \psi (z_d,~z_u,~z_u) \right) & \Psi_7^T = \begin{pmatrix} 0 & 0 & 0 & 0.707 & 0.707 & 0 & 0 & 0 \end{pmatrix} \\ \Psi_8 = \frac{1}{ \sqrt{2}} \left( \psi (z_u,~z_d,~z_d) - \psi (z_d,~z_u,~z_u) \right) & \Psi_8^T = \begin{pmatrix} 0 & 0 & 0 & 0.707 & -0.707 & 0 & 0 & 0 \end{pmatrix} \end{matrix} \nonumber \]


    This page titled 8.54: Expressing Bell and GHZ States in Vector Format Using Mathcad is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by Frank Rioux via source content that was edited to the style and standards of the LibreTexts platform.