<div class="xblock xblock-public_view xblock-public_view-vertical" data-init="VerticalStudentView" data-runtime-version="1" data-block-type="vertical" data-graded="True" data-request-token="fa7dec00732711efbae20e3672a9417f" data-usage-id="block-v1:MITx+8.370.1x+1T2018+type@vertical+block@Pauli_matrices" data-has-score="False" data-course-id="course-v1:MITx+8.370.1x+1T2018" data-runtime-class="LmsRuntime">
<h2 class="hd hd-2 unit-title">Pauli matrices</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.370.1x+1T2018+type@problem+block@Eigenvalues__eigenstates">
<div class="xblock xblock-public_view xblock-public_view-problem xmodule_display xmodule_ProblemBlock" data-init="XBlockToXModuleShim" data-runtime-version="1" data-block-type="problem" data-graded="True" data-request-token="fa7dec00732711efbae20e3672a9417f" data-usage-id="block-v1:MITx+8.370.1x+1T2018+type@problem+block@Eigenvalues__eigenstates" data-has-score="True" data-course-id="course-v1:MITx+8.370.1x+1T2018" data-runtime-class="LmsRuntime">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Problem"}
</script>
<div id="problem_Eigenvalues__eigenstates" class="problems-wrapper" role="group"
aria-labelledby="Eigenvalues__eigenstates-problem-title"
data-problem-id="block-v1:MITx+8.370.1x+1T2018+type@problem+block@Eigenvalues__eigenstates" data-url="/courses/course-v1:MITx+8.370.1x+1T2018/xblock/block-v1:MITx+8.370.1x+1T2018+type@problem+block@Eigenvalues__eigenstates/handler/xmodule_handler"
data-problem-score="0"
data-problem-total-possible="12"
data-attempts-used="0"
data-content="
<h3 class="hd hd-3 problem-header" id="Eigenvalues__eigenstates-problem-title" aria-describedby="block-v1:MITx+8.370.1x+1T2018+type@problem+block@Eigenvalues__eigenstates-problem-progress" tabindex="-1">
Eigenvalues, eigenstates
</h3>
<div class="problem-progress" id="block-v1:MITx+8.370.1x+1T2018+type@problem+block@Eigenvalues__eigenstates-problem-progress"></div>
<div class="problem">
<div>
<p>
Recall from linear algebra that any normal linear operator [mathjaxinline]A[/mathjaxinline] (normal linear operator satisfies [mathjaxinline]AA^{\dagger }=A^{\dagger }A[/mathjaxinline]) allows for a <a href="https://en.wikipedia.org/wiki/Eigendecomposition_of_a_matrix" target="_blank">spectral decomposition</a> [mathjaxinline]A=\sum _ i a_ i |{i}\rangle \! \langle {i}|[/mathjaxinline] where [mathjaxinline]a_ i[/mathjaxinline] is called eigenvalue and [mathjaxinline]|{i}\rangle[/mathjaxinline] is called eigenvector or eigenstate when [mathjaxinline]A[/mathjaxinline] is <a href="https://en.wikipedia.org/wiki/Hermitian_matrix" target="_blank">Hermitian</a>. </p>
<p>
The <a href="https://en.wikipedia.org/wiki/Pauli_matrices" target="_blank">Pauli matrices</a> with [mathjaxinline]Z[/mathjaxinline] basis are </p>
<table id="a0000000007" class="equation" width="100%" cellspacing="0" cellpadding="7" style="table-layout:auto">
<tr>
<td class="equation" style="width:80%; border:none">[mathjax]I= \begin{pmatrix} 1 &amp; 0\\ 0&amp; 1 \end{pmatrix} , X= \begin{pmatrix} 0 &amp; 1\\ 1&amp; 0 \end{pmatrix} , Y= \begin{pmatrix} 0 &amp; -i\\ i&amp; 0 \end{pmatrix} , Z= \begin{pmatrix} 1 &amp; 0\\ 0&amp; -1 \end{pmatrix}[/mathjax]</td>
<td class="eqnnum" style="width:20%; border:none;text-align:right">(1.4)</td>
</tr>
</table>
<p>
Compute the sets of eigenvalue and eigenstate for each Pauli matrix. Note that each Pauli matrix has a positive eigenvalue and a negative eigenvalue. Express the eigenstates with [mathjaxinline]Z[/mathjaxinline] basis ([mathjaxinline]\{ |{0}\rangle ,|{1}\rangle \}[/mathjaxinline]) using the ket notation. </p>
<p>
Type in <tt class="ttfamily">|0&gt;</tt> for [mathjaxinline]|{0}\rangle[/mathjaxinline] etc. and <tt class="ttfamily">sqrt(2)</tt> for [mathjaxinline]\sqrt{2}[/mathjaxinline]. For multiplication, do not forget to type <tt class="ttfamily">*</tt>. For instance, you should type in <tt class="ttfamily">2*|0&gt;</tt> for [mathjaxinline]2|{0}\rangle[/mathjaxinline]. You may use <tt class="ttfamily">i</tt> for [mathjaxinline]i[/mathjaxinline]. Also, please take the global phase so that the coefficient of [mathjaxinline]|{0}\rangle[/mathjaxinline] is a positive real number. </p>
<p>
[mathjaxinline]X[/mathjaxinline]: <p style="display:inline">positive eigenvalue =</p> <div class="inline" tabindex="-1" aria-label="Question 1" role="group"><div id="inputtype_Eigenvalues__eigenstates_2_1" class=" capa_inputtype inline textline">
<div class="unanswered inline">
<input type="text" name="input_Eigenvalues__eigenstates_2_1" id="input_Eigenvalues__eigenstates_2_1" aria-describedby="status_Eigenvalues__eigenstates_2_1" value=""/>
<span class="trailing_text" id="trailing_text_Eigenvalues__eigenstates_2_1"/>
<span class="status unanswered" id="status_Eigenvalues__eigenstates_2_1" data-tooltip="Not yet answered.">
<span class="sr">unanswered</span><span class="status-icon" aria-hidden="true"/>
</span>
<p id="answer_Eigenvalues__eigenstates_2_1" class="answer"/>
</div>
</div></div>, <p style="display:inline">eigenstate =</p> <div class="inline" tabindex="-1" aria-label="Question 2" role="group"><div id="inputtype_Eigenvalues__eigenstates_3_1" class="text-input-dynamath capa_inputtype inline textline">
<div class="text-input-dynamath_data inline" data-preprocessor="MathjaxPreprocessorForQM"/>
<div class="script_placeholder" data-src="/assets/courseware/v1/95fe583d41f010195cf50c9f61992d94/asset-v1:MITx+8.370.1x+1T2018+type@asset+block/mathjax_preprocessor_for_QM_H.js"/>
<div class="unanswered inline">
<input type="text" name="input_Eigenvalues__eigenstates_3_1" id="input_Eigenvalues__eigenstates_3_1" aria-describedby="status_Eigenvalues__eigenstates_3_1" value="" class="math"/>
<span class="trailing_text" id="trailing_text_Eigenvalues__eigenstates_3_1"/>
<span class="status unanswered" id="status_Eigenvalues__eigenstates_3_1" data-tooltip="Not yet answered.">
<span class="sr">unanswered</span><span class="status-icon" aria-hidden="true"/>
</span>
<p id="answer_Eigenvalues__eigenstates_3_1" class="answer"/>
<div id="display_Eigenvalues__eigenstates_3_1" class="equation">`{::}`</div>
<textarea style="display:none" id="input_Eigenvalues__eigenstates_3_1_dynamath" name="input_Eigenvalues__eigenstates_3_1_dynamath"/>
</div>
</div></div> </p>
<p><p style="display:inline">negative eigenvalue =</p><div class="inline" tabindex="-1" aria-label="Question 3" role="group"><div id="inputtype_Eigenvalues__eigenstates_4_1" class=" capa_inputtype inline textline">
<div class="unanswered inline">
<input type="text" name="input_Eigenvalues__eigenstates_4_1" id="input_Eigenvalues__eigenstates_4_1" aria-describedby="status_Eigenvalues__eigenstates_4_1" value=""/>
<span class="trailing_text" id="trailing_text_Eigenvalues__eigenstates_4_1"/>
<span class="status unanswered" id="status_Eigenvalues__eigenstates_4_1" data-tooltip="Not yet answered.">
<span class="sr">unanswered</span><span class="status-icon" aria-hidden="true"/>
</span>
<p id="answer_Eigenvalues__eigenstates_4_1" class="answer"/>
</div>
</div></div>, <p style="display:inline">eigenstate =</p><div class="inline" tabindex="-1" aria-label="Question 4" role="group"><div id="inputtype_Eigenvalues__eigenstates_5_1" class="text-input-dynamath capa_inputtype inline textline">
<div class="text-input-dynamath_data inline" data-preprocessor="MathjaxPreprocessorForQM"/>
<div class="script_placeholder" data-src="/assets/courseware/v1/95fe583d41f010195cf50c9f61992d94/asset-v1:MITx+8.370.1x+1T2018+type@asset+block/mathjax_preprocessor_for_QM_H.js"/>
<div class="unanswered inline">
<input type="text" name="input_Eigenvalues__eigenstates_5_1" id="input_Eigenvalues__eigenstates_5_1" aria-describedby="status_Eigenvalues__eigenstates_5_1" value="" class="math"/>
<span class="trailing_text" id="trailing_text_Eigenvalues__eigenstates_5_1"/>
<span class="status unanswered" id="status_Eigenvalues__eigenstates_5_1" data-tooltip="Not yet answered.">
<span class="sr">unanswered</span><span class="status-icon" aria-hidden="true"/>
</span>
<p id="answer_Eigenvalues__eigenstates_5_1" class="answer"/>
<div id="display_Eigenvalues__eigenstates_5_1" class="equation">`{::}`</div>
<textarea style="display:none" id="input_Eigenvalues__eigenstates_5_1_dynamath" name="input_Eigenvalues__eigenstates_5_1_dynamath"/>
</div>
</div></div></p>
<p>
[mathjaxinline]Y[/mathjaxinline]: <p style="display:inline">positive eigenvalue =</p> <div class="inline" tabindex="-1" aria-label="Question 5" role="group"><div id="inputtype_Eigenvalues__eigenstates_6_1" class=" capa_inputtype inline textline">
<div class="unanswered inline">
<input type="text" name="input_Eigenvalues__eigenstates_6_1" id="input_Eigenvalues__eigenstates_6_1" aria-describedby="status_Eigenvalues__eigenstates_6_1" value=""/>
<span class="trailing_text" id="trailing_text_Eigenvalues__eigenstates_6_1"/>
<span class="status unanswered" id="status_Eigenvalues__eigenstates_6_1" data-tooltip="Not yet answered.">
<span class="sr">unanswered</span><span class="status-icon" aria-hidden="true"/>
</span>
<p id="answer_Eigenvalues__eigenstates_6_1" class="answer"/>
</div>
</div></div>, <p style="display:inline">eigenstate =</p> <div class="inline" tabindex="-1" aria-label="Question 6" role="group"><div id="inputtype_Eigenvalues__eigenstates_7_1" class="text-input-dynamath capa_inputtype inline textline">
<div class="text-input-dynamath_data inline" data-preprocessor="MathjaxPreprocessorForQM"/>
<div class="script_placeholder" data-src="/assets/courseware/v1/95fe583d41f010195cf50c9f61992d94/asset-v1:MITx+8.370.1x+1T2018+type@asset+block/mathjax_preprocessor_for_QM_H.js"/>
<div class="unanswered inline">
<input type="text" name="input_Eigenvalues__eigenstates_7_1" id="input_Eigenvalues__eigenstates_7_1" aria-describedby="status_Eigenvalues__eigenstates_7_1" value="" class="math"/>
<span class="trailing_text" id="trailing_text_Eigenvalues__eigenstates_7_1"/>
<span class="status unanswered" id="status_Eigenvalues__eigenstates_7_1" data-tooltip="Not yet answered.">
<span class="sr">unanswered</span><span class="status-icon" aria-hidden="true"/>
</span>
<p id="answer_Eigenvalues__eigenstates_7_1" class="answer"/>
<div id="display_Eigenvalues__eigenstates_7_1" class="equation">`{::}`</div>
<textarea style="display:none" id="input_Eigenvalues__eigenstates_7_1_dynamath" name="input_Eigenvalues__eigenstates_7_1_dynamath"/>
</div>
</div></div> </p>
<p><p style="display:inline">negative eigenvalue =</p><div class="inline" tabindex="-1" aria-label="Question 7" role="group"><div id="inputtype_Eigenvalues__eigenstates_8_1" class=" capa_inputtype inline textline">
<div class="unanswered inline">
<input type="text" name="input_Eigenvalues__eigenstates_8_1" id="input_Eigenvalues__eigenstates_8_1" aria-describedby="status_Eigenvalues__eigenstates_8_1" value=""/>
<span class="trailing_text" id="trailing_text_Eigenvalues__eigenstates_8_1"/>
<span class="status unanswered" id="status_Eigenvalues__eigenstates_8_1" data-tooltip="Not yet answered.">
<span class="sr">unanswered</span><span class="status-icon" aria-hidden="true"/>
</span>
<p id="answer_Eigenvalues__eigenstates_8_1" class="answer"/>
</div>
</div></div>, <p style="display:inline">eigenstate =</p><div class="inline" tabindex="-1" aria-label="Question 8" role="group"><div id="inputtype_Eigenvalues__eigenstates_9_1" class="text-input-dynamath capa_inputtype inline textline">
<div class="text-input-dynamath_data inline" data-preprocessor="MathjaxPreprocessorForQM"/>
<div class="script_placeholder" data-src="/assets/courseware/v1/95fe583d41f010195cf50c9f61992d94/asset-v1:MITx+8.370.1x+1T2018+type@asset+block/mathjax_preprocessor_for_QM_H.js"/>
<div class="unanswered inline">
<input type="text" name="input_Eigenvalues__eigenstates_9_1" id="input_Eigenvalues__eigenstates_9_1" aria-describedby="status_Eigenvalues__eigenstates_9_1" value="" class="math"/>
<span class="trailing_text" id="trailing_text_Eigenvalues__eigenstates_9_1"/>
<span class="status unanswered" id="status_Eigenvalues__eigenstates_9_1" data-tooltip="Not yet answered.">
<span class="sr">unanswered</span><span class="status-icon" aria-hidden="true"/>
</span>
<p id="answer_Eigenvalues__eigenstates_9_1" class="answer"/>
<div id="display_Eigenvalues__eigenstates_9_1" class="equation">`{::}`</div>
<textarea style="display:none" id="input_Eigenvalues__eigenstates_9_1_dynamath" name="input_Eigenvalues__eigenstates_9_1_dynamath"/>
</div>
</div></div></p>
<p>
[mathjaxinline]Z[/mathjaxinline]: <p style="display:inline">positive eigenvalue =</p> <div class="inline" tabindex="-1" aria-label="Question 9" role="group"><div id="inputtype_Eigenvalues__eigenstates_10_1" class=" capa_inputtype inline textline">
<div class="unanswered inline">
<input type="text" name="input_Eigenvalues__eigenstates_10_1" id="input_Eigenvalues__eigenstates_10_1" aria-describedby="status_Eigenvalues__eigenstates_10_1" value=""/>
<span class="trailing_text" id="trailing_text_Eigenvalues__eigenstates_10_1"/>
<span class="status unanswered" id="status_Eigenvalues__eigenstates_10_1" data-tooltip="Not yet answered.">
<span class="sr">unanswered</span><span class="status-icon" aria-hidden="true"/>
</span>
<p id="answer_Eigenvalues__eigenstates_10_1" class="answer"/>
</div>
</div></div>, <p style="display:inline">eigenstate =</p> <div class="inline" tabindex="-1" aria-label="Question 10" role="group"><div id="inputtype_Eigenvalues__eigenstates_11_1" class="text-input-dynamath capa_inputtype inline textline">
<div class="text-input-dynamath_data inline" data-preprocessor="MathjaxPreprocessorForQM"/>
<div class="script_placeholder" data-src="/assets/courseware/v1/95fe583d41f010195cf50c9f61992d94/asset-v1:MITx+8.370.1x+1T2018+type@asset+block/mathjax_preprocessor_for_QM_H.js"/>
<div class="unanswered inline">
<input type="text" name="input_Eigenvalues__eigenstates_11_1" id="input_Eigenvalues__eigenstates_11_1" aria-describedby="status_Eigenvalues__eigenstates_11_1" value="" class="math"/>
<span class="trailing_text" id="trailing_text_Eigenvalues__eigenstates_11_1"/>
<span class="status unanswered" id="status_Eigenvalues__eigenstates_11_1" data-tooltip="Not yet answered.">
<span class="sr">unanswered</span><span class="status-icon" aria-hidden="true"/>
</span>
<p id="answer_Eigenvalues__eigenstates_11_1" class="answer"/>
<div id="display_Eigenvalues__eigenstates_11_1" class="equation">`{::}`</div>
<textarea style="display:none" id="input_Eigenvalues__eigenstates_11_1_dynamath" name="input_Eigenvalues__eigenstates_11_1_dynamath"/>
</div>
</div></div> </p>
<p><p style="display:inline">negative eigenvalue =</p><div class="inline" tabindex="-1" aria-label="Question 11" role="group"><div id="inputtype_Eigenvalues__eigenstates_12_1" class=" capa_inputtype inline textline">
<div class="unanswered inline">
<input type="text" name="input_Eigenvalues__eigenstates_12_1" id="input_Eigenvalues__eigenstates_12_1" aria-describedby="status_Eigenvalues__eigenstates_12_1" value=""/>
<span class="trailing_text" id="trailing_text_Eigenvalues__eigenstates_12_1"/>
<span class="status unanswered" id="status_Eigenvalues__eigenstates_12_1" data-tooltip="Not yet answered.">
<span class="sr">unanswered</span><span class="status-icon" aria-hidden="true"/>
</span>
<p id="answer_Eigenvalues__eigenstates_12_1" class="answer"/>
</div>
</div></div>, <p style="display:inline">eigenstate =</p><div class="inline" tabindex="-1" aria-label="Question 12" role="group"><div id="inputtype_Eigenvalues__eigenstates_13_1" class="text-input-dynamath capa_inputtype inline textline">
<div class="text-input-dynamath_data inline" data-preprocessor="MathjaxPreprocessorForQM"/>
<div class="script_placeholder" data-src="/assets/courseware/v1/95fe583d41f010195cf50c9f61992d94/asset-v1:MITx+8.370.1x+1T2018+type@asset+block/mathjax_preprocessor_for_QM_H.js"/>
<div class="unanswered inline">
<input type="text" name="input_Eigenvalues__eigenstates_13_1" id="input_Eigenvalues__eigenstates_13_1" aria-describedby="status_Eigenvalues__eigenstates_13_1" value="" class="math"/>
<span class="trailing_text" id="trailing_text_Eigenvalues__eigenstates_13_1"/>
<span class="status unanswered" id="status_Eigenvalues__eigenstates_13_1" data-tooltip="Not yet answered.">
<span class="sr">unanswered</span><span class="status-icon" aria-hidden="true"/>
</span>
<p id="answer_Eigenvalues__eigenstates_13_1" class="answer"/>
<div id="display_Eigenvalues__eigenstates_13_1" class="equation">`{::}`</div>
<textarea style="display:none" id="input_Eigenvalues__eigenstates_13_1_dynamath" name="input_Eigenvalues__eigenstates_13_1_dynamath"/>
</div>
</div></div></p>
<p>
<div class="solution-span">
<span id="solution_Eigenvalues__eigenstates_solution_1"/>
</div></p>
</div>
<div class="action">
<input type="hidden" name="problem_id" value="Eigenvalues, eigenstates" />
<div class="submit-attempt-container">
<button type="button" class="submit btn-brand" data-submitting="Submitting" data-value="Submit" data-should-enable-submit-button="True" aria-describedby="submission_feedback_Eigenvalues__eigenstates" >
<span class="submit-label">Submit</span>
</button>
<div class="submission-feedback" id="submission_feedback_Eigenvalues__eigenstates">
<span class="sr">Some problems have options such as save, reset, hints, or show answer. These options follow the Submit button.</span>
</div>
</div>
<div class="problem-action-buttons-wrapper">
<span class="problem-action-button-wrapper">
<button type="button" class="save problem-action-btn btn-default btn-small" data-value="Save">
<span class="icon fa fa-floppy-o" aria-hidden="true"></span>
<span aria-hidden="true">Save</span>
<span class="sr">Save your answer</span>
</button>
</span>
</div>
</div>
<div class="notification warning notification-gentle-alert
is-hidden"
tabindex="-1">
<span class="icon fa fa-exclamation-circle" aria-hidden="true"></span>
<span class="notification-message" aria-describedby="Eigenvalues__eigenstates-problem-title">
</span>
<div class="notification-btn-wrapper">
<button type="button" class="btn btn-default btn-small notification-btn review-btn sr">Review</button>
</div>
</div>
<div class="notification warning notification-save
is-hidden"
tabindex="-1">
<span class="icon fa fa-save" aria-hidden="true"></span>
<span class="notification-message" aria-describedby="Eigenvalues__eigenstates-problem-title">None
</span>
<div class="notification-btn-wrapper">
<button type="button" class="btn btn-default btn-small notification-btn review-btn sr">Review</button>
</div>
</div>
<div class="notification general notification-show-answer
is-hidden"
tabindex="-1">
<span class="icon fa fa-info-circle" aria-hidden="true"></span>
<span class="notification-message" aria-describedby="Eigenvalues__eigenstates-problem-title">Answers are displayed within the problem
</span>
<div class="notification-btn-wrapper">
<button type="button" class="btn btn-default btn-small notification-btn review-btn sr">Review</button>
</div>
</div>
</div>
"
data-graded="True">
<p class="loading-spinner">
<i class="fa fa-spinner fa-pulse fa-2x fa-fw"></i>
<span class="sr">Loading…</span>
</p>
</div>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+8.370.1x+1T2018+type@problem+block@Basis_changes">
<div class="xblock xblock-public_view xblock-public_view-problem xmodule_display xmodule_ProblemBlock" data-init="XBlockToXModuleShim" data-runtime-version="1" data-block-type="problem" data-graded="True" data-request-token="fa7dec00732711efbae20e3672a9417f" data-usage-id="block-v1:MITx+8.370.1x+1T2018+type@problem+block@Basis_changes" data-has-score="True" data-course-id="course-v1:MITx+8.370.1x+1T2018" data-runtime-class="LmsRuntime">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Problem"}
</script>
<div id="problem_Basis_changes" class="problems-wrapper" role="group"
aria-labelledby="Basis_changes-problem-title"
data-problem-id="block-v1:MITx+8.370.1x+1T2018+type@problem+block@Basis_changes" data-url="/courses/course-v1:MITx+8.370.1x+1T2018/xblock/block-v1:MITx+8.370.1x+1T2018+type@problem+block@Basis_changes/handler/xmodule_handler"
data-problem-score="0"
data-problem-total-possible="3"
data-attempts-used="0"
data-content="
<h3 class="hd hd-3 problem-header" id="Basis_changes-problem-title" aria-describedby="block-v1:MITx+8.370.1x+1T2018+type@problem+block@Basis_changes-problem-progress" tabindex="-1">
Basis changes
</h3>
<div class="problem-progress" id="block-v1:MITx+8.370.1x+1T2018+type@problem+block@Basis_changes-problem-progress"></div>
<div class="problem">
<div>
<p>
Consider the unitary matrix </p>
<table id="a0000000011" class="equation" width="100%" cellspacing="0" cellpadding="7" style="table-layout:auto">
<tr>
<td class="equation" style="width:80%; border:none">[mathjax]H=\frac{1}{\sqrt{2}} \begin{pmatrix} 1 &amp; 1\\ 1&amp; -1 \end{pmatrix}.[/mathjax]</td>
<td class="eqnnum" style="width:20%; border:none;text-align:right">(1.8)</td>
</tr>
</table>
<p>
This important unitary is called <a href="https://en.wikipedia.org/wiki/Hadamard_transform#Quantum_computing_applications" target="_blank">Hadamard gate</a>, which frequently appears in quantum circuits. It is easy to check that the Hadamard gate converts [mathjaxinline]|{0}\rangle[/mathjaxinline] and [mathjaxinline]|{1}\rangle[/mathjaxinline] as </p>
<table id="a0000000012" class="equation" width="100%" cellspacing="0" cellpadding="7" style="table-layout:auto">
<tr>
<td class="equation" style="width:80%; border:none">[mathjax]H|{0}\rangle =\frac{1}{\sqrt{2}}(|{0}\rangle +|{1}\rangle ),\ \ H|{1}\rangle =\frac{1}{\sqrt{2}}(|{0}\rangle -|{1}\rangle ).[/mathjax]</td>
<td class="eqnnum" style="width:20%; border:none;text-align:right">(1.9)</td>
</tr>
</table>
<p>
We define [mathjaxinline]|{+}\rangle =\frac{1}{\sqrt{2}}(|{0}\rangle +|{1}\rangle )[/mathjaxinline] and [mathjaxinline]|{-}\rangle =\frac{1}{\sqrt{2}}(|{0}\rangle -|{1}\rangle )[/mathjaxinline]. </p>
<p>
Express each Pauli matrix in the [mathjaxinline]\{ |{+}\rangle ,|{-}\rangle \}[/mathjaxinline] basis. Give this as a numerical matrix, and type in, for instance, <tt class="ttfamily">[[1,0],[0,1]]</tt> for [mathjaxinline]\begin{pmatrix} 1 &amp; 0\\ 0 &amp; 1 \end{pmatrix}[/mathjaxinline]. </p>
<p>
[mathjaxinline]X[/mathjaxinline]: <div class="inline" tabindex="-1" aria-label="Question 1" role="group"><div id="inputtype_Basis_changes_2_1" class="text-input-dynamath capa_inputtype inline textline">
<div class="text-input-dynamath_data inline" data-preprocessor="MathjaxPreprocessorForQM"/>
<div class="script_placeholder" data-src="/assets/courseware/v1/95fe583d41f010195cf50c9f61992d94/asset-v1:MITx+8.370.1x+1T2018+type@asset+block/mathjax_preprocessor_for_QM_H.js"/>
<div class="unanswered inline">
<input type="text" name="input_Basis_changes_2_1" id="input_Basis_changes_2_1" aria-describedby="status_Basis_changes_2_1" value="" class="math"/>
<span class="trailing_text" id="trailing_text_Basis_changes_2_1"/>
<span class="status unanswered" id="status_Basis_changes_2_1" data-tooltip="Not yet answered.">
<span class="sr">unanswered</span><span class="status-icon" aria-hidden="true"/>
</span>
<p id="answer_Basis_changes_2_1" class="answer"/>
<div id="display_Basis_changes_2_1" class="equation">`{::}`</div>
<textarea style="display:none" id="input_Basis_changes_2_1_dynamath" name="input_Basis_changes_2_1_dynamath"/>
</div>
</div></div> </p>
<p>
[mathjaxinline]Y[/mathjaxinline]: <div class="inline" tabindex="-1" aria-label="Question 2" role="group"><div id="inputtype_Basis_changes_3_1" class="text-input-dynamath capa_inputtype inline textline">
<div class="text-input-dynamath_data inline" data-preprocessor="MathjaxPreprocessorForQM"/>
<div class="script_placeholder" data-src="/assets/courseware/v1/95fe583d41f010195cf50c9f61992d94/asset-v1:MITx+8.370.1x+1T2018+type@asset+block/mathjax_preprocessor_for_QM_H.js"/>
<div class="unanswered inline">
<input type="text" name="input_Basis_changes_3_1" id="input_Basis_changes_3_1" aria-describedby="status_Basis_changes_3_1" value="" class="math"/>
<span class="trailing_text" id="trailing_text_Basis_changes_3_1"/>
<span class="status unanswered" id="status_Basis_changes_3_1" data-tooltip="Not yet answered.">
<span class="sr">unanswered</span><span class="status-icon" aria-hidden="true"/>
</span>
<p id="answer_Basis_changes_3_1" class="answer"/>
<div id="display_Basis_changes_3_1" class="equation">`{::}`</div>
<textarea style="display:none" id="input_Basis_changes_3_1_dynamath" name="input_Basis_changes_3_1_dynamath"/>
</div>
</div></div> </p>
<p>
[mathjaxinline]Z[/mathjaxinline]: <div class="inline" tabindex="-1" aria-label="Question 3" role="group"><div id="inputtype_Basis_changes_4_1" class="text-input-dynamath capa_inputtype inline textline">
<div class="text-input-dynamath_data inline" data-preprocessor="MathjaxPreprocessorForQM"/>
<div class="script_placeholder" data-src="/assets/courseware/v1/95fe583d41f010195cf50c9f61992d94/asset-v1:MITx+8.370.1x+1T2018+type@asset+block/mathjax_preprocessor_for_QM_H.js"/>
<div class="unanswered inline">
<input type="text" name="input_Basis_changes_4_1" id="input_Basis_changes_4_1" aria-describedby="status_Basis_changes_4_1" value="" class="math"/>
<span class="trailing_text" id="trailing_text_Basis_changes_4_1"/>
<span class="status unanswered" id="status_Basis_changes_4_1" data-tooltip="Not yet answered.">
<span class="sr">unanswered</span><span class="status-icon" aria-hidden="true"/>
</span>
<p id="answer_Basis_changes_4_1" class="answer"/>
<div id="display_Basis_changes_4_1" class="equation">`{::}`</div>
<textarea style="display:none" id="input_Basis_changes_4_1_dynamath" name="input_Basis_changes_4_1_dynamath"/>
</div>
</div></div> </p>
<p>
<div class="solution-span">
<span id="solution_Basis_changes_solution_1"/>
</div></p>
</div>
<div class="action">
<input type="hidden" name="problem_id" value="Basis changes" />
<div class="submit-attempt-container">
<button type="button" class="submit btn-brand" data-submitting="Submitting" data-value="Submit" data-should-enable-submit-button="True" aria-describedby="submission_feedback_Basis_changes" >
<span class="submit-label">Submit</span>
</button>
<div class="submission-feedback" id="submission_feedback_Basis_changes">
<span class="sr">Some problems have options such as save, reset, hints, or show answer. These options follow the Submit button.</span>
</div>
</div>
<div class="problem-action-buttons-wrapper">
<span class="problem-action-button-wrapper">
<button type="button" class="save problem-action-btn btn-default btn-small" data-value="Save">
<span class="icon fa fa-floppy-o" aria-hidden="true"></span>
<span aria-hidden="true">Save</span>
<span class="sr">Save your answer</span>
</button>
</span>
</div>
</div>
<div class="notification warning notification-gentle-alert
is-hidden"
tabindex="-1">
<span class="icon fa fa-exclamation-circle" aria-hidden="true"></span>
<span class="notification-message" aria-describedby="Basis_changes-problem-title">
</span>
<div class="notification-btn-wrapper">
<button type="button" class="btn btn-default btn-small notification-btn review-btn sr">Review</button>
</div>
</div>
<div class="notification warning notification-save
is-hidden"
tabindex="-1">
<span class="icon fa fa-save" aria-hidden="true"></span>
<span class="notification-message" aria-describedby="Basis_changes-problem-title">None
</span>
<div class="notification-btn-wrapper">
<button type="button" class="btn btn-default btn-small notification-btn review-btn sr">Review</button>
</div>
</div>
<div class="notification general notification-show-answer
is-hidden"
tabindex="-1">
<span class="icon fa fa-info-circle" aria-hidden="true"></span>
<span class="notification-message" aria-describedby="Basis_changes-problem-title">Answers are displayed within the problem
</span>
<div class="notification-btn-wrapper">
<button type="button" class="btn btn-default btn-small notification-btn review-btn sr">Review</button>
</div>
</div>
</div>
"
data-graded="True">
<p class="loading-spinner">
<i class="fa fa-spinner fa-pulse fa-2x fa-fw"></i>
<span class="sr">Loading…</span>
</p>
</div>
</div>
</div>
<div class="vert vert-2" data-id="block-v1:MITx+8.370.1x+1T2018+type@html+block@html_site_search_box1x">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-init="XBlockToXModuleShim" data-runtime-version="1" data-block-type="html" data-graded="True" data-request-token="fa7dec00732711efbae20e3672a9417f" data-usage-id="block-v1:MITx+8.370.1x+1T2018+type@html+block@html_site_search_box1x" data-has-score="False" data-course-id="course-v1:MITx+8.370.1x+1T2018" data-runtime-class="LmsRuntime">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.370.1x+1T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.370.1x+1T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
(function(){
course_static_url = $('#dummy_course_static_link').attr('href').replace('/NONE', '');
jump_to_url = $('#dummy_jump_link').attr('href').replace('/NONE', '');
if (typeof String.prototype.startsWith != 'function') {
// see below for better implementation!
String.prototype.startsWith = function (str){
return this.indexOf(str) === 0;
};
}
if(typeof(String.prototype.trim) === "undefined")
{
String.prototype.trim = function()
{
return String(this).replace(/^\s+|\s+$/g, '');
};
}
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var amp = String.fromCharCode(38);
var rlb = rb + lb;
var mke = function(x){ return lb + x + rb; }
go_to_search = function(){
// find search this module link
search_module_url = "";
$('div.course-index').find('nav').find('a').each(function(){
if ($(this).text().trim().startsWith("Search this course")){
search_module_url = $(this).attr('href');
console.log("search_module_url = ", search_module_url);
}
});
var sterm = $('#site-search-box').val();
// new_url = jump_to_url + "/Search_this_module/?q=" + sterm;
new_url = search_module_url + "?q=" + sterm;
console.log("sterm = ", sterm, " ; going to ", new_url);
window.location.href = new_url;
}
if (!$('#site-search-box').length){
$("nav.courseware").find("ol").append(lb + "section style='float:right'" + rlb + "input size='20'"
+ " id='site-search-box'"
+ rlb + "img src='" + course_static_url
+ "/images_search_glass.png'/" + rlb + "/input" + rlb + "/section" + rb);
}
$("#site-search-box").keypress(function(event) {
if (event.which == 13) {
event.preventDefault();
go_to_search();
}
});
// $('#site-search-box').bind("enterKey", go_to_search);
})();
var add_fix_transcript = function(){
if ($('div.wrap-instructor-info').length==0){
return;
}
$('div.xblock-student_view-video').each(function(key, vblock_e){
var vblock = $(vblock_e);
var vuid = vblock.data('usage-id').split('@');
var vid;
if (vuid.length==1){
vuid = vblock.data('usage-id').split(';_')
vid = vuid[5];
}else{
vid = vuid[2];
}
var mfnpre = vid.split("_video",1)[0];
var mfnid = mfnpre; // no periods
mfnpre = mfnpre.replace('8_370', '8.370'); // periods in gh filename
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var mke = function(x){ return lb + x + rb; }
var ftid = "fix_transcript_" + mfnid;
if (!$('#' + ftid).length){
var html = lb + "span id='" + ftid + "' style='float:right'" + rb + lb + "a href='#'" + rb;
html += "contribute transcript fix" + mke("/a") + mke("/span");
console.log("html = ", html);
vblock.after(html)
}
$('#' + ftid).click(function(){
var cst = $('ol.subtitles').find('li.current');
var cindex = Number(cst.data('index'));
var gurl;
if (mfnpre.endsWith('_cq_sol')){
gurl = "https://github.com/mitocw/content-mit-8370x-cq-sol-subtitles/blob/master/";
}else{
gurl = "https://github.com/mitocw/content-mit-8370x-subtitles/blob/master/";
}
gurl += mfnpre + ".txt#L" + String(cindex + 10 + 1);
console.log("going to ", gurl);
window.open(gurl, "MITx 8.370x subtitle source");
});
});
}
try{
add_fix_transcript();
}
catch(err){
console.log(err);
}
try{
var rb = String.fromCharCode(62);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 3000);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 8000);
}
catch(err){
console.log(err);
}
</script></span>
</div>
</div>
</div>
</div>
<div class="xblock xblock-public_view xblock-public_view-vertical" data-init="VerticalStudentView" data-runtime-version="1" data-block-type="vertical" data-graded="True" data-request-token="fa7dec00732711efbae20e3672a9417f" data-usage-id="block-v1:MITx+8.370.1x+1T2018+type@vertical+block@Quantum_gates" data-has-score="False" data-course-id="course-v1:MITx+8.370.1x+1T2018" data-runtime-class="LmsRuntime">
<h2 class="hd hd-2 unit-title">Quantum gates</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.370.1x+1T2018+type@problem+block@problem_Quantum_gates">
<div class="xblock xblock-public_view xblock-public_view-problem xmodule_display xmodule_ProblemBlock" data-init="XBlockToXModuleShim" data-runtime-version="1" data-block-type="problem" data-graded="True" data-request-token="fa7dec00732711efbae20e3672a9417f" data-usage-id="block-v1:MITx+8.370.1x+1T2018+type@problem+block@problem_Quantum_gates" data-has-score="True" data-course-id="course-v1:MITx+8.370.1x+1T2018" data-runtime-class="LmsRuntime">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Problem"}
</script>
<div id="problem_problem_Quantum_gates" class="problems-wrapper" role="group"
aria-labelledby="problem_Quantum_gates-problem-title"
data-problem-id="block-v1:MITx+8.370.1x+1T2018+type@problem+block@problem_Quantum_gates" data-url="/courses/course-v1:MITx+8.370.1x+1T2018/xblock/block-v1:MITx+8.370.1x+1T2018+type@problem+block@problem_Quantum_gates/handler/xmodule_handler"
data-problem-score="0"
data-problem-total-possible="3"
data-attempts-used="0"
data-content="
<h3 class="hd hd-3 problem-header" id="problem_Quantum_gates-problem-title" aria-describedby="block-v1:MITx+8.370.1x+1T2018+type@problem+block@problem_Quantum_gates-problem-progress" tabindex="-1">
Quantum gates
</h3>
<div class="problem-progress" id="block-v1:MITx+8.370.1x+1T2018+type@problem+block@problem_Quantum_gates-problem-progress"></div>
<div class="problem">
<div>
<p>
Quantum gates are building blocks of quantum circuits that drive the evolution of quantum states. The Hadamard gate was already introduced in the previous problem. We introduce another important gate called phase gate defined by </p>
<table id="a0000000014" class="equation" width="100%" cellspacing="0" cellpadding="7" style="table-layout:auto">
<tr>
<td class="equation" style="width:80%; border:none">[mathjax]S= \begin{pmatrix} 1 &amp; 0 \\ 0 &amp; i \end{pmatrix}[/mathjax]</td>
<td class="eqnnum" style="width:20%; border:none;text-align:right">(1.11)</td>
</tr>
</table>
<p>
If we take the Hermitian conjugate, we obtain </p>
<table id="a0000000015" class="equation" width="100%" cellspacing="0" cellpadding="7" style="table-layout:auto">
<tr>
<td class="equation" style="width:80%; border:none">[mathjax]S^{\dagger }= \begin{pmatrix} 1 &amp; 0 \\ 0 &amp; -i \end{pmatrix}[/mathjax]</td>
<td class="eqnnum" style="width:20%; border:none;text-align:right">(1.12)</td>
</tr>
</table>
<p>
The phase gate does not do anything to [mathjaxinline]|{0}\rangle[/mathjaxinline] but adds the phase [mathjaxinline]i[/mathjaxinline] to [mathjaxinline]|{1}\rangle[/mathjaxinline]. For instance, [mathjaxinline]S|{+}\rangle =\frac{1}{\sqrt{2}}(|{0}\rangle +i|{1}\rangle )[/mathjaxinline]. </p>
<p>
Quantum gates can be sequentially applied and the effective operation to the quantum state is obtained by multiplying the matrices describing the quantum gates in order. For instance, if [mathjaxinline]X[/mathjaxinline] is applied first and [mathjaxinline]H[/mathjaxinline] follows it, the total operation is [mathjaxinline]HX[/mathjaxinline]. Compute the following. </p>
<p>
<p style="display:inline">[mathjaxinline]HX=[/mathjaxinline]</p>
<div class="inline" tabindex="-1" aria-label="Question 1" role="group"><div id="inputtype_problem_Quantum_gates_2_1" class="text-input-dynamath capa_inputtype inline textline">
<div class="text-input-dynamath_data inline" data-preprocessor="MathjaxPreprocessorForQM"/>
<div class="script_placeholder" data-src="/assets/courseware/v1/95fe583d41f010195cf50c9f61992d94/asset-v1:MITx+8.370.1x+1T2018+type@asset+block/mathjax_preprocessor_for_QM_H.js"/>
<div class="unanswered inline">
<input type="text" name="input_problem_Quantum_gates_2_1" id="input_problem_Quantum_gates_2_1" aria-describedby="status_problem_Quantum_gates_2_1" value="" class="math"/>
<span class="trailing_text" id="trailing_text_problem_Quantum_gates_2_1"/>
<span class="status unanswered" id="status_problem_Quantum_gates_2_1" data-tooltip="Not yet answered.">
<span class="sr">unanswered</span><span class="status-icon" aria-hidden="true"/>
</span>
<p id="answer_problem_Quantum_gates_2_1" class="answer"/>
<div id="display_problem_Quantum_gates_2_1" class="equation">`{::}`</div>
<textarea style="display:none" id="input_problem_Quantum_gates_2_1_dynamath" name="input_problem_Quantum_gates_2_1_dynamath"/>
</div>
</div></div>
</p>
<p>
<p style="display:inline">[mathjaxinline]SH=[/mathjaxinline]</p>
<div class="inline" tabindex="-1" aria-label="Question 2" role="group"><div id="inputtype_problem_Quantum_gates_3_1" class="text-input-dynamath capa_inputtype inline textline">
<div class="text-input-dynamath_data inline" data-preprocessor="MathjaxPreprocessorForQM"/>
<div class="script_placeholder" data-src="/assets/courseware/v1/95fe583d41f010195cf50c9f61992d94/asset-v1:MITx+8.370.1x+1T2018+type@asset+block/mathjax_preprocessor_for_QM_H.js"/>
<div class="unanswered inline">
<input type="text" name="input_problem_Quantum_gates_3_1" id="input_problem_Quantum_gates_3_1" aria-describedby="status_problem_Quantum_gates_3_1" value="" class="math"/>
<span class="trailing_text" id="trailing_text_problem_Quantum_gates_3_1"/>
<span class="status unanswered" id="status_problem_Quantum_gates_3_1" data-tooltip="Not yet answered.">
<span class="sr">unanswered</span><span class="status-icon" aria-hidden="true"/>
</span>
<p id="answer_problem_Quantum_gates_3_1" class="answer"/>
<div id="display_problem_Quantum_gates_3_1" class="equation">`{::}`</div>
<textarea style="display:none" id="input_problem_Quantum_gates_3_1_dynamath" name="input_problem_Quantum_gates_3_1_dynamath"/>
</div>
</div></div>
</p>
<p>
<p style="display:inline">[mathjaxinline]SXS^{\dagger }=[/mathjaxinline]</p>
<div class="inline" tabindex="-1" aria-label="Question 3" role="group"><div id="inputtype_problem_Quantum_gates_4_1" class="text-input-dynamath capa_inputtype inline textline">
<div class="text-input-dynamath_data inline" data-preprocessor="MathjaxPreprocessorForQM"/>
<div class="script_placeholder" data-src="/assets/courseware/v1/95fe583d41f010195cf50c9f61992d94/asset-v1:MITx+8.370.1x+1T2018+type@asset+block/mathjax_preprocessor_for_QM_H.js"/>
<div class="unanswered inline">
<input type="text" name="input_problem_Quantum_gates_4_1" id="input_problem_Quantum_gates_4_1" aria-describedby="status_problem_Quantum_gates_4_1" value="" class="math"/>
<span class="trailing_text" id="trailing_text_problem_Quantum_gates_4_1"/>
<span class="status unanswered" id="status_problem_Quantum_gates_4_1" data-tooltip="Not yet answered.">
<span class="sr">unanswered</span><span class="status-icon" aria-hidden="true"/>
</span>
<p id="answer_problem_Quantum_gates_4_1" class="answer"/>
<div id="display_problem_Quantum_gates_4_1" class="equation">`{::}`</div>
<textarea style="display:none" id="input_problem_Quantum_gates_4_1_dynamath" name="input_problem_Quantum_gates_4_1_dynamath"/>
</div>
</div></div>
</p>
<p>
<div class="solution-span">
<span id="solution_problem_Quantum_gates_solution_1"/>
</div></p>
</div>
<div class="action">
<input type="hidden" name="problem_id" value="Quantum gates" />
<div class="submit-attempt-container">
<button type="button" class="submit btn-brand" data-submitting="Submitting" data-value="Submit" data-should-enable-submit-button="True" aria-describedby="submission_feedback_problem_Quantum_gates" >
<span class="submit-label">Submit</span>
</button>
<div class="submission-feedback" id="submission_feedback_problem_Quantum_gates">
<span class="sr">Some problems have options such as save, reset, hints, or show answer. These options follow the Submit button.</span>
</div>
</div>
<div class="problem-action-buttons-wrapper">
<span class="problem-action-button-wrapper">
<button type="button" class="save problem-action-btn btn-default btn-small" data-value="Save">
<span class="icon fa fa-floppy-o" aria-hidden="true"></span>
<span aria-hidden="true">Save</span>
<span class="sr">Save your answer</span>
</button>
</span>
</div>
</div>
<div class="notification warning notification-gentle-alert
is-hidden"
tabindex="-1">
<span class="icon fa fa-exclamation-circle" aria-hidden="true"></span>
<span class="notification-message" aria-describedby="problem_Quantum_gates-problem-title">
</span>
<div class="notification-btn-wrapper">
<button type="button" class="btn btn-default btn-small notification-btn review-btn sr">Review</button>
</div>
</div>
<div class="notification warning notification-save
is-hidden"
tabindex="-1">
<span class="icon fa fa-save" aria-hidden="true"></span>
<span class="notification-message" aria-describedby="problem_Quantum_gates-problem-title">None
</span>
<div class="notification-btn-wrapper">
<button type="button" class="btn btn-default btn-small notification-btn review-btn sr">Review</button>
</div>
</div>
<div class="notification general notification-show-answer
is-hidden"
tabindex="-1">
<span class="icon fa fa-info-circle" aria-hidden="true"></span>
<span class="notification-message" aria-describedby="problem_Quantum_gates-problem-title">Answers are displayed within the problem
</span>
<div class="notification-btn-wrapper">
<button type="button" class="btn btn-default btn-small notification-btn review-btn sr">Review</button>
</div>
</div>
</div>
"
data-graded="True">
<p class="loading-spinner">
<i class="fa fa-spinner fa-pulse fa-2x fa-fw"></i>
<span class="sr">Loading…</span>
</p>
</div>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+8.370.1x+1T2018+type@html+block@html_site_search_box2x">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-init="XBlockToXModuleShim" data-runtime-version="1" data-block-type="html" data-graded="True" data-request-token="fa7dec00732711efbae20e3672a9417f" data-usage-id="block-v1:MITx+8.370.1x+1T2018+type@html+block@html_site_search_box2x" data-has-score="False" data-course-id="course-v1:MITx+8.370.1x+1T2018" data-runtime-class="LmsRuntime">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.370.1x+1T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.370.1x+1T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
(function(){
course_static_url = $('#dummy_course_static_link').attr('href').replace('/NONE', '');
jump_to_url = $('#dummy_jump_link').attr('href').replace('/NONE', '');
if (typeof String.prototype.startsWith != 'function') {
// see below for better implementation!
String.prototype.startsWith = function (str){
return this.indexOf(str) === 0;
};
}
if(typeof(String.prototype.trim) === "undefined")
{
String.prototype.trim = function()
{
return String(this).replace(/^\s+|\s+$/g, '');
};
}
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var amp = String.fromCharCode(38);
var rlb = rb + lb;
var mke = function(x){ return lb + x + rb; }
go_to_search = function(){
// find search this module link
search_module_url = "";
$('div.course-index').find('nav').find('a').each(function(){
if ($(this).text().trim().startsWith("Search this course")){
search_module_url = $(this).attr('href');
console.log("search_module_url = ", search_module_url);
}
});
var sterm = $('#site-search-box').val();
// new_url = jump_to_url + "/Search_this_module/?q=" + sterm;
new_url = search_module_url + "?q=" + sterm;
console.log("sterm = ", sterm, " ; going to ", new_url);
window.location.href = new_url;
}
if (!$('#site-search-box').length){
$("nav.courseware").find("ol").append(lb + "section style='float:right'" + rlb + "input size='20'"
+ " id='site-search-box'"
+ rlb + "img src='" + course_static_url
+ "/images_search_glass.png'/" + rlb + "/input" + rlb + "/section" + rb);
}
$("#site-search-box").keypress(function(event) {
if (event.which == 13) {
event.preventDefault();
go_to_search();
}
});
// $('#site-search-box').bind("enterKey", go_to_search);
})();
var add_fix_transcript = function(){
if ($('div.wrap-instructor-info').length==0){
return;
}
$('div.xblock-student_view-video').each(function(key, vblock_e){
var vblock = $(vblock_e);
var vuid = vblock.data('usage-id').split('@');
var vid;
if (vuid.length==1){
vuid = vblock.data('usage-id').split(';_')
vid = vuid[5];
}else{
vid = vuid[2];
}
var mfnpre = vid.split("_video",1)[0];
var mfnid = mfnpre; // no periods
mfnpre = mfnpre.replace('8_370', '8.370'); // periods in gh filename
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var mke = function(x){ return lb + x + rb; }
var ftid = "fix_transcript_" + mfnid;
if (!$('#' + ftid).length){
var html = lb + "span id='" + ftid + "' style='float:right'" + rb + lb + "a href='#'" + rb;
html += "contribute transcript fix" + mke("/a") + mke("/span");
console.log("html = ", html);
vblock.after(html)
}
$('#' + ftid).click(function(){
var cst = $('ol.subtitles').find('li.current');
var cindex = Number(cst.data('index'));
var gurl;
if (mfnpre.endsWith('_cq_sol')){
gurl = "https://github.com/mitocw/content-mit-8370x-cq-sol-subtitles/blob/master/";
}else{
gurl = "https://github.com/mitocw/content-mit-8370x-subtitles/blob/master/";
}
gurl += mfnpre + ".txt#L" + String(cindex + 10 + 1);
console.log("going to ", gurl);
window.open(gurl, "MITx 8.370x subtitle source");
});
});
}
try{
add_fix_transcript();
}
catch(err){
console.log(err);
}
try{
var rb = String.fromCharCode(62);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 3000);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 8000);
}
catch(err){
console.log(err);
}
</script></span>
</div>
</div>
</div>
</div>
<div class="xblock xblock-public_view xblock-public_view-vertical" data-init="VerticalStudentView" data-runtime-version="1" data-block-type="vertical" data-graded="True" data-request-token="fa7dec00732711efbae20e3672a9417f" data-usage-id="block-v1:MITx+8.370.1x+1T2018+type@vertical+block@Bloch_sphere" data-has-score="False" data-course-id="course-v1:MITx+8.370.1x+1T2018" data-runtime-class="LmsRuntime">
<h2 class="hd hd-2 unit-title">Bloch sphere</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.370.1x+1T2018+type@problem+block@Single_qubit_rotation">
<div class="xblock xblock-public_view xblock-public_view-problem xmodule_display xmodule_ProblemBlock" data-init="XBlockToXModuleShim" data-runtime-version="1" data-block-type="problem" data-graded="True" data-request-token="fa7dec00732711efbae20e3672a9417f" data-usage-id="block-v1:MITx+8.370.1x+1T2018+type@problem+block@Single_qubit_rotation" data-has-score="True" data-course-id="course-v1:MITx+8.370.1x+1T2018" data-runtime-class="LmsRuntime">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Problem"}
</script>
<div id="problem_Single_qubit_rotation" class="problems-wrapper" role="group"
aria-labelledby="Single_qubit_rotation-problem-title"
data-problem-id="block-v1:MITx+8.370.1x+1T2018+type@problem+block@Single_qubit_rotation" data-url="/courses/course-v1:MITx+8.370.1x+1T2018/xblock/block-v1:MITx+8.370.1x+1T2018+type@problem+block@Single_qubit_rotation/handler/xmodule_handler"
data-problem-score="0"
data-problem-total-possible="6"
data-attempts-used="0"
data-content="
<h3 class="hd hd-3 problem-header" id="Single_qubit_rotation-problem-title" aria-describedby="block-v1:MITx+8.370.1x+1T2018+type@problem+block@Single_qubit_rotation-problem-progress" tabindex="-1">
Single qubit rotation
</h3>
<div class="problem-progress" id="block-v1:MITx+8.370.1x+1T2018+type@problem+block@Single_qubit_rotation-problem-progress"></div>
<div class="problem">
<div>
<p>
Any qubit state [mathjaxinline]|{\psi }\rangle[/mathjaxinline] can be expressed of the form </p>
<table id="a0000000019" class="equation" width="100%" cellspacing="0" cellpadding="7" style="table-layout:auto">
<tr>
<td class="equation" style="width:80%; border:none">[mathjax]|{\psi }\rangle =\cos \left(\frac{\theta }{2}\right)|{0}\rangle +e^{i\phi }\sin \left(\frac{\theta }{2}\right)|{1}\rangle[/mathjax]</td>
<td class="eqnnum" style="width:20%; border:none;text-align:right">(1.16)</td>
</tr>
</table>
<p>
up to global phases, and [mathjaxinline](\theta , \phi )[/mathjaxinline] determines the position of the state on <a href="https://en.wikipedia.org/wiki/Bloch_sphere" target="_blank">the Bloch sphere</a>. </p>
<p>
Any single qubit unitary [mathjaxinline]U[/mathjaxinline] can be written of the form, again up to global phases, </p>
<table id="a0000000020" class="equation" width="100%" cellspacing="0" cellpadding="7" style="table-layout:auto">
<tr>
<td class="equation" style="width:80%; border:none">[mathjax]U=e^{-i\frac{\theta }{2} \vec{n}\cdot \vec{\sigma }}=\cos \left(\frac{\theta }{2}\right)I - i\sin \left(\frac{\theta }{2}\right)\vec{n}\cdot \vec{\sigma }[/mathjax]</td>
<td class="eqnnum" style="width:20%; border:none;text-align:right">(1.17)</td>
</tr>
</table>
<p>
It is regarded as a rotational operation on the Bloch sphere where [mathjaxinline]\theta[/mathjaxinline] and [mathjaxinline]\vec{n}=(n_ x,n_ y,n_ z)[/mathjaxinline] specify the rotation angle and the axis which which the rotation takes place. [mathjaxinline]\vec{n}[/mathjaxinline] is a unit vector satisfying [mathjaxinline]n_ x^2+n_ y^2+n_ z^2=1[/mathjaxinline]. Note that [mathjaxinline]\vec{n}\cdot \vec{\sigma }=n_ x\sigma _ x+n_ y\sigma _ y+n_ z\sigma _ z[/mathjaxinline]. We take [mathjaxinline]n_ x\geq 0[/mathjaxinline] and [mathjaxinline]0\leq \theta &lt;2\pi[/mathjaxinline] without loss of generality. Find [mathjaxinline]\vec{n}[/mathjaxinline] and [mathjaxinline]\theta[/mathjaxinline] for the following unitary matrices. Type in, for instance, <tt class="ttfamily">[0,0,1]</tt> for [mathjaxinline](0,0,1)[/mathjaxinline]. You may use <tt class="ttfamily">sqrt(2)</tt> for [mathjaxinline]\sqrt{2}[/mathjaxinline]. </p>
<p>
[mathjaxinline]X[/mathjaxinline]: <p style="display:inline">[mathjaxinline]\vec{n}=[/mathjaxinline]</p><div class="inline" tabindex="-1" aria-label="Question 1" role="group"><div id="inputtype_Single_qubit_rotation_2_1" class="text-input-dynamath capa_inputtype inline textline">
<div class="unanswered inline">
<input type="text" name="input_Single_qubit_rotation_2_1" id="input_Single_qubit_rotation_2_1" aria-describedby="status_Single_qubit_rotation_2_1" value="" class="math" size="40"/>
<span class="trailing_text" id="trailing_text_Single_qubit_rotation_2_1"/>
<span class="status unanswered" id="status_Single_qubit_rotation_2_1" data-tooltip="Not yet answered.">
<span class="sr">unanswered</span><span class="status-icon" aria-hidden="true"/>
</span>
<p id="answer_Single_qubit_rotation_2_1" class="answer"/>
<div id="display_Single_qubit_rotation_2_1" class="equation">`{::}`</div>
<textarea style="display:none" id="input_Single_qubit_rotation_2_1_dynamath" name="input_Single_qubit_rotation_2_1_dynamath"/>
</div>
</div></div> <p style="display:inline">[mathjaxinline]\theta =[/mathjaxinline]</p><div class="inline" tabindex="-1" aria-label="Question 2" role="group"><div id="inputtype_Single_qubit_rotation_3_1" class="text-input-dynamath capa_inputtype inline textline">
<div class="unanswered inline">
<input type="text" name="input_Single_qubit_rotation_3_1" id="input_Single_qubit_rotation_3_1" aria-describedby="status_Single_qubit_rotation_3_1" value="" class="math" size="40"/>
<span class="trailing_text" id="trailing_text_Single_qubit_rotation_3_1"/>
<span class="status unanswered" id="status_Single_qubit_rotation_3_1" data-tooltip="Not yet answered.">
<span class="sr">unanswered</span><span class="status-icon" aria-hidden="true"/>
</span>
<p id="answer_Single_qubit_rotation_3_1" class="answer"/>
<div id="display_Single_qubit_rotation_3_1" class="equation">`{::}`</div>
<textarea style="display:none" id="input_Single_qubit_rotation_3_1_dynamath" name="input_Single_qubit_rotation_3_1_dynamath"/>
</div>
</div></div> </p>
<p>
[mathjaxinline]H=\frac{1}{\sqrt{2}} \begin{pmatrix} 1 &amp; 1\\ 1 &amp; -1 \end{pmatrix}[/mathjaxinline]: <p style="display:inline">[mathjaxinline]\vec{n}=[/mathjaxinline]</p><div class="inline" tabindex="-1" aria-label="Question 3" role="group"><div id="inputtype_Single_qubit_rotation_4_1" class="text-input-dynamath capa_inputtype inline textline">
<div class="unanswered inline">
<input type="text" name="input_Single_qubit_rotation_4_1" id="input_Single_qubit_rotation_4_1" aria-describedby="status_Single_qubit_rotation_4_1" value="" class="math" size="40"/>
<span class="trailing_text" id="trailing_text_Single_qubit_rotation_4_1"/>
<span class="status unanswered" id="status_Single_qubit_rotation_4_1" data-tooltip="Not yet answered.">
<span class="sr">unanswered</span><span class="status-icon" aria-hidden="true"/>
</span>
<p id="answer_Single_qubit_rotation_4_1" class="answer"/>
<div id="display_Single_qubit_rotation_4_1" class="equation">`{::}`</div>
<textarea style="display:none" id="input_Single_qubit_rotation_4_1_dynamath" name="input_Single_qubit_rotation_4_1_dynamath"/>
</div>
</div></div> <p style="display:inline">[mathjaxinline]\theta =[/mathjaxinline]</p><div class="inline" tabindex="-1" aria-label="Question 4" role="group"><div id="inputtype_Single_qubit_rotation_5_1" class="text-input-dynamath capa_inputtype inline textline">
<div class="unanswered inline">
<input type="text" name="input_Single_qubit_rotation_5_1" id="input_Single_qubit_rotation_5_1" aria-describedby="status_Single_qubit_rotation_5_1" value="" class="math" size="40"/>
<span class="trailing_text" id="trailing_text_Single_qubit_rotation_5_1"/>
<span class="status unanswered" id="status_Single_qubit_rotation_5_1" data-tooltip="Not yet answered.">
<span class="sr">unanswered</span><span class="status-icon" aria-hidden="true"/>
</span>
<p id="answer_Single_qubit_rotation_5_1" class="answer"/>
<div id="display_Single_qubit_rotation_5_1" class="equation">`{::}`</div>
<textarea style="display:none" id="input_Single_qubit_rotation_5_1_dynamath" name="input_Single_qubit_rotation_5_1_dynamath"/>
</div>
</div></div> </p>
<p>
[mathjaxinline]S= \begin{pmatrix} 1 &amp; 0\\ 0 &amp; i \end{pmatrix}[/mathjaxinline]: <p style="display:inline">[mathjaxinline]\vec{n}=[/mathjaxinline]</p><div class="inline" tabindex="-1" aria-label="Question 5" role="group"><div id="inputtype_Single_qubit_rotation_6_1" class="text-input-dynamath capa_inputtype inline textline">
<div class="unanswered inline">
<input type="text" name="input_Single_qubit_rotation_6_1" id="input_Single_qubit_rotation_6_1" aria-describedby="status_Single_qubit_rotation_6_1" value="" class="math" size="40"/>
<span class="trailing_text" id="trailing_text_Single_qubit_rotation_6_1"/>
<span class="status unanswered" id="status_Single_qubit_rotation_6_1" data-tooltip="Not yet answered.">
<span class="sr">unanswered</span><span class="status-icon" aria-hidden="true"/>
</span>
<p id="answer_Single_qubit_rotation_6_1" class="answer"/>
<div id="display_Single_qubit_rotation_6_1" class="equation">`{::}`</div>
<textarea style="display:none" id="input_Single_qubit_rotation_6_1_dynamath" name="input_Single_qubit_rotation_6_1_dynamath"/>
</div>
</div></div> <p style="display:inline">[mathjaxinline]\theta =[/mathjaxinline]</p><div class="inline" tabindex="-1" aria-label="Question 6" role="group"><div id="inputtype_Single_qubit_rotation_7_1" class="text-input-dynamath capa_inputtype inline textline">
<div class="unanswered inline">
<input type="text" name="input_Single_qubit_rotation_7_1" id="input_Single_qubit_rotation_7_1" aria-describedby="status_Single_qubit_rotation_7_1" value="" class="math" size="40"/>
<span class="trailing_text" id="trailing_text_Single_qubit_rotation_7_1"/>
<span class="status unanswered" id="status_Single_qubit_rotation_7_1" data-tooltip="Not yet answered.">
<span class="sr">unanswered</span><span class="status-icon" aria-hidden="true"/>
</span>
<p id="answer_Single_qubit_rotation_7_1" class="answer"/>
<div id="display_Single_qubit_rotation_7_1" class="equation">`{::}`</div>
<textarea style="display:none" id="input_Single_qubit_rotation_7_1_dynamath" name="input_Single_qubit_rotation_7_1_dynamath"/>
</div>
</div></div> </p>
<p>
<div class="solution-span">
<span id="solution_Single_qubit_rotation_solution_1"/>
</div></p>
</div>
<div class="action">
<input type="hidden" name="problem_id" value="Single qubit rotation" />
<div class="submit-attempt-container">
<button type="button" class="submit btn-brand" data-submitting="Submitting" data-value="Submit" data-should-enable-submit-button="True" aria-describedby="submission_feedback_Single_qubit_rotation" >
<span class="submit-label">Submit</span>
</button>
<div class="submission-feedback" id="submission_feedback_Single_qubit_rotation">
<span class="sr">Some problems have options such as save, reset, hints, or show answer. These options follow the Submit button.</span>
</div>
</div>
<div class="problem-action-buttons-wrapper">
<span class="problem-action-button-wrapper">
<button type="button" class="save problem-action-btn btn-default btn-small" data-value="Save">
<span class="icon fa fa-floppy-o" aria-hidden="true"></span>
<span aria-hidden="true">Save</span>
<span class="sr">Save your answer</span>
</button>
</span>
</div>
</div>
<div class="notification warning notification-gentle-alert
is-hidden"
tabindex="-1">
<span class="icon fa fa-exclamation-circle" aria-hidden="true"></span>
<span class="notification-message" aria-describedby="Single_qubit_rotation-problem-title">
</span>
<div class="notification-btn-wrapper">
<button type="button" class="btn btn-default btn-small notification-btn review-btn sr">Review</button>
</div>
</div>
<div class="notification warning notification-save
is-hidden"
tabindex="-1">
<span class="icon fa fa-save" aria-hidden="true"></span>
<span class="notification-message" aria-describedby="Single_qubit_rotation-problem-title">None
</span>
<div class="notification-btn-wrapper">
<button type="button" class="btn btn-default btn-small notification-btn review-btn sr">Review</button>
</div>
</div>
<div class="notification general notification-show-answer
is-hidden"
tabindex="-1">
<span class="icon fa fa-info-circle" aria-hidden="true"></span>
<span class="notification-message" aria-describedby="Single_qubit_rotation-problem-title">Answers are displayed within the problem
</span>
<div class="notification-btn-wrapper">
<button type="button" class="btn btn-default btn-small notification-btn review-btn sr">Review</button>
</div>
</div>
</div>
"
data-graded="True">
<p class="loading-spinner">
<i class="fa fa-spinner fa-pulse fa-2x fa-fw"></i>
<span class="sr">Loading…</span>
</p>
</div>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+8.370.1x+1T2018+type@problem+block@problem_Single_qubit_rotation">
<div class="xblock xblock-public_view xblock-public_view-problem xmodule_display xmodule_ProblemBlock" data-init="XBlockToXModuleShim" data-runtime-version="1" data-block-type="problem" data-graded="True" data-request-token="fa7dec00732711efbae20e3672a9417f" data-usage-id="block-v1:MITx+8.370.1x+1T2018+type@problem+block@problem_Single_qubit_rotation" data-has-score="True" data-course-id="course-v1:MITx+8.370.1x+1T2018" data-runtime-class="LmsRuntime">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Problem"}
</script>
<div id="problem_problem_Single_qubit_rotation" class="problems-wrapper" role="group"
aria-labelledby="problem_Single_qubit_rotation-problem-title"
data-problem-id="block-v1:MITx+8.370.1x+1T2018+type@problem+block@problem_Single_qubit_rotation" data-url="/courses/course-v1:MITx+8.370.1x+1T2018/xblock/block-v1:MITx+8.370.1x+1T2018+type@problem+block@problem_Single_qubit_rotation/handler/xmodule_handler"
data-problem-score="0"
data-problem-total-possible="3"
data-attempts-used="0"
data-content="
<h3 class="hd hd-3 problem-header" id="problem_Single_qubit_rotation-problem-title" aria-describedby="block-v1:MITx+8.370.1x+1T2018+type@problem+block@problem_Single_qubit_rotation-problem-progress" tabindex="-1">
Single qubit rotation
</h3>
<div class="problem-progress" id="block-v1:MITx+8.370.1x+1T2018+type@problem+block@problem_Single_qubit_rotation-problem-progress"></div>
<div class="problem">
<div>
<p>
What are the resulting positions when the following unitaries are applied to the state positioned [mathjaxinline](\pi /2, 0)[/mathjaxinline]? Answer in terms of [mathjaxinline](\theta , \phi )[/mathjaxinline]. Take [mathjaxinline]\phi =0[/mathjaxinline] when [mathjaxinline]\phi[/mathjaxinline] is not determined (could take any value). </p>
<p>
[mathjaxinline]S:[/mathjaxinline] <div class="inline" tabindex="-1" aria-label="Question 1" role="group"><div id="inputtype_problem_Single_qubit_rotation_2_1" class="text-input-dynamath capa_inputtype inline textline">
<div class="unanswered inline">
<input type="text" name="input_problem_Single_qubit_rotation_2_1" id="input_problem_Single_qubit_rotation_2_1" aria-describedby="status_problem_Single_qubit_rotation_2_1" value="" class="math" size="40"/>
<span class="trailing_text" id="trailing_text_problem_Single_qubit_rotation_2_1"/>
<span class="status unanswered" id="status_problem_Single_qubit_rotation_2_1" data-tooltip="Not yet answered.">
<span class="sr">unanswered</span><span class="status-icon" aria-hidden="true"/>
</span>
<p id="answer_problem_Single_qubit_rotation_2_1" class="answer"/>
<div id="display_problem_Single_qubit_rotation_2_1" class="equation">`{::}`</div>
<textarea style="display:none" id="input_problem_Single_qubit_rotation_2_1_dynamath" name="input_problem_Single_qubit_rotation_2_1_dynamath"/>
</div>
</div></div> </p>
<p>
[mathjaxinline]SH:[/mathjaxinline] <div class="inline" tabindex="-1" aria-label="Question 2" role="group"><div id="inputtype_problem_Single_qubit_rotation_3_1" class="text-input-dynamath capa_inputtype inline textline">
<div class="unanswered inline">
<input type="text" name="input_problem_Single_qubit_rotation_3_1" id="input_problem_Single_qubit_rotation_3_1" aria-describedby="status_problem_Single_qubit_rotation_3_1" value="" class="math" size="40"/>
<span class="trailing_text" id="trailing_text_problem_Single_qubit_rotation_3_1"/>
<span class="status unanswered" id="status_problem_Single_qubit_rotation_3_1" data-tooltip="Not yet answered.">
<span class="sr">unanswered</span><span class="status-icon" aria-hidden="true"/>
</span>
<p id="answer_problem_Single_qubit_rotation_3_1" class="answer"/>
<div id="display_problem_Single_qubit_rotation_3_1" class="equation">`{::}`</div>
<textarea style="display:none" id="input_problem_Single_qubit_rotation_3_1_dynamath" name="input_problem_Single_qubit_rotation_3_1_dynamath"/>
</div>
</div></div> </p>
<p>
[mathjaxinline]SHSH:[/mathjaxinline] <div class="inline" tabindex="-1" aria-label="Question 3" role="group"><div id="inputtype_problem_Single_qubit_rotation_4_1" class="text-input-dynamath capa_inputtype inline textline">
<div class="unanswered inline">
<input type="text" name="input_problem_Single_qubit_rotation_4_1" id="input_problem_Single_qubit_rotation_4_1" aria-describedby="status_problem_Single_qubit_rotation_4_1" value="" class="math" size="40"/>
<span class="trailing_text" id="trailing_text_problem_Single_qubit_rotation_4_1"/>
<span class="status unanswered" id="status_problem_Single_qubit_rotation_4_1" data-tooltip="Not yet answered.">
<span class="sr">unanswered</span><span class="status-icon" aria-hidden="true"/>
</span>
<p id="answer_problem_Single_qubit_rotation_4_1" class="answer"/>
<div id="display_problem_Single_qubit_rotation_4_1" class="equation">`{::}`</div>
<textarea style="display:none" id="input_problem_Single_qubit_rotation_4_1_dynamath" name="input_problem_Single_qubit_rotation_4_1_dynamath"/>
</div>
</div></div> </p>
<p>
See how these gates rotate quantum states on the Bloch sphere and especially permute the eigenstates of Pauli matrices. </p>
<p>
<div class="solution-span">
<span id="solution_problem_Single_qubit_rotation_solution_1"/>
</div></p>
</div>
<div class="action">
<input type="hidden" name="problem_id" value="Single qubit rotation" />
<div class="submit-attempt-container">
<button type="button" class="submit btn-brand" data-submitting="Submitting" data-value="Submit" data-should-enable-submit-button="True" aria-describedby="submission_feedback_problem_Single_qubit_rotation" >
<span class="submit-label">Submit</span>
</button>
<div class="submission-feedback" id="submission_feedback_problem_Single_qubit_rotation">
<span class="sr">Some problems have options such as save, reset, hints, or show answer. These options follow the Submit button.</span>
</div>
</div>
<div class="problem-action-buttons-wrapper">
<span class="problem-action-button-wrapper">
<button type="button" class="save problem-action-btn btn-default btn-small" data-value="Save">
<span class="icon fa fa-floppy-o" aria-hidden="true"></span>
<span aria-hidden="true">Save</span>
<span class="sr">Save your answer</span>
</button>
</span>
</div>
</div>
<div class="notification warning notification-gentle-alert
is-hidden"
tabindex="-1">
<span class="icon fa fa-exclamation-circle" aria-hidden="true"></span>
<span class="notification-message" aria-describedby="problem_Single_qubit_rotation-problem-title">
</span>
<div class="notification-btn-wrapper">
<button type="button" class="btn btn-default btn-small notification-btn review-btn sr">Review</button>
</div>
</div>
<div class="notification warning notification-save
is-hidden"
tabindex="-1">
<span class="icon fa fa-save" aria-hidden="true"></span>
<span class="notification-message" aria-describedby="problem_Single_qubit_rotation-problem-title">None
</span>
<div class="notification-btn-wrapper">
<button type="button" class="btn btn-default btn-small notification-btn review-btn sr">Review</button>
</div>
</div>
<div class="notification general notification-show-answer
is-hidden"
tabindex="-1">
<span class="icon fa fa-info-circle" aria-hidden="true"></span>
<span class="notification-message" aria-describedby="problem_Single_qubit_rotation-problem-title">Answers are displayed within the problem
</span>
<div class="notification-btn-wrapper">
<button type="button" class="btn btn-default btn-small notification-btn review-btn sr">Review</button>
</div>
</div>
</div>
"
data-graded="True">
<p class="loading-spinner">
<i class="fa fa-spinner fa-pulse fa-2x fa-fw"></i>
<span class="sr">Loading…</span>
</p>
</div>
</div>
</div>
<div class="vert vert-2" data-id="block-v1:MITx+8.370.1x+1T2018+type@html+block@html_site_search_box3x">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-init="XBlockToXModuleShim" data-runtime-version="1" data-block-type="html" data-graded="True" data-request-token="fa7dec00732711efbae20e3672a9417f" data-usage-id="block-v1:MITx+8.370.1x+1T2018+type@html+block@html_site_search_box3x" data-has-score="False" data-course-id="course-v1:MITx+8.370.1x+1T2018" data-runtime-class="LmsRuntime">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.370.1x+1T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.370.1x+1T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
(function(){
course_static_url = $('#dummy_course_static_link').attr('href').replace('/NONE', '');
jump_to_url = $('#dummy_jump_link').attr('href').replace('/NONE', '');
if (typeof String.prototype.startsWith != 'function') {
// see below for better implementation!
String.prototype.startsWith = function (str){
return this.indexOf(str) === 0;
};
}
if(typeof(String.prototype.trim) === "undefined")
{
String.prototype.trim = function()
{
return String(this).replace(/^\s+|\s+$/g, '');
};
}
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var amp = String.fromCharCode(38);
var rlb = rb + lb;
var mke = function(x){ return lb + x + rb; }
go_to_search = function(){
// find search this module link
search_module_url = "";
$('div.course-index').find('nav').find('a').each(function(){
if ($(this).text().trim().startsWith("Search this course")){
search_module_url = $(this).attr('href');
console.log("search_module_url = ", search_module_url);
}
});
var sterm = $('#site-search-box').val();
// new_url = jump_to_url + "/Search_this_module/?q=" + sterm;
new_url = search_module_url + "?q=" + sterm;
console.log("sterm = ", sterm, " ; going to ", new_url);
window.location.href = new_url;
}
if (!$('#site-search-box').length){
$("nav.courseware").find("ol").append(lb + "section style='float:right'" + rlb + "input size='20'"
+ " id='site-search-box'"
+ rlb + "img src='" + course_static_url
+ "/images_search_glass.png'/" + rlb + "/input" + rlb + "/section" + rb);
}
$("#site-search-box").keypress(function(event) {
if (event.which == 13) {
event.preventDefault();
go_to_search();
}
});
// $('#site-search-box').bind("enterKey", go_to_search);
})();
var add_fix_transcript = function(){
if ($('div.wrap-instructor-info').length==0){
return;
}
$('div.xblock-student_view-video').each(function(key, vblock_e){
var vblock = $(vblock_e);
var vuid = vblock.data('usage-id').split('@');
var vid;
if (vuid.length==1){
vuid = vblock.data('usage-id').split(';_')
vid = vuid[5];
}else{
vid = vuid[2];
}
var mfnpre = vid.split("_video",1)[0];
var mfnid = mfnpre; // no periods
mfnpre = mfnpre.replace('8_370', '8.370'); // periods in gh filename
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var mke = function(x){ return lb + x + rb; }
var ftid = "fix_transcript_" + mfnid;
if (!$('#' + ftid).length){
var html = lb + "span id='" + ftid + "' style='float:right'" + rb + lb + "a href='#'" + rb;
html += "contribute transcript fix" + mke("/a") + mke("/span");
console.log("html = ", html);
vblock.after(html)
}
$('#' + ftid).click(function(){
var cst = $('ol.subtitles').find('li.current');
var cindex = Number(cst.data('index'));
var gurl;
if (mfnpre.endsWith('_cq_sol')){
gurl = "https://github.com/mitocw/content-mit-8370x-cq-sol-subtitles/blob/master/";
}else{
gurl = "https://github.com/mitocw/content-mit-8370x-subtitles/blob/master/";
}
gurl += mfnpre + ".txt#L" + String(cindex + 10 + 1);
console.log("going to ", gurl);
window.open(gurl, "MITx 8.370x subtitle source");
});
});
}
try{
add_fix_transcript();
}
catch(err){
console.log(err);
}
try{
var rb = String.fromCharCode(62);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 3000);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 8000);
}
catch(err){
console.log(err);
}
</script></span>
</div>
</div>
</div>
</div>
<div class="xblock xblock-public_view xblock-public_view-vertical" data-init="VerticalStudentView" data-runtime-version="1" data-block-type="vertical" data-graded="True" data-request-token="fa7dec00732711efbae20e3672a9417f" data-usage-id="block-v1:MITx+8.370.1x+1T2018+type@vertical+block@Tensor_products" data-has-score="False" data-course-id="course-v1:MITx+8.370.1x+1T2018" data-runtime-class="LmsRuntime">
<h2 class="hd hd-2 unit-title">Tensor products</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.370.1x+1T2018+type@problem+block@Tensor_products_of_states">
<div class="xblock xblock-public_view xblock-public_view-problem xmodule_display xmodule_ProblemBlock" data-init="XBlockToXModuleShim" data-runtime-version="1" data-block-type="problem" data-graded="True" data-request-token="fa7dec00732711efbae20e3672a9417f" data-usage-id="block-v1:MITx+8.370.1x+1T2018+type@problem+block@Tensor_products_of_states" data-has-score="True" data-course-id="course-v1:MITx+8.370.1x+1T2018" data-runtime-class="LmsRuntime">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Problem"}
</script>
<div id="problem_Tensor_products_of_states" class="problems-wrapper" role="group"
aria-labelledby="Tensor_products_of_states-problem-title"
data-problem-id="block-v1:MITx+8.370.1x+1T2018+type@problem+block@Tensor_products_of_states" data-url="/courses/course-v1:MITx+8.370.1x+1T2018/xblock/block-v1:MITx+8.370.1x+1T2018+type@problem+block@Tensor_products_of_states/handler/xmodule_handler"
data-problem-score="0"
data-problem-total-possible="2"
data-attempts-used="0"
data-content="
<h3 class="hd hd-3 problem-header" id="Tensor_products_of_states-problem-title" aria-describedby="block-v1:MITx+8.370.1x+1T2018+type@problem+block@Tensor_products_of_states-problem-progress" tabindex="-1">
Tensor products of states
</h3>
<div class="problem-progress" id="block-v1:MITx+8.370.1x+1T2018+type@problem+block@Tensor_products_of_states-problem-progress"></div>
<div class="problem">
<div>
<p>
Tensor product between [mathjaxinline]|{a}\rangle =\begin{pmatrix} a_1\\ a_2\\ \vdots \\ a_ n \end{pmatrix}[/mathjaxinline] and [mathjaxinline]|{b}\rangle =\begin{pmatrix} b_1\\ b_2\\ \vdots \\ b_ m \end{pmatrix}[/mathjaxinline] is calculated by [mathjaxinline]|{a}\rangle \otimes |{b}\rangle =\begin{pmatrix} a_1b_1\\ a_1b_2\\ \vdots \\ a_2b_1 \\ a_2b_2\\ \vdots \\ a_ nb_ m \end{pmatrix}.[/mathjaxinline] Recall that [mathjaxinline]|{0}\rangle[/mathjaxinline] and [mathjaxinline]|{1}\rangle[/mathjaxinline] are described in the vector form with [mathjaxinline]\{ |{0}\rangle , |{1}\rangle \}[/mathjaxinline] basis by [mathjaxinline]|{0}\rangle =\begin{pmatrix} 1 \\ 0 \end{pmatrix}[/mathjaxinline] and [mathjaxinline]|{1}\rangle =\begin{pmatrix} 0 \\ 1 \end{pmatrix}[/mathjaxinline]. Express the following states in the vector form with [mathjaxinline]\{ |{0}\rangle , |{1}\rangle \}[/mathjaxinline] basis. Answer in the form of a column vector. Input in the form [[1/sqrt(2)],[1/sqrt(2)],[0],[0]] for [mathjaxinline]\begin{pmatrix} 1/\sqrt{2} \\ 1/\sqrt{2} \\ 0 \\ 0 \end{pmatrix}[/mathjaxinline]. </p>
<ul class="itemize">
<li>
<p>
[mathjaxinline]|{00}\rangle[/mathjaxinline] <div class="wrapper-problem-response" tabindex="-1" aria-label="Question 1" role="group"><div id="inputtype_Tensor_products_of_states_2_1" class="text-input-dynamath capa_inputtype textline">
<div class="text-input-dynamath_data " data-preprocessor="MathjaxPreprocessorForQM"/>
<div class="script_placeholder" data-src="/assets/courseware/v1/95fe583d41f010195cf50c9f61992d94/asset-v1:MITx+8.370.1x+1T2018+type@asset+block/mathjax_preprocessor_for_QM_H.js"/>
<div class="unanswered ">
<input type="text" name="input_Tensor_products_of_states_2_1" id="input_Tensor_products_of_states_2_1" aria-describedby="status_Tensor_products_of_states_2_1" value="" class="math" size="70"/>
<span class="trailing_text" id="trailing_text_Tensor_products_of_states_2_1"/>
<span class="status unanswered" id="status_Tensor_products_of_states_2_1" data-tooltip="Not yet answered.">
<span class="sr">unanswered</span><span class="status-icon" aria-hidden="true"/>
</span>
<p id="answer_Tensor_products_of_states_2_1" class="answer"/>
<div id="display_Tensor_products_of_states_2_1" class="equation">`{::}`</div>
<textarea style="display:none" id="input_Tensor_products_of_states_2_1_dynamath" name="input_Tensor_products_of_states_2_1_dynamath"/>
</div>
</div></div> </p>
</li>
<li>
<p>
[mathjaxinline]|{++}\rangle[/mathjaxinline] <div class="wrapper-problem-response" tabindex="-1" aria-label="Question 2" role="group"><div id="inputtype_Tensor_products_of_states_3_1" class="text-input-dynamath capa_inputtype textline">
<div class="text-input-dynamath_data " data-preprocessor="MathjaxPreprocessorForQM"/>
<div class="script_placeholder" data-src="/assets/courseware/v1/95fe583d41f010195cf50c9f61992d94/asset-v1:MITx+8.370.1x+1T2018+type@asset+block/mathjax_preprocessor_for_QM_H.js"/>
<div class="unanswered ">
<input type="text" name="input_Tensor_products_of_states_3_1" id="input_Tensor_products_of_states_3_1" aria-describedby="status_Tensor_products_of_states_3_1" value="" class="math" size="70"/>
<span class="trailing_text" id="trailing_text_Tensor_products_of_states_3_1"/>
<span class="status unanswered" id="status_Tensor_products_of_states_3_1" data-tooltip="Not yet answered.">
<span class="sr">unanswered</span><span class="status-icon" aria-hidden="true"/>
</span>
<p id="answer_Tensor_products_of_states_3_1" class="answer"/>
<div id="display_Tensor_products_of_states_3_1" class="equation">`{::}`</div>
<textarea style="display:none" id="input_Tensor_products_of_states_3_1_dynamath" name="input_Tensor_products_of_states_3_1_dynamath"/>
</div>
</div></div> </p>
</li>
</ul>
<p>
<div class="solution-span">
<span id="solution_Tensor_products_of_states_solution_1"/>
</div></p>
</div>
<div class="action">
<input type="hidden" name="problem_id" value="Tensor products of states" />
<div class="submit-attempt-container">
<button type="button" class="submit btn-brand" data-submitting="Submitting" data-value="Submit" data-should-enable-submit-button="True" aria-describedby="submission_feedback_Tensor_products_of_states" >
<span class="submit-label">Submit</span>
</button>
<div class="submission-feedback" id="submission_feedback_Tensor_products_of_states">
<span class="sr">Some problems have options such as save, reset, hints, or show answer. These options follow the Submit button.</span>
</div>
</div>
<div class="problem-action-buttons-wrapper">
<span class="problem-action-button-wrapper">
<button type="button" class="save problem-action-btn btn-default btn-small" data-value="Save">
<span class="icon fa fa-floppy-o" aria-hidden="true"></span>
<span aria-hidden="true">Save</span>
<span class="sr">Save your answer</span>
</button>
</span>
</div>
</div>
<div class="notification warning notification-gentle-alert
is-hidden"
tabindex="-1">
<span class="icon fa fa-exclamation-circle" aria-hidden="true"></span>
<span class="notification-message" aria-describedby="Tensor_products_of_states-problem-title">
</span>
<div class="notification-btn-wrapper">
<button type="button" class="btn btn-default btn-small notification-btn review-btn sr">Review</button>
</div>
</div>
<div class="notification warning notification-save
is-hidden"
tabindex="-1">
<span class="icon fa fa-save" aria-hidden="true"></span>
<span class="notification-message" aria-describedby="Tensor_products_of_states-problem-title">None
</span>
<div class="notification-btn-wrapper">
<button type="button" class="btn btn-default btn-small notification-btn review-btn sr">Review</button>
</div>
</div>
<div class="notification general notification-show-answer
is-hidden"
tabindex="-1">
<span class="icon fa fa-info-circle" aria-hidden="true"></span>
<span class="notification-message" aria-describedby="Tensor_products_of_states-problem-title">Answers are displayed within the problem
</span>
<div class="notification-btn-wrapper">
<button type="button" class="btn btn-default btn-small notification-btn review-btn sr">Review</button>
</div>
</div>
</div>
"
data-graded="True">
<p class="loading-spinner">
<i class="fa fa-spinner fa-pulse fa-2x fa-fw"></i>
<span class="sr">Loading…</span>
</p>
</div>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+8.370.1x+1T2018+type@problem+block@problem_Tensor_products_of_matrices">
<div class="xblock xblock-public_view xblock-public_view-problem xmodule_display xmodule_ProblemBlock" data-init="XBlockToXModuleShim" data-runtime-version="1" data-block-type="problem" data-graded="True" data-request-token="fa7dec00732711efbae20e3672a9417f" data-usage-id="block-v1:MITx+8.370.1x+1T2018+type@problem+block@problem_Tensor_products_of_matrices" data-has-score="True" data-course-id="course-v1:MITx+8.370.1x+1T2018" data-runtime-class="LmsRuntime">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Problem"}
</script>
<div id="problem_problem_Tensor_products_of_matrices" class="problems-wrapper" role="group"
aria-labelledby="problem_Tensor_products_of_matrices-problem-title"
data-problem-id="block-v1:MITx+8.370.1x+1T2018+type@problem+block@problem_Tensor_products_of_matrices" data-url="/courses/course-v1:MITx+8.370.1x+1T2018/xblock/block-v1:MITx+8.370.1x+1T2018+type@problem+block@problem_Tensor_products_of_matrices/handler/xmodule_handler"
data-problem-score="0"
data-problem-total-possible="2"
data-attempts-used="0"
data-content="
<h3 class="hd hd-3 problem-header" id="problem_Tensor_products_of_matrices-problem-title" aria-describedby="block-v1:MITx+8.370.1x+1T2018+type@problem+block@problem_Tensor_products_of_matrices-problem-progress" tabindex="-1">
Tensor products of matrices
</h3>
<div class="problem-progress" id="block-v1:MITx+8.370.1x+1T2018+type@problem+block@problem_Tensor_products_of_matrices-problem-progress"></div>
<div class="problem">
<div>
<p>
Tensor product between two matrices [mathjaxinline]A[/mathjaxinline] and [mathjaxinline]B[/mathjaxinline] is defined in a way that [mathjaxinline](A\otimes B) |{a}\rangle \otimes |{b}\rangle =A|{a}\rangle \otimes B|{b}\rangle[/mathjaxinline]. It is specifically calculated by </p>
<table id="a0000000022" class="equation" width="100%" cellspacing="0" cellpadding="7" style="table-layout:auto">
<tr>
<td class="equation" style="width:80%; border:none">[mathjax]A\otimes B = \begin{pmatrix} A_{11}B &amp; A_{12}B &amp; \dots &amp; A_{1n} B\\ A_{21}B &amp; A_{22}B &amp; \dots &amp; A_{2n} B\\ \vdots &amp; \vdots &amp; \ddots &amp; \vdots \\ A_{n1}B &amp; A_{n2}B &amp; \dots &amp; A_{nn} B \end{pmatrix}[/mathjax]</td>
<td class="eqnnum" style="width:20%; border:none;text-align:right">(1.19)</td>
</tr>
</table>
<p>
[mathjaxinline]A_{ij}[/mathjaxinline] is [mathjaxinline](i,j)[/mathjaxinline]th entry of [mathjaxinline]A[/mathjaxinline]. </p>
<p>
Here, we introduce the [mathjaxinline]CNOT[/mathjaxinline] gate </p>
<table id="a0000000023" class="equation" width="100%" cellspacing="0" cellpadding="7" style="table-layout:auto">
<tr>
<td class="equation" style="width:80%; border:none">[mathjax]U_{CNOT(1,2)}= |{0}\rangle \! \langle {0}|\otimes I + |{1}\rangle \! \langle {1}|\otimes X = \begin{pmatrix} 1 &amp; 0 &amp; 0 &amp; 0 \\ 0 &amp; 1 &amp; 0 &amp; 0 \\ 0 &amp; 0 &amp; 0 &amp; 1 \\ 0 &amp; 0 &amp; 1 &amp; 0 \end{pmatrix}[/mathjax]</td>
<td class="eqnnum" style="width:20%; border:none;text-align:right">(1.20)</td>
</tr>
</table>
<p>
It flips the second qubit called target qubit controlled by the first qubit called control qubit. </p>
<p>
Compute the following. </p>
<ul class="itemize">
<li>
<p>
[mathjaxinline]I \otimes X[/mathjaxinline] <div class="wrapper-problem-response" tabindex="-1" aria-label="Question 1" role="group"><div id="inputtype_problem_Tensor_products_of_matrices_2_1" class="text-input-dynamath capa_inputtype textline">
<div class="text-input-dynamath_data " data-preprocessor="MathjaxPreprocessorForQM"/>
<div class="script_placeholder" data-src="/assets/courseware/v1/95fe583d41f010195cf50c9f61992d94/asset-v1:MITx+8.370.1x+1T2018+type@asset+block/mathjax_preprocessor_for_QM_H.js"/>
<div class="unanswered ">
<input type="text" name="input_problem_Tensor_products_of_matrices_2_1" id="input_problem_Tensor_products_of_matrices_2_1" aria-describedby="status_problem_Tensor_products_of_matrices_2_1" value="" class="math" size="70"/>
<span class="trailing_text" id="trailing_text_problem_Tensor_products_of_matrices_2_1"/>
<span class="status unanswered" id="status_problem_Tensor_products_of_matrices_2_1" data-tooltip="Not yet answered.">
<span class="sr">unanswered</span><span class="status-icon" aria-hidden="true"/>
</span>
<p id="answer_problem_Tensor_products_of_matrices_2_1" class="answer"/>
<div id="display_problem_Tensor_products_of_matrices_2_1" class="equation">`{::}`</div>
<textarea style="display:none" id="input_problem_Tensor_products_of_matrices_2_1_dynamath" name="input_problem_Tensor_products_of_matrices_2_1_dynamath"/>
</div>
</div></div> </p>
</li>
<li>
<p>
[mathjaxinline](I \otimes H) U_{CNOT(1,2)} (I \otimes H)[/mathjaxinline] <div class="wrapper-problem-response" tabindex="-1" aria-label="Question 2" role="group"><div id="inputtype_problem_Tensor_products_of_matrices_3_1" class="text-input-dynamath capa_inputtype textline">
<div class="text-input-dynamath_data " data-preprocessor="MathjaxPreprocessorForQM"/>
<div class="script_placeholder" data-src="/assets/courseware/v1/95fe583d41f010195cf50c9f61992d94/asset-v1:MITx+8.370.1x+1T2018+type@asset+block/mathjax_preprocessor_for_QM_H.js"/>
<div class="unanswered ">
<input type="text" name="input_problem_Tensor_products_of_matrices_3_1" id="input_problem_Tensor_products_of_matrices_3_1" aria-describedby="status_problem_Tensor_products_of_matrices_3_1" value="" class="math" size="70"/>
<span class="trailing_text" id="trailing_text_problem_Tensor_products_of_matrices_3_1"/>
<span class="status unanswered" id="status_problem_Tensor_products_of_matrices_3_1" data-tooltip="Not yet answered.">
<span class="sr">unanswered</span><span class="status-icon" aria-hidden="true"/>
</span>
<p id="answer_problem_Tensor_products_of_matrices_3_1" class="answer"/>
<div id="display_problem_Tensor_products_of_matrices_3_1" class="equation">`{::}`</div>
<textarea style="display:none" id="input_problem_Tensor_products_of_matrices_3_1_dynamath" name="input_problem_Tensor_products_of_matrices_3_1_dynamath"/>
</div>
</div></div> </p>
</li>
</ul>
<p>
<div class="solution-span">
<span id="solution_problem_Tensor_products_of_matrices_solution_1"/>
</div></p>
</div>
<div class="action">
<input type="hidden" name="problem_id" value="Tensor products of matrices" />
<div class="submit-attempt-container">
<button type="button" class="submit btn-brand" data-submitting="Submitting" data-value="Submit" data-should-enable-submit-button="True" aria-describedby="submission_feedback_problem_Tensor_products_of_matrices" >
<span class="submit-label">Submit</span>
</button>
<div class="submission-feedback" id="submission_feedback_problem_Tensor_products_of_matrices">
<span class="sr">Some problems have options such as save, reset, hints, or show answer. These options follow the Submit button.</span>
</div>
</div>
<div class="problem-action-buttons-wrapper">
<span class="problem-action-button-wrapper">
<button type="button" class="save problem-action-btn btn-default btn-small" data-value="Save">
<span class="icon fa fa-floppy-o" aria-hidden="true"></span>
<span aria-hidden="true">Save</span>
<span class="sr">Save your answer</span>
</button>
</span>
</div>
</div>
<div class="notification warning notification-gentle-alert
is-hidden"
tabindex="-1">
<span class="icon fa fa-exclamation-circle" aria-hidden="true"></span>
<span class="notification-message" aria-describedby="problem_Tensor_products_of_matrices-problem-title">
</span>
<div class="notification-btn-wrapper">
<button type="button" class="btn btn-default btn-small notification-btn review-btn sr">Review</button>
</div>
</div>
<div class="notification warning notification-save
is-hidden"
tabindex="-1">
<span class="icon fa fa-save" aria-hidden="true"></span>
<span class="notification-message" aria-describedby="problem_Tensor_products_of_matrices-problem-title">None
</span>
<div class="notification-btn-wrapper">
<button type="button" class="btn btn-default btn-small notification-btn review-btn sr">Review</button>
</div>
</div>
<div class="notification general notification-show-answer
is-hidden"
tabindex="-1">
<span class="icon fa fa-info-circle" aria-hidden="true"></span>
<span class="notification-message" aria-describedby="problem_Tensor_products_of_matrices-problem-title">Answers are displayed within the problem
</span>
<div class="notification-btn-wrapper">
<button type="button" class="btn btn-default btn-small notification-btn review-btn sr">Review</button>
</div>
</div>
</div>
"
data-graded="True">
<p class="loading-spinner">
<i class="fa fa-spinner fa-pulse fa-2x fa-fw"></i>
<span class="sr">Loading…</span>
</p>
</div>
</div>
</div>
<div class="vert vert-2" data-id="block-v1:MITx+8.370.1x+1T2018+type@html+block@html_site_search_box2xx">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-init="XBlockToXModuleShim" data-runtime-version="1" data-block-type="html" data-graded="True" data-request-token="fa7dec00732711efbae20e3672a9417f" data-usage-id="block-v1:MITx+8.370.1x+1T2018+type@html+block@html_site_search_box2xx" data-has-score="False" data-course-id="course-v1:MITx+8.370.1x+1T2018" data-runtime-class="LmsRuntime">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.370.1x+1T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.370.1x+1T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
(function(){
course_static_url = $('#dummy_course_static_link').attr('href').replace('/NONE', '');
jump_to_url = $('#dummy_jump_link').attr('href').replace('/NONE', '');
if (typeof String.prototype.startsWith != 'function') {
// see below for better implementation!
String.prototype.startsWith = function (str){
return this.indexOf(str) === 0;
};
}
if(typeof(String.prototype.trim) === "undefined")
{
String.prototype.trim = function()
{
return String(this).replace(/^\s+|\s+$/g, '');
};
}
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var amp = String.fromCharCode(38);
var rlb = rb + lb;
var mke = function(x){ return lb + x + rb; }
go_to_search = function(){
// find search this module link
search_module_url = "";
$('div.course-index').find('nav').find('a').each(function(){
if ($(this).text().trim().startsWith("Search this course")){
search_module_url = $(this).attr('href');
console.log("search_module_url = ", search_module_url);
}
});
var sterm = $('#site-search-box').val();
// new_url = jump_to_url + "/Search_this_module/?q=" + sterm;
new_url = search_module_url + "?q=" + sterm;
console.log("sterm = ", sterm, " ; going to ", new_url);
window.location.href = new_url;
}
if (!$('#site-search-box').length){
$("nav.courseware").find("ol").append(lb + "section style='float:right'" + rlb + "input size='20'"
+ " id='site-search-box'"
+ rlb + "img src='" + course_static_url
+ "/images_search_glass.png'/" + rlb + "/input" + rlb + "/section" + rb);
}
$("#site-search-box").keypress(function(event) {
if (event.which == 13) {
event.preventDefault();
go_to_search();
}
});
// $('#site-search-box').bind("enterKey", go_to_search);
})();
var add_fix_transcript = function(){
if ($('div.wrap-instructor-info').length==0){
return;
}
$('div.xblock-student_view-video').each(function(key, vblock_e){
var vblock = $(vblock_e);
var vuid = vblock.data('usage-id').split('@');
var vid;
if (vuid.length==1){
vuid = vblock.data('usage-id').split(';_')
vid = vuid[5];
}else{
vid = vuid[2];
}
var mfnpre = vid.split("_video",1)[0];
var mfnid = mfnpre; // no periods
mfnpre = mfnpre.replace('8_370', '8.370'); // periods in gh filename
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var mke = function(x){ return lb + x + rb; }
var ftid = "fix_transcript_" + mfnid;
if (!$('#' + ftid).length){
var html = lb + "span id='" + ftid + "' style='float:right'" + rb + lb + "a href='#'" + rb;
html += "contribute transcript fix" + mke("/a") + mke("/span");
console.log("html = ", html);
vblock.after(html)
}
$('#' + ftid).click(function(){
var cst = $('ol.subtitles').find('li.current');
var cindex = Number(cst.data('index'));
var gurl;
if (mfnpre.endsWith('_cq_sol')){
gurl = "https://github.com/mitocw/content-mit-8370x-cq-sol-subtitles/blob/master/";
}else{
gurl = "https://github.com/mitocw/content-mit-8370x-subtitles/blob/master/";
}
gurl += mfnpre + ".txt#L" + String(cindex + 10 + 1);
console.log("going to ", gurl);
window.open(gurl, "MITx 8.370x subtitle source");
});
});
}
try{
add_fix_transcript();
}
catch(err){
console.log(err);
}
try{
var rb = String.fromCharCode(62);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 3000);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 8000);
}
catch(err){
console.log(err);
}
</script></span>
</div>
</div>
</div>
</div>
© All Rights Reserved