<div class="xblock xblock-public_view xblock-public_view-vertical" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="VerticalStudentView" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="vertical" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@vertical+block@QEC_review_material_overview" data-runtime-class="LmsRuntime" data-has-score="False">
<h2 class="hd hd-2 unit-title">QEC review material: overview</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_QEC_review_material_overview">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="html" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_QEC_review_material_overview" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<p><big class="xlarge">QEC review material: overview</big></p><p>
This section includes review material from Prof. Peter Shor and Prof. Isaac Chuang's 8.370 lectures on </p><ul class="itemize"><li><p><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/U3L3a" target="_blank">the dephasing channel</a>, </p></li><li><p><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/U3L3b" target="_blank">the dephasing channel as depicted on the Bloch sphere</a>, </p></li><li><p><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/U3L3c" target="_blank">the depolarizing channel</a>, </p></li><li><p><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/U3L3d" target="_blank">the three qubit bit flip code</a>, </p></li><li><p><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/U3L3e" target="_blank">the three-qubit phase flip error correction code</a>, </p></li><li><p><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/U3L3f" target="_blank">the nine-qubit quantum error correction code</a>, </p></li><li><p><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/U3L3g" target="_blank">effect of single qubit rotation errors on the quantum code</a>, </p></li><li><p><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/U3L3h" target="_blank">effect of depolarizing channel on the quantum code</a>. </p></li><li><p><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/U3L4a" target="_blank">classical and quantum coding</a>, </p></li><li><p><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/U3L4b" target="_blank">Three conceptual challenges faced by quantum error correction</a>, </p></li><li><p><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/U3L4c" target="_blank">Quantum codes - definition and review</a>, </p></li><li><p><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/U3L4d" target="_blank">Operator measurement</a>, </p></li><li><p><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/U3L4e" target="_blank">Syndrome measurement and recovery operators</a>, </p></li><li><p><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/U3L4f" target="_blank">Syndrome operators - phase flip code and Shor 9-qubit code</a></p></li></ul>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_site_search_box1x">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="html" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_site_search_box1x" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.1x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = 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; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('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 go_to_search = function(){
get_search_module();
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 get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_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-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="VerticalStudentView" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="vertical" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@vertical+block@Quantum_channels_-_simplified_the_dephasing_channel" data-runtime-class="LmsRuntime" data-has-score="False">
<h2 class="hd hd-2 unit-title">Quantum channels - simplified: the dephasing channel</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3a">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="video" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3a" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Quantum channels - simplified: the dephasing channel</h3>
<div
id="video_U3L3a"
class="video closed"
data-metadata='{"publishCompletionUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3a/handler/publish_completion", "duration": 0.0, "transcriptLanguage": "en", "ytTestTimeout": 1500, "prioritizeHls": false, "generalSpeed": 1.0, "sources": [], "captionDataDir": null, "autoAdvance": false, "poster": null, "autohideHtml5": false, "speed": null, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3a/handler/transcript/translation/__lang__", "recordedYoutubeIsAvailable": true, "completionEnabled": false, "end": 0.0, "ytMetadataEndpoint": "", "completionPercentage": 0.95, "savedVideoPosition": 0.0, "lmsRootURL": "https://openlearninglibrary.mit.edu", "saveStateEnabled": false, "start": 0.0, "streams": "1.00:PcuSl3I50AQ", "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3a/handler/transcript/available_translations", "autoplay": false, "showCaptions": "true", "transcriptLanguages": {"en": "English"}, "saveStateUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3a/handler/xmodule_handler/save_user_state", "ytApiUrl": "https://www.youtube.com/iframe_api"}'
data-bumper-metadata='null'
data-autoadvance-enabled="False"
data-poster='null'
tabindex="-1"
>
<div class="focus_grabber first"></div>
<div class="tc-wrapper">
<div class="video-wrapper">
<span tabindex="0" class="spinner" aria-hidden="false" aria-label="Loading video player"></span>
<span tabindex="-1" class="btn-play fa fa-youtube-play fa-2x is-hidden" aria-hidden="true" aria-label="Play video"></span>
<div class="video-player-pre"></div>
<div class="video-player">
<div id="U3L3a"></div>
<h4 class="hd hd-4 video-error is-hidden">No playable video sources found.</h4>
<h4 class="hd hd-4 video-hls-error is-hidden">
Your browser does not support this video format. Try using a different browser.
</h4>
</div>
<div class="video-player-post"></div>
<div class="closed-captions"></div>
<div class="video-controls is-hidden">
<div>
<div class="vcr"><div class="vidtime">0:00 / 0:00</div></div>
<div class="secondary-controls"></div>
</div>
</div>
</div>
</div>
<div class="focus_grabber last"></div>
</div>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_site_search_box1xx">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="html" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_site_search_box1xx" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.1x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = 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; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('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 go_to_search = function(){
get_search_module();
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 get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_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-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="VerticalStudentView" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="vertical" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@vertical+block@The_dephasing_channel_as_depicted_on_the_Bloch_sphere" data-runtime-class="LmsRuntime" data-has-score="False">
<h2 class="hd hd-2 unit-title">The dephasing channel as depicted on the Bloch sphere</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3b">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="video" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3b" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">The dephasing channel as depicted on the Bloch sphere</h3>
<div
id="video_U3L3b"
class="video closed"
data-metadata='{"publishCompletionUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3b/handler/publish_completion", "duration": 0.0, "transcriptLanguage": "en", "ytTestTimeout": 1500, "prioritizeHls": false, "generalSpeed": 1.0, "sources": [], "captionDataDir": null, "autoAdvance": false, "poster": null, "autohideHtml5": false, "speed": null, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3b/handler/transcript/translation/__lang__", "recordedYoutubeIsAvailable": true, "completionEnabled": false, "end": 0.0, "ytMetadataEndpoint": "", "completionPercentage": 0.95, "savedVideoPosition": 0.0, "lmsRootURL": "https://openlearninglibrary.mit.edu", "saveStateEnabled": false, "start": 0.0, "streams": "1.00:ASYsmUqmlBg", "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3b/handler/transcript/available_translations", "autoplay": false, "showCaptions": "true", "transcriptLanguages": {"en": "English"}, "saveStateUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3b/handler/xmodule_handler/save_user_state", "ytApiUrl": "https://www.youtube.com/iframe_api"}'
data-bumper-metadata='null'
data-autoadvance-enabled="False"
data-poster='null'
tabindex="-1"
>
<div class="focus_grabber first"></div>
<div class="tc-wrapper">
<div class="video-wrapper">
<span tabindex="0" class="spinner" aria-hidden="false" aria-label="Loading video player"></span>
<span tabindex="-1" class="btn-play fa fa-youtube-play fa-2x is-hidden" aria-hidden="true" aria-label="Play video"></span>
<div class="video-player-pre"></div>
<div class="video-player">
<div id="U3L3b"></div>
<h4 class="hd hd-4 video-error is-hidden">No playable video sources found.</h4>
<h4 class="hd hd-4 video-hls-error is-hidden">
Your browser does not support this video format. Try using a different browser.
</h4>
</div>
<div class="video-player-post"></div>
<div class="closed-captions"></div>
<div class="video-controls is-hidden">
<div>
<div class="vcr"><div class="vidtime">0:00 / 0:00</div></div>
<div class="secondary-controls"></div>
</div>
</div>
</div>
</div>
<div class="focus_grabber last"></div>
</div>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_site_search_box2x">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="html" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_site_search_box2x" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.1x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = 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; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('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 go_to_search = function(){
get_search_module();
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 get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_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-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="VerticalStudentView" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="vertical" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@vertical+block@The_depolarizing_channel" data-runtime-class="LmsRuntime" data-has-score="False">
<h2 class="hd hd-2 unit-title">The depolarizing channel</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3c">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="video" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3c" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">The depolarizing channel</h3>
<div
id="video_U3L3c"
class="video closed"
data-metadata='{"publishCompletionUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3c/handler/publish_completion", "duration": 0.0, "transcriptLanguage": "en", "ytTestTimeout": 1500, "prioritizeHls": false, "generalSpeed": 1.0, "sources": [], "captionDataDir": null, "autoAdvance": false, "poster": null, "autohideHtml5": false, "speed": null, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3c/handler/transcript/translation/__lang__", "recordedYoutubeIsAvailable": true, "completionEnabled": false, "end": 0.0, "ytMetadataEndpoint": "", "completionPercentage": 0.95, "savedVideoPosition": 0.0, "lmsRootURL": "https://openlearninglibrary.mit.edu", "saveStateEnabled": false, "start": 0.0, "streams": "1.00:DQo0T7dB5Io", "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3c/handler/transcript/available_translations", "autoplay": false, "showCaptions": "true", "transcriptLanguages": {"en": "English"}, "saveStateUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3c/handler/xmodule_handler/save_user_state", "ytApiUrl": "https://www.youtube.com/iframe_api"}'
data-bumper-metadata='null'
data-autoadvance-enabled="False"
data-poster='null'
tabindex="-1"
>
<div class="focus_grabber first"></div>
<div class="tc-wrapper">
<div class="video-wrapper">
<span tabindex="0" class="spinner" aria-hidden="false" aria-label="Loading video player"></span>
<span tabindex="-1" class="btn-play fa fa-youtube-play fa-2x is-hidden" aria-hidden="true" aria-label="Play video"></span>
<div class="video-player-pre"></div>
<div class="video-player">
<div id="U3L3c"></div>
<h4 class="hd hd-4 video-error is-hidden">No playable video sources found.</h4>
<h4 class="hd hd-4 video-hls-error is-hidden">
Your browser does not support this video format. Try using a different browser.
</h4>
</div>
<div class="video-player-post"></div>
<div class="closed-captions"></div>
<div class="video-controls is-hidden">
<div>
<div class="vcr"><div class="vidtime">0:00 / 0:00</div></div>
<div class="secondary-controls"></div>
</div>
</div>
</div>
</div>
<div class="focus_grabber last"></div>
</div>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_site_search_box3">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="html" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_site_search_box3" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.1x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = 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; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('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 go_to_search = function(){
get_search_module();
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 get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_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-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="VerticalStudentView" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="vertical" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@vertical+block@CQ_The_dephasing_and_depolarizing_channels" data-runtime-class="LmsRuntime" data-has-score="False">
<h2 class="hd hd-2 unit-title">CQ: The dephasing and depolarizing channels</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.1x+2T2018+type@problem+block@u3_2_cq_depol_dephasing">
<div class="xblock xblock-public_view xblock-public_view-problem xmodule_display xmodule_ProblemBlock" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="problem" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@problem+block@u3_2_cq_depol_dephasing" data-runtime-class="LmsRuntime" data-has-score="True">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Problem"}
</script>
<div id="problem_u3_2_cq_depol_dephasing" class="problems-wrapper" role="group"
aria-labelledby="u3_2_cq_depol_dephasing-problem-title"
data-problem-id="block-v1:MITx+8.371.1x+2T2018+type@problem+block@u3_2_cq_depol_dephasing" data-url="/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@problem+block@u3_2_cq_depol_dephasing/handler/xmodule_handler"
data-problem-score="0"
data-problem-total-possible="1"
data-attempts-used="0"
data-content="
<h3 class="hd hd-3 problem-header" id="u3_2_cq_depol_dephasing-problem-title" aria-describedby="block-v1:MITx+8.371.1x+2T2018+type@problem+block@u3_2_cq_depol_dephasing-problem-progress" tabindex="-1">
The dephasing and depolarizing channels
</h3>
<div class="problem-progress" id="block-v1:MITx+8.371.1x+2T2018+type@problem+block@u3_2_cq_depol_dephasing-problem-progress"></div>
<div class="problem">
<div>
<p>
This is a concept question, provided to check your understanding of the previous video clip. </p>
<p>
Which of the following statements about the dephasing channel and the <a href="https://en.wikipedia.org/wiki/Quantum_depolarizing_channel" target="_blank">depolarizing channel</a> are correct? Check all that apply: </p>
<p>
<div class="wrapper-problem-response" tabindex="-1" aria-label="Question 1" role="group"><div class="choicegroup capa_inputtype" id="inputtype_u3_2_cq_depol_dephasing_2_1">
<fieldset aria-describedby="status_u3_2_cq_depol_dephasing_2_1">
<div class="field">
<input type="checkbox" name="input_u3_2_cq_depol_dephasing_2_1[]" id="input_u3_2_cq_depol_dephasing_2_1_choice_0" class="field-input input-checkbox" value="choice_0"/><label id="u3_2_cq_depol_dephasing_2_1-choice_0-label" for="input_u3_2_cq_depol_dephasing_2_1_choice_0" class="response-label field-label label-inline" aria-describedby="status_u3_2_cq_depol_dephasing_2_1">
<text>The dephasing channel shrinks qubit states towards the z-axis of the Bloch sphere, whereas the depolarizing channel shrinks states to the center of the sphere.</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_u3_2_cq_depol_dephasing_2_1[]" id="input_u3_2_cq_depol_dephasing_2_1_choice_1" class="field-input input-checkbox" value="choice_1"/><label id="u3_2_cq_depol_dephasing_2_1-choice_1-label" for="input_u3_2_cq_depol_dephasing_2_1_choice_1" class="response-label field-label label-inline" aria-describedby="status_u3_2_cq_depol_dephasing_2_1">
<text>The dephasing channel and the depolarizing channel are identical up to a rotation of the qubit.</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_u3_2_cq_depol_dephasing_2_1[]" id="input_u3_2_cq_depol_dephasing_2_1_choice_2" class="field-input input-checkbox" value="choice_2"/><label id="u3_2_cq_depol_dephasing_2_1-choice_2-label" for="input_u3_2_cq_depol_dephasing_2_1_choice_2" class="response-label field-label label-inline" aria-describedby="status_u3_2_cq_depol_dephasing_2_1">
<text>The depolarizing channel is essentially dephasing along three directions.</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_u3_2_cq_depol_dephasing_2_1[]" id="input_u3_2_cq_depol_dephasing_2_1_choice_3" class="field-input input-checkbox" value="choice_3"/><label id="u3_2_cq_depol_dephasing_2_1-choice_3-label" for="input_u3_2_cq_depol_dephasing_2_1_choice_3" class="response-label field-label label-inline" aria-describedby="status_u3_2_cq_depol_dephasing_2_1">
<text>The depolarizing and dephasing channels are both models of what can happen to a single qubit.</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_u3_2_cq_depol_dephasing_2_1[]" id="input_u3_2_cq_depol_dephasing_2_1_choice_4" class="field-input input-checkbox" value="choice_4"/><label id="u3_2_cq_depol_dephasing_2_1-choice_4-label" for="input_u3_2_cq_depol_dephasing_2_1_choice_4" class="response-label field-label label-inline" aria-describedby="status_u3_2_cq_depol_dephasing_2_1">
<text>The single-qubit fully mixed state [mathjaxinline]\rho =I/2[/mathjaxinline] is unchanged under both the depolarizing and the dephasing channels.</text>
</label>
</div>
<span id="answer_u3_2_cq_depol_dephasing_2_1"/>
</fieldset>
<div class="indicator-container">
<span class="status unanswered" id="status_u3_2_cq_depol_dephasing_2_1" data-tooltip="Not yet answered.">
<span class="sr">unanswered</span><span class="status-icon" aria-hidden="true"/>
</span>
</div>
</div></div>
</p>
</div>
<div class="action">
<input type="hidden" name="problem_id" value="The dephasing and depolarizing channels" />
<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_u3_2_cq_depol_dephasing" >
<span class="submit-label">Submit</span>
</button>
<div class="submission-feedback" id="submission_feedback_u3_2_cq_depol_dephasing">
<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="u3_2_cq_depol_dephasing-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="u3_2_cq_depol_dephasing-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="u3_2_cq_depol_dephasing-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.371.1x+2T2018+type@html+block@html_site_search_box1xxx">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="html" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_site_search_box1xxx" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.1x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = 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; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('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 go_to_search = function(){
get_search_module();
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 get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_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-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="VerticalStudentView" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="vertical" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@vertical+block@Quantum_version_of_the_classical_repetition_code_-_three_qubit_bit_flip_code" data-runtime-class="LmsRuntime" data-has-score="False">
<h2 class="hd hd-2 unit-title">Quantum version of the classical repetition code - three qubit bit flip code</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3d">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="video" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3d" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Quantum version of the classical repetition code - three qubit bit flip code</h3>
<div
id="video_U3L3d"
class="video closed"
data-metadata='{"publishCompletionUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3d/handler/publish_completion", "duration": 0.0, "transcriptLanguage": "en", "ytTestTimeout": 1500, "prioritizeHls": false, "generalSpeed": 1.0, "sources": [], "captionDataDir": null, "autoAdvance": false, "poster": null, "autohideHtml5": false, "speed": null, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3d/handler/transcript/translation/__lang__", "recordedYoutubeIsAvailable": true, "completionEnabled": false, "end": 0.0, "ytMetadataEndpoint": "", "completionPercentage": 0.95, "savedVideoPosition": 0.0, "lmsRootURL": "https://openlearninglibrary.mit.edu", "saveStateEnabled": false, "start": 0.0, "streams": "1.00:uB5BZOTXfzg", "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3d/handler/transcript/available_translations", "autoplay": false, "showCaptions": "true", "transcriptLanguages": {"en": "English"}, "saveStateUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3d/handler/xmodule_handler/save_user_state", "ytApiUrl": "https://www.youtube.com/iframe_api"}'
data-bumper-metadata='null'
data-autoadvance-enabled="False"
data-poster='null'
tabindex="-1"
>
<div class="focus_grabber first"></div>
<div class="tc-wrapper">
<div class="video-wrapper">
<span tabindex="0" class="spinner" aria-hidden="false" aria-label="Loading video player"></span>
<span tabindex="-1" class="btn-play fa fa-youtube-play fa-2x is-hidden" aria-hidden="true" aria-label="Play video"></span>
<div class="video-player-pre"></div>
<div class="video-player">
<div id="U3L3d"></div>
<h4 class="hd hd-4 video-error is-hidden">No playable video sources found.</h4>
<h4 class="hd hd-4 video-hls-error is-hidden">
Your browser does not support this video format. Try using a different browser.
</h4>
</div>
<div class="video-player-post"></div>
<div class="closed-captions"></div>
<div class="video-controls is-hidden">
<div>
<div class="vcr"><div class="vidtime">0:00 / 0:00</div></div>
<div class="secondary-controls"></div>
</div>
</div>
</div>
</div>
<div class="focus_grabber last"></div>
</div>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_site_search_box4">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="html" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_site_search_box4" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.1x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = 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; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('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 go_to_search = function(){
get_search_module();
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 get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_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-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="VerticalStudentView" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="vertical" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@vertical+block@The_three-qubit_phase_flip_error_correction_code" data-runtime-class="LmsRuntime" data-has-score="False">
<h2 class="hd hd-2 unit-title">The three-qubit phase flip error correction code</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3e">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="video" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3e" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">The three-qubit phase flip error correction code</h3>
<div
id="video_U3L3e"
class="video closed"
data-metadata='{"publishCompletionUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3e/handler/publish_completion", "duration": 0.0, "transcriptLanguage": "en", "ytTestTimeout": 1500, "prioritizeHls": false, "generalSpeed": 1.0, "sources": [], "captionDataDir": null, "autoAdvance": false, "poster": null, "autohideHtml5": false, "speed": null, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3e/handler/transcript/translation/__lang__", "recordedYoutubeIsAvailable": true, "completionEnabled": false, "end": 0.0, "ytMetadataEndpoint": "", "completionPercentage": 0.95, "savedVideoPosition": 0.0, "lmsRootURL": "https://openlearninglibrary.mit.edu", "saveStateEnabled": false, "start": 0.0, "streams": "1.00:7e-0HyXEAIM", "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3e/handler/transcript/available_translations", "autoplay": false, "showCaptions": "true", "transcriptLanguages": {"en": "English"}, "saveStateUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3e/handler/xmodule_handler/save_user_state", "ytApiUrl": "https://www.youtube.com/iframe_api"}'
data-bumper-metadata='null'
data-autoadvance-enabled="False"
data-poster='null'
tabindex="-1"
>
<div class="focus_grabber first"></div>
<div class="tc-wrapper">
<div class="video-wrapper">
<span tabindex="0" class="spinner" aria-hidden="false" aria-label="Loading video player"></span>
<span tabindex="-1" class="btn-play fa fa-youtube-play fa-2x is-hidden" aria-hidden="true" aria-label="Play video"></span>
<div class="video-player-pre"></div>
<div class="video-player">
<div id="U3L3e"></div>
<h4 class="hd hd-4 video-error is-hidden">No playable video sources found.</h4>
<h4 class="hd hd-4 video-hls-error is-hidden">
Your browser does not support this video format. Try using a different browser.
</h4>
</div>
<div class="video-player-post"></div>
<div class="closed-captions"></div>
<div class="video-controls is-hidden">
<div>
<div class="vcr"><div class="vidtime">0:00 / 0:00</div></div>
<div class="secondary-controls"></div>
</div>
</div>
</div>
</div>
<div class="focus_grabber last"></div>
</div>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_site_search_box5x">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="html" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_site_search_box5x" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.1x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = 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; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('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 go_to_search = function(){
get_search_module();
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 get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_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-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="VerticalStudentView" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="vertical" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@vertical+block@CQ_Three-qubit_quantum_code_versus_three-bit_classical_code" data-runtime-class="LmsRuntime" data-has-score="False">
<h2 class="hd hd-2 unit-title">CQ: Three-qubit quantum code versus three-bit classical code</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.1x+2T2018+type@problem+block@u3_2_cq_3qubit_code">
<div class="xblock xblock-public_view xblock-public_view-problem xmodule_display xmodule_ProblemBlock" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="problem" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@problem+block@u3_2_cq_3qubit_code" data-runtime-class="LmsRuntime" data-has-score="True">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Problem"}
</script>
<div id="problem_u3_2_cq_3qubit_code" class="problems-wrapper" role="group"
aria-labelledby="u3_2_cq_3qubit_code-problem-title"
data-problem-id="block-v1:MITx+8.371.1x+2T2018+type@problem+block@u3_2_cq_3qubit_code" data-url="/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@problem+block@u3_2_cq_3qubit_code/handler/xmodule_handler"
data-problem-score="0"
data-problem-total-possible="1"
data-attempts-used="0"
data-content="
<h3 class="hd hd-3 problem-header" id="u3_2_cq_3qubit_code-problem-title" aria-describedby="block-v1:MITx+8.371.1x+2T2018+type@problem+block@u3_2_cq_3qubit_code-problem-progress" tabindex="-1">
Three-qubit quantum code versus three-bit classical code
</h3>
<div class="problem-progress" id="block-v1:MITx+8.371.1x+2T2018+type@problem+block@u3_2_cq_3qubit_code-problem-progress"></div>
<div class="problem">
<div>
<p>
This is a concept question, provided to check your understanding of the previous video clip. </p>
<p>
Which of the following statements are correct about the <a href="https://en.wikipedia.org/wiki/Shor_code#The_bit_flip_code" target="_blank">three-qubit bit-flip code</a>, and the three-bit classical <a href="https://en.wikipedia.org/wiki/Repetition_code" target="_blank">repetition code</a>? Check all that apply: </p>
<p>
<div class="wrapper-problem-response" tabindex="-1" aria-label="Question 1" role="group"><div class="choicegroup capa_inputtype" id="inputtype_u3_2_cq_3qubit_code_2_1">
<fieldset aria-describedby="status_u3_2_cq_3qubit_code_2_1">
<div class="field">
<input type="checkbox" name="input_u3_2_cq_3qubit_code_2_1[]" id="input_u3_2_cq_3qubit_code_2_1_choice_0" class="field-input input-checkbox" value="choice_0"/><label id="u3_2_cq_3qubit_code_2_1-choice_0-label" for="input_u3_2_cq_3qubit_code_2_1_choice_0" class="response-label field-label label-inline" aria-describedby="status_u3_2_cq_3qubit_code_2_1">
<text>The three-qubit bit-flip code is decoded just like majority voting, by measuring the three qubits and computing the majority.</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_u3_2_cq_3qubit_code_2_1[]" id="input_u3_2_cq_3qubit_code_2_1_choice_1" class="field-input input-checkbox" value="choice_1"/><label id="u3_2_cq_3qubit_code_2_1-choice_1-label" for="input_u3_2_cq_3qubit_code_2_1_choice_1" class="response-label field-label label-inline" aria-describedby="status_u3_2_cq_3qubit_code_2_1">
<text>The three-qubit bit flip code can also be used to correct phase flips, by applying Hadamard operators to the three qubits.</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_u3_2_cq_3qubit_code_2_1[]" id="input_u3_2_cq_3qubit_code_2_1_choice_2" class="field-input input-checkbox" value="choice_2"/><label id="u3_2_cq_3qubit_code_2_1-choice_2-label" for="input_u3_2_cq_3qubit_code_2_1_choice_2" class="response-label field-label label-inline" aria-describedby="status_u3_2_cq_3qubit_code_2_1">
<text>The three-qubit bit-flip code must be decoded without measuring the encoded qubit.</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_u3_2_cq_3qubit_code_2_1[]" id="input_u3_2_cq_3qubit_code_2_1_choice_3" class="field-input input-checkbox" value="choice_3"/><label id="u3_2_cq_3qubit_code_2_1-choice_3-label" for="input_u3_2_cq_3qubit_code_2_1_choice_3" class="response-label field-label label-inline" aria-describedby="status_u3_2_cq_3qubit_code_2_1">
<text>The three-qubit bit flip code can correct for single-qubit depolarizing errors.</text>
</label>
</div>
<span id="answer_u3_2_cq_3qubit_code_2_1"/>
</fieldset>
<div class="indicator-container">
<span class="status unanswered" id="status_u3_2_cq_3qubit_code_2_1" data-tooltip="Not yet answered.">
<span class="sr">unanswered</span><span class="status-icon" aria-hidden="true"/>
</span>
</div>
</div></div>
</p>
</div>
<div class="action">
<input type="hidden" name="problem_id" value="Three-qubit quantum code versus three-bit classical code" />
<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_u3_2_cq_3qubit_code" >
<span class="submit-label">Submit</span>
</button>
<div class="submission-feedback" id="submission_feedback_u3_2_cq_3qubit_code">
<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="u3_2_cq_3qubit_code-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="u3_2_cq_3qubit_code-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="u3_2_cq_3qubit_code-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.371.1x+2T2018+type@html+block@html_site_search_box2xx">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="html" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_site_search_box2xx" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.1x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = 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; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('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 go_to_search = function(){
get_search_module();
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 get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_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-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="VerticalStudentView" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="vertical" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@vertical+block@The_nine-qubit_quantum_error_correction_code" data-runtime-class="LmsRuntime" data-has-score="False">
<h2 class="hd hd-2 unit-title">The nine-qubit quantum error correction code</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3f">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="video" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3f" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">The nine-qubit quantum error correction code</h3>
<div
id="video_U3L3f"
class="video closed"
data-metadata='{"publishCompletionUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3f/handler/publish_completion", "duration": 0.0, "transcriptLanguage": "en", "ytTestTimeout": 1500, "prioritizeHls": false, "generalSpeed": 1.0, "sources": [], "captionDataDir": null, "autoAdvance": false, "poster": null, "autohideHtml5": false, "speed": null, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3f/handler/transcript/translation/__lang__", "recordedYoutubeIsAvailable": true, "completionEnabled": false, "end": 0.0, "ytMetadataEndpoint": "", "completionPercentage": 0.95, "savedVideoPosition": 0.0, "lmsRootURL": "https://openlearninglibrary.mit.edu", "saveStateEnabled": false, "start": 0.0, "streams": "1.00:qYjMJajNZWY", "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3f/handler/transcript/available_translations", "autoplay": false, "showCaptions": "true", "transcriptLanguages": {"en": "English"}, "saveStateUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3f/handler/xmodule_handler/save_user_state", "ytApiUrl": "https://www.youtube.com/iframe_api"}'
data-bumper-metadata='null'
data-autoadvance-enabled="False"
data-poster='null'
tabindex="-1"
>
<div class="focus_grabber first"></div>
<div class="tc-wrapper">
<div class="video-wrapper">
<span tabindex="0" class="spinner" aria-hidden="false" aria-label="Loading video player"></span>
<span tabindex="-1" class="btn-play fa fa-youtube-play fa-2x is-hidden" aria-hidden="true" aria-label="Play video"></span>
<div class="video-player-pre"></div>
<div class="video-player">
<div id="U3L3f"></div>
<h4 class="hd hd-4 video-error is-hidden">No playable video sources found.</h4>
<h4 class="hd hd-4 video-hls-error is-hidden">
Your browser does not support this video format. Try using a different browser.
</h4>
</div>
<div class="video-player-post"></div>
<div class="closed-captions"></div>
<div class="video-controls is-hidden">
<div>
<div class="vcr"><div class="vidtime">0:00 / 0:00</div></div>
<div class="secondary-controls"></div>
</div>
</div>
</div>
</div>
<div class="focus_grabber last"></div>
</div>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_site_search_box6x">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="html" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_site_search_box6x" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.1x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = 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; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('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 go_to_search = function(){
get_search_module();
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 get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_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-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="VerticalStudentView" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="vertical" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@vertical+block@Effect_of_single_qubit_rotation_errors_on_the_quantum_code" data-runtime-class="LmsRuntime" data-has-score="False">
<h2 class="hd hd-2 unit-title">Effect of single qubit rotation errors on the quantum code</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3g">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="video" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3g" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Effect of single qubit rotation errors on the quantum code</h3>
<div
id="video_U3L3g"
class="video closed"
data-metadata='{"publishCompletionUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3g/handler/publish_completion", "duration": 0.0, "transcriptLanguage": "en", "ytTestTimeout": 1500, "prioritizeHls": false, "generalSpeed": 1.0, "sources": [], "captionDataDir": null, "autoAdvance": false, "poster": null, "autohideHtml5": false, "speed": null, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3g/handler/transcript/translation/__lang__", "recordedYoutubeIsAvailable": true, "completionEnabled": false, "end": 0.0, "ytMetadataEndpoint": "", "completionPercentage": 0.95, "savedVideoPosition": 0.0, "lmsRootURL": "https://openlearninglibrary.mit.edu", "saveStateEnabled": false, "start": 0.0, "streams": "1.00:KJza0oSABcs", "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3g/handler/transcript/available_translations", "autoplay": false, "showCaptions": "true", "transcriptLanguages": {"en": "English"}, "saveStateUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3g/handler/xmodule_handler/save_user_state", "ytApiUrl": "https://www.youtube.com/iframe_api"}'
data-bumper-metadata='null'
data-autoadvance-enabled="False"
data-poster='null'
tabindex="-1"
>
<div class="focus_grabber first"></div>
<div class="tc-wrapper">
<div class="video-wrapper">
<span tabindex="0" class="spinner" aria-hidden="false" aria-label="Loading video player"></span>
<span tabindex="-1" class="btn-play fa fa-youtube-play fa-2x is-hidden" aria-hidden="true" aria-label="Play video"></span>
<div class="video-player-pre"></div>
<div class="video-player">
<div id="U3L3g"></div>
<h4 class="hd hd-4 video-error is-hidden">No playable video sources found.</h4>
<h4 class="hd hd-4 video-hls-error is-hidden">
Your browser does not support this video format. Try using a different browser.
</h4>
</div>
<div class="video-player-post"></div>
<div class="closed-captions"></div>
<div class="video-controls is-hidden">
<div>
<div class="vcr"><div class="vidtime">0:00 / 0:00</div></div>
<div class="secondary-controls"></div>
</div>
</div>
</div>
</div>
<div class="focus_grabber last"></div>
</div>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_site_search_box7x">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="False" data-init="XBlockToXModuleShim" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="html" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_site_search_box7x" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.1x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = 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; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('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 go_to_search = function(){
get_search_module();
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 get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_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-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="VerticalStudentView" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="vertical" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@vertical+block@Effect_of_depolarizing_channel_on_the_quantum_code" data-runtime-class="LmsRuntime" data-has-score="False">
<h2 class="hd hd-2 unit-title">Effect of depolarizing channel on the quantum code</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3h">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="video" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3h" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Effect of depolarizing channel on the quantum code</h3>
<div
id="video_U3L3h"
class="video closed"
data-metadata='{"publishCompletionUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3h/handler/publish_completion", "duration": 0.0, "transcriptLanguage": "en", "ytTestTimeout": 1500, "prioritizeHls": false, "generalSpeed": 1.0, "sources": [], "captionDataDir": null, "autoAdvance": false, "poster": null, "autohideHtml5": false, "speed": null, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3h/handler/transcript/translation/__lang__", "recordedYoutubeIsAvailable": true, "completionEnabled": false, "end": 0.0, "ytMetadataEndpoint": "", "completionPercentage": 0.95, "savedVideoPosition": 0.0, "lmsRootURL": "https://openlearninglibrary.mit.edu", "saveStateEnabled": false, "start": 0.0, "streams": "1.00:8m7nEaORp_M", "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3h/handler/transcript/available_translations", "autoplay": false, "showCaptions": "true", "transcriptLanguages": {"en": "English"}, "saveStateUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L3h/handler/xmodule_handler/save_user_state", "ytApiUrl": "https://www.youtube.com/iframe_api"}'
data-bumper-metadata='null'
data-autoadvance-enabled="False"
data-poster='null'
tabindex="-1"
>
<div class="focus_grabber first"></div>
<div class="tc-wrapper">
<div class="video-wrapper">
<span tabindex="0" class="spinner" aria-hidden="false" aria-label="Loading video player"></span>
<span tabindex="-1" class="btn-play fa fa-youtube-play fa-2x is-hidden" aria-hidden="true" aria-label="Play video"></span>
<div class="video-player-pre"></div>
<div class="video-player">
<div id="U3L3h"></div>
<h4 class="hd hd-4 video-error is-hidden">No playable video sources found.</h4>
<h4 class="hd hd-4 video-hls-error is-hidden">
Your browser does not support this video format. Try using a different browser.
</h4>
</div>
<div class="video-player-post"></div>
<div class="closed-captions"></div>
<div class="video-controls is-hidden">
<div>
<div class="vcr"><div class="vidtime">0:00 / 0:00</div></div>
<div class="secondary-controls"></div>
</div>
</div>
</div>
</div>
<div class="focus_grabber last"></div>
</div>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_site_search_box8x">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="html" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_site_search_box8x" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.1x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = 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; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('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 go_to_search = function(){
get_search_module();
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 get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_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-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="VerticalStudentView" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="vertical" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@vertical+block@CQ_The_nine-qubit_quantum_error_correction_code" data-runtime-class="LmsRuntime" data-has-score="False">
<h2 class="hd hd-2 unit-title">CQ: The nine-qubit quantum error correction code</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.1x+2T2018+type@problem+block@u3_2_cq_9qubit_code">
<div class="xblock xblock-public_view xblock-public_view-problem xmodule_display xmodule_ProblemBlock" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="problem" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@problem+block@u3_2_cq_9qubit_code" data-runtime-class="LmsRuntime" data-has-score="True">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Problem"}
</script>
<div id="problem_u3_2_cq_9qubit_code" class="problems-wrapper" role="group"
aria-labelledby="u3_2_cq_9qubit_code-problem-title"
data-problem-id="block-v1:MITx+8.371.1x+2T2018+type@problem+block@u3_2_cq_9qubit_code" data-url="/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@problem+block@u3_2_cq_9qubit_code/handler/xmodule_handler"
data-problem-score="0"
data-problem-total-possible="1"
data-attempts-used="0"
data-content="
<h3 class="hd hd-3 problem-header" id="u3_2_cq_9qubit_code-problem-title" aria-describedby="block-v1:MITx+8.371.1x+2T2018+type@problem+block@u3_2_cq_9qubit_code-problem-progress" tabindex="-1">
The nine-qubit quantum error correction code
</h3>
<div class="problem-progress" id="block-v1:MITx+8.371.1x+2T2018+type@problem+block@u3_2_cq_9qubit_code-problem-progress"></div>
<div class="problem">
<div>
<p>
This is a concept question, provided to check your understanding of the previous video clip. </p>
<p>
Which of the following statements about the the <a href="https://en.wikipedia.org/wiki/Shor_code" target="_blank">nine-qubit Shor code</a> are correct? Check all that apply: </p>
<p>
<div class="wrapper-problem-response" tabindex="-1" aria-label="Question 1" role="group"><div class="choicegroup capa_inputtype" id="inputtype_u3_2_cq_9qubit_code_2_1">
<fieldset aria-describedby="status_u3_2_cq_9qubit_code_2_1">
<div class="field">
<input type="checkbox" name="input_u3_2_cq_9qubit_code_2_1[]" id="input_u3_2_cq_9qubit_code_2_1_choice_0" class="field-input input-checkbox" value="choice_0"/><label id="u3_2_cq_9qubit_code_2_1-choice_0-label" for="input_u3_2_cq_9qubit_code_2_1_choice_0" class="response-label field-label label-inline" aria-describedby="status_u3_2_cq_9qubit_code_2_1">
<text>The nine-qubit code encodes one qubit and corrects both bit- and phase-flip errors on any single qubit.</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_u3_2_cq_9qubit_code_2_1[]" id="input_u3_2_cq_9qubit_code_2_1_choice_1" class="field-input input-checkbox" value="choice_1"/><label id="u3_2_cq_9qubit_code_2_1-choice_1-label" for="input_u3_2_cq_9qubit_code_2_1_choice_1" class="response-label field-label label-inline" aria-describedby="status_u3_2_cq_9qubit_code_2_1">
<text>The nine-qubit code is a concatenation of two three-qubit codes.</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_u3_2_cq_9qubit_code_2_1[]" id="input_u3_2_cq_9qubit_code_2_1_choice_2" class="field-input input-checkbox" value="choice_2"/><label id="u3_2_cq_9qubit_code_2_1-choice_2-label" for="input_u3_2_cq_9qubit_code_2_1_choice_2" class="response-label field-label label-inline" aria-describedby="status_u3_2_cq_9qubit_code_2_1">
<text>The nine-qubit code corrects bit- and phase-flip errors, but not both.</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_u3_2_cq_9qubit_code_2_1[]" id="input_u3_2_cq_9qubit_code_2_1_choice_3" class="field-input input-checkbox" value="choice_3"/><label id="u3_2_cq_9qubit_code_2_1-choice_3-label" for="input_u3_2_cq_9qubit_code_2_1_choice_3" class="response-label field-label label-inline" aria-describedby="status_u3_2_cq_9qubit_code_2_1">
<text>The nine-qubit code corrects bit- and phase-flip errors, but not arbitrary single qubit rotations.</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_u3_2_cq_9qubit_code_2_1[]" id="input_u3_2_cq_9qubit_code_2_1_choice_4" class="field-input input-checkbox" value="choice_4"/><label id="u3_2_cq_9qubit_code_2_1-choice_4-label" for="input_u3_2_cq_9qubit_code_2_1_choice_4" class="response-label field-label label-inline" aria-describedby="status_u3_2_cq_9qubit_code_2_1">
<text>The nine-qubit code corrects a single qubit depolarizing channel error.</text>
</label>
</div>
<span id="answer_u3_2_cq_9qubit_code_2_1"/>
</fieldset>
<div class="indicator-container">
<span class="status unanswered" id="status_u3_2_cq_9qubit_code_2_1" data-tooltip="Not yet answered.">
<span class="sr">unanswered</span><span class="status-icon" aria-hidden="true"/>
</span>
</div>
</div></div>
</p>
</div>
<div class="action">
<input type="hidden" name="problem_id" value="The nine-qubit quantum error correction code" />
<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_u3_2_cq_9qubit_code" >
<span class="submit-label">Submit</span>
</button>
<div class="submission-feedback" id="submission_feedback_u3_2_cq_9qubit_code">
<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="u3_2_cq_9qubit_code-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="u3_2_cq_9qubit_code-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="u3_2_cq_9qubit_code-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.371.1x+2T2018+type@html+block@html_site_search_box3x">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="html" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_site_search_box3x" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.1x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = 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; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('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 go_to_search = function(){
get_search_module();
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 get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_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-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="VerticalStudentView" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="vertical" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@vertical+block@Review_classical_and_quantum_coding" data-runtime-class="LmsRuntime" data-has-score="False">
<h2 class="hd hd-2 unit-title">Review: classical and quantum coding</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L4a">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="video" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L4a" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Review: classical and quantum coding</h3>
<div
id="video_U3L4a"
class="video closed"
data-metadata='{"publishCompletionUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L4a/handler/publish_completion", "duration": 0.0, "transcriptLanguage": "en", "ytTestTimeout": 1500, "prioritizeHls": false, "generalSpeed": 1.0, "sources": [], "captionDataDir": null, "autoAdvance": false, "poster": null, "autohideHtml5": false, "speed": null, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L4a/handler/transcript/translation/__lang__", "recordedYoutubeIsAvailable": true, "completionEnabled": false, "end": 0.0, "ytMetadataEndpoint": "", "completionPercentage": 0.95, "savedVideoPosition": 0.0, "lmsRootURL": "https://openlearninglibrary.mit.edu", "saveStateEnabled": false, "start": 0.0, "streams": "1.00:6_ivcogalCg", "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L4a/handler/transcript/available_translations", "autoplay": false, "showCaptions": "true", "transcriptLanguages": {"en": "English"}, "saveStateUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L4a/handler/xmodule_handler/save_user_state", "ytApiUrl": "https://www.youtube.com/iframe_api"}'
data-bumper-metadata='null'
data-autoadvance-enabled="False"
data-poster='null'
tabindex="-1"
>
<div class="focus_grabber first"></div>
<div class="tc-wrapper">
<div class="video-wrapper">
<span tabindex="0" class="spinner" aria-hidden="false" aria-label="Loading video player"></span>
<span tabindex="-1" class="btn-play fa fa-youtube-play fa-2x is-hidden" aria-hidden="true" aria-label="Play video"></span>
<div class="video-player-pre"></div>
<div class="video-player">
<div id="U3L4a"></div>
<h4 class="hd hd-4 video-error is-hidden">No playable video sources found.</h4>
<h4 class="hd hd-4 video-hls-error is-hidden">
Your browser does not support this video format. Try using a different browser.
</h4>
</div>
<div class="video-player-post"></div>
<div class="closed-captions"></div>
<div class="video-controls is-hidden">
<div>
<div class="vcr"><div class="vidtime">0:00 / 0:00</div></div>
<div class="secondary-controls"></div>
</div>
</div>
</div>
</div>
<div class="focus_grabber last"></div>
</div>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_site_search_box1xxxx">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="html" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_site_search_box1xxxx" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.1x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = 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; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('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 go_to_search = function(){
get_search_module();
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 get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_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-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="VerticalStudentView" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="vertical" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@vertical+block@Three_conceptual_challenges_faced_by_quantum_error_correction" data-runtime-class="LmsRuntime" data-has-score="False">
<h2 class="hd hd-2 unit-title">Three conceptual challenges faced by quantum error correction</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L4b">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="video" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L4b" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Three conceptual challenges faced by quantum error correction</h3>
<div
id="video_U3L4b"
class="video closed"
data-metadata='{"publishCompletionUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L4b/handler/publish_completion", "duration": 0.0, "transcriptLanguage": "en", "ytTestTimeout": 1500, "prioritizeHls": false, "generalSpeed": 1.0, "sources": [], "captionDataDir": null, "autoAdvance": false, "poster": null, "autohideHtml5": false, "speed": null, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L4b/handler/transcript/translation/__lang__", "recordedYoutubeIsAvailable": true, "completionEnabled": false, "end": 0.0, "ytMetadataEndpoint": "", "completionPercentage": 0.95, "savedVideoPosition": 0.0, "lmsRootURL": "https://openlearninglibrary.mit.edu", "saveStateEnabled": false, "start": 0.0, "streams": "1.00:0ophsJlmFdg", "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L4b/handler/transcript/available_translations", "autoplay": false, "showCaptions": "true", "transcriptLanguages": {"en": "English"}, "saveStateUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L4b/handler/xmodule_handler/save_user_state", "ytApiUrl": "https://www.youtube.com/iframe_api"}'
data-bumper-metadata='null'
data-autoadvance-enabled="False"
data-poster='null'
tabindex="-1"
>
<div class="focus_grabber first"></div>
<div class="tc-wrapper">
<div class="video-wrapper">
<span tabindex="0" class="spinner" aria-hidden="false" aria-label="Loading video player"></span>
<span tabindex="-1" class="btn-play fa fa-youtube-play fa-2x is-hidden" aria-hidden="true" aria-label="Play video"></span>
<div class="video-player-pre"></div>
<div class="video-player">
<div id="U3L4b"></div>
<h4 class="hd hd-4 video-error is-hidden">No playable video sources found.</h4>
<h4 class="hd hd-4 video-hls-error is-hidden">
Your browser does not support this video format. Try using a different browser.
</h4>
</div>
<div class="video-player-post"></div>
<div class="closed-captions"></div>
<div class="video-controls is-hidden">
<div>
<div class="vcr"><div class="vidtime">0:00 / 0:00</div></div>
<div class="secondary-controls"></div>
</div>
</div>
</div>
</div>
<div class="focus_grabber last"></div>
</div>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_site_search_box2xxx">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="html" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_site_search_box2xxx" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.1x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = 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; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('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 go_to_search = function(){
get_search_module();
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 get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_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-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="VerticalStudentView" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="vertical" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@vertical+block@Quantum_codes_-_definition_and_review" data-runtime-class="LmsRuntime" data-has-score="False">
<h2 class="hd hd-2 unit-title">Quantum codes - definition and review</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L4c">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="video" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L4c" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Quantum codes - definition and review</h3>
<div
id="video_U3L4c"
class="video closed"
data-metadata='{"publishCompletionUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L4c/handler/publish_completion", "duration": 0.0, "transcriptLanguage": "en", "ytTestTimeout": 1500, "prioritizeHls": false, "generalSpeed": 1.0, "sources": [], "captionDataDir": null, "autoAdvance": false, "poster": null, "autohideHtml5": false, "speed": null, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L4c/handler/transcript/translation/__lang__", "recordedYoutubeIsAvailable": true, "completionEnabled": false, "end": 0.0, "ytMetadataEndpoint": "", "completionPercentage": 0.95, "savedVideoPosition": 0.0, "lmsRootURL": "https://openlearninglibrary.mit.edu", "saveStateEnabled": false, "start": 0.0, "streams": "1.00:1KY2A5IQLao", "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L4c/handler/transcript/available_translations", "autoplay": false, "showCaptions": "true", "transcriptLanguages": {"en": "English"}, "saveStateUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L4c/handler/xmodule_handler/save_user_state", "ytApiUrl": "https://www.youtube.com/iframe_api"}'
data-bumper-metadata='null'
data-autoadvance-enabled="False"
data-poster='null'
tabindex="-1"
>
<div class="focus_grabber first"></div>
<div class="tc-wrapper">
<div class="video-wrapper">
<span tabindex="0" class="spinner" aria-hidden="false" aria-label="Loading video player"></span>
<span tabindex="-1" class="btn-play fa fa-youtube-play fa-2x is-hidden" aria-hidden="true" aria-label="Play video"></span>
<div class="video-player-pre"></div>
<div class="video-player">
<div id="U3L4c"></div>
<h4 class="hd hd-4 video-error is-hidden">No playable video sources found.</h4>
<h4 class="hd hd-4 video-hls-error is-hidden">
Your browser does not support this video format. Try using a different browser.
</h4>
</div>
<div class="video-player-post"></div>
<div class="closed-captions"></div>
<div class="video-controls is-hidden">
<div>
<div class="vcr"><div class="vidtime">0:00 / 0:00</div></div>
<div class="secondary-controls"></div>
</div>
</div>
</div>
</div>
<div class="focus_grabber last"></div>
</div>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_site_search_box3xx">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="html" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_site_search_box3xx" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.1x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = 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; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('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 go_to_search = function(){
get_search_module();
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 get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_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-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="VerticalStudentView" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="vertical" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@vertical+block@CQ_Quantum_versus_classical_error_correction" data-runtime-class="LmsRuntime" data-has-score="False">
<h2 class="hd hd-2 unit-title">CQ: Quantum versus classical error correction</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.1x+2T2018+type@problem+block@u3_4_cq_qec_vs_cl">
<div class="xblock xblock-public_view xblock-public_view-problem xmodule_display xmodule_ProblemBlock" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="problem" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@problem+block@u3_4_cq_qec_vs_cl" data-runtime-class="LmsRuntime" data-has-score="True">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Problem"}
</script>
<div id="problem_u3_4_cq_qec_vs_cl" class="problems-wrapper" role="group"
aria-labelledby="u3_4_cq_qec_vs_cl-problem-title"
data-problem-id="block-v1:MITx+8.371.1x+2T2018+type@problem+block@u3_4_cq_qec_vs_cl" data-url="/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@problem+block@u3_4_cq_qec_vs_cl/handler/xmodule_handler"
data-problem-score="0"
data-problem-total-possible="1"
data-attempts-used="0"
data-content="
<h3 class="hd hd-3 problem-header" id="u3_4_cq_qec_vs_cl-problem-title" aria-describedby="block-v1:MITx+8.371.1x+2T2018+type@problem+block@u3_4_cq_qec_vs_cl-problem-progress" tabindex="-1">
Quantum versus classical error correction
</h3>
<div class="problem-progress" id="block-v1:MITx+8.371.1x+2T2018+type@problem+block@u3_4_cq_qec_vs_cl-problem-progress"></div>
<div class="problem">
<div>
<p>
This is a concept question, provided to check your understanding of the previous video clip. </p>
<p>
Prof. Chuang described in lecture three conceptual challenges faced by <a href="https://en.wikipedia.org/wiki/Quantum_error_correction" target="_blank">quantum error correction</a>. Which of the following statements comparing classical and quantum error correction, are correct? Check all that apply: </p>
<p>
<div class="wrapper-problem-response" tabindex="-1" aria-label="Question 1" role="group"><div class="choicegroup capa_inputtype" id="inputtype_u3_4_cq_qec_vs_cl_2_1">
<fieldset aria-describedby="status_u3_4_cq_qec_vs_cl_2_1">
<div class="field">
<input type="checkbox" name="input_u3_4_cq_qec_vs_cl_2_1[]" id="input_u3_4_cq_qec_vs_cl_2_1_choice_0" class="field-input input-checkbox" value="choice_0"/><label id="u3_4_cq_qec_vs_cl_2_1-choice_0-label" for="input_u3_4_cq_qec_vs_cl_2_1_choice_0" class="response-label field-label label-inline" aria-describedby="status_u3_4_cq_qec_vs_cl_2_1">
<text>Quantum codes use repetition as the essential idea of error correction, encoding [mathjaxinline]|\psi \rangle[/mathjaxinline] as [mathjaxinline]|\psi \rangle |\psi \rangle |\psi \rangle[/mathjaxinline], just as is done with classical codes.</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_u3_4_cq_qec_vs_cl_2_1[]" id="input_u3_4_cq_qec_vs_cl_2_1_choice_1" class="field-input input-checkbox" value="choice_1"/><label id="u3_4_cq_qec_vs_cl_2_1-choice_1-label" for="input_u3_4_cq_qec_vs_cl_2_1_choice_1" class="response-label field-label label-inline" aria-describedby="status_u3_4_cq_qec_vs_cl_2_1">
<text>Any [mathjaxinline][n,k,d][/mathjaxinline] classical code can be used to construct a quantum [mathjaxinline][[n,k]][/mathjaxinline] code which corrects [mathjaxinline]d[/mathjaxinline] single qubit errors.</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_u3_4_cq_qec_vs_cl_2_1[]" id="input_u3_4_cq_qec_vs_cl_2_1_choice_2" class="field-input input-checkbox" value="choice_2"/><label id="u3_4_cq_qec_vs_cl_2_1-choice_2-label" for="input_u3_4_cq_qec_vs_cl_2_1_choice_2" class="response-label field-label label-inline" aria-describedby="status_u3_4_cq_qec_vs_cl_2_1">
<text>Quantum error correction codes only correct bit and phase flips, and not continuous rotation errors.</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_u3_4_cq_qec_vs_cl_2_1[]" id="input_u3_4_cq_qec_vs_cl_2_1_choice_3" class="field-input input-checkbox" value="choice_3"/><label id="u3_4_cq_qec_vs_cl_2_1-choice_3-label" for="input_u3_4_cq_qec_vs_cl_2_1_choice_3" class="response-label field-label label-inline" aria-describedby="status_u3_4_cq_qec_vs_cl_2_1">
<text>Quantum parity check measurements measure the error without gaining information about the encoded quantum state.</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_u3_4_cq_qec_vs_cl_2_1[]" id="input_u3_4_cq_qec_vs_cl_2_1_choice_4" class="field-input input-checkbox" value="choice_4"/><label id="u3_4_cq_qec_vs_cl_2_1-choice_4-label" for="input_u3_4_cq_qec_vs_cl_2_1_choice_4" class="response-label field-label label-inline" aria-describedby="status_u3_4_cq_qec_vs_cl_2_1">
<text>The three-qubit bit-flip code states [mathjaxinline]a|000\rangle +b|111\rangle[/mathjaxinline] are analogous to the classical repetition code, and are not entangled states.</text>
</label>
</div>
<span id="answer_u3_4_cq_qec_vs_cl_2_1"/>
</fieldset>
<div class="indicator-container">
<span class="status unanswered" id="status_u3_4_cq_qec_vs_cl_2_1" data-tooltip="Not yet answered.">
<span class="sr">unanswered</span><span class="status-icon" aria-hidden="true"/>
</span>
</div>
</div></div>
</p>
</div>
<div class="action">
<input type="hidden" name="problem_id" value="Quantum versus classical error correction" />
<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_u3_4_cq_qec_vs_cl" >
<span class="submit-label">Submit</span>
</button>
<div class="submission-feedback" id="submission_feedback_u3_4_cq_qec_vs_cl">
<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="u3_4_cq_qec_vs_cl-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="u3_4_cq_qec_vs_cl-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="u3_4_cq_qec_vs_cl-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.371.1x+2T2018+type@html+block@html_site_search_box1xxxxx">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="html" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_site_search_box1xxxxx" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.1x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = 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; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('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 go_to_search = function(){
get_search_module();
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 get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_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-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="VerticalStudentView" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="vertical" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@vertical+block@Operator_measurement" data-runtime-class="LmsRuntime" data-has-score="False">
<h2 class="hd hd-2 unit-title">Operator measurement</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L4d">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="video" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L4d" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Operator measurement</h3>
<div
id="video_U3L4d"
class="video closed"
data-metadata='{"publishCompletionUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L4d/handler/publish_completion", "duration": 0.0, "transcriptLanguage": "en", "ytTestTimeout": 1500, "prioritizeHls": false, "generalSpeed": 1.0, "sources": [], "captionDataDir": null, "autoAdvance": false, "poster": null, "autohideHtml5": false, "speed": null, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L4d/handler/transcript/translation/__lang__", "recordedYoutubeIsAvailable": true, "completionEnabled": false, "end": 0.0, "ytMetadataEndpoint": "", "completionPercentage": 0.95, "savedVideoPosition": 0.0, "lmsRootURL": "https://openlearninglibrary.mit.edu", "saveStateEnabled": false, "start": 0.0, "streams": "1.00:8W9mNV1qqZw", "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L4d/handler/transcript/available_translations", "autoplay": false, "showCaptions": "true", "transcriptLanguages": {"en": "English"}, "saveStateUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L4d/handler/xmodule_handler/save_user_state", "ytApiUrl": "https://www.youtube.com/iframe_api"}'
data-bumper-metadata='null'
data-autoadvance-enabled="False"
data-poster='null'
tabindex="-1"
>
<div class="focus_grabber first"></div>
<div class="tc-wrapper">
<div class="video-wrapper">
<span tabindex="0" class="spinner" aria-hidden="false" aria-label="Loading video player"></span>
<span tabindex="-1" class="btn-play fa fa-youtube-play fa-2x is-hidden" aria-hidden="true" aria-label="Play video"></span>
<div class="video-player-pre"></div>
<div class="video-player">
<div id="U3L4d"></div>
<h4 class="hd hd-4 video-error is-hidden">No playable video sources found.</h4>
<h4 class="hd hd-4 video-hls-error is-hidden">
Your browser does not support this video format. Try using a different browser.
</h4>
</div>
<div class="video-player-post"></div>
<div class="closed-captions"></div>
<div class="video-controls is-hidden">
<div>
<div class="vcr"><div class="vidtime">0:00 / 0:00</div></div>
<div class="secondary-controls"></div>
</div>
</div>
</div>
</div>
<div class="focus_grabber last"></div>
</div>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_site_search_box4x">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="html" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_site_search_box4x" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.1x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = 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; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('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 go_to_search = function(){
get_search_module();
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 get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_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-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="VerticalStudentView" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="vertical" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@vertical+block@Syndrome_measurement_and_recovery_operators" data-runtime-class="LmsRuntime" data-has-score="False">
<h2 class="hd hd-2 unit-title">Syndrome measurement and recovery operators</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L4e">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="video" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L4e" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Syndrome measurement and recovery operators</h3>
<div
id="video_U3L4e"
class="video closed"
data-metadata='{"publishCompletionUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L4e/handler/publish_completion", "duration": 0.0, "transcriptLanguage": "en", "ytTestTimeout": 1500, "prioritizeHls": false, "generalSpeed": 1.0, "sources": [], "captionDataDir": null, "autoAdvance": false, "poster": null, "autohideHtml5": false, "speed": null, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L4e/handler/transcript/translation/__lang__", "recordedYoutubeIsAvailable": true, "completionEnabled": false, "end": 0.0, "ytMetadataEndpoint": "", "completionPercentage": 0.95, "savedVideoPosition": 0.0, "lmsRootURL": "https://openlearninglibrary.mit.edu", "saveStateEnabled": false, "start": 0.0, "streams": "1.00:G79mmRw1g8A", "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L4e/handler/transcript/available_translations", "autoplay": false, "showCaptions": "true", "transcriptLanguages": {"en": "English"}, "saveStateUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L4e/handler/xmodule_handler/save_user_state", "ytApiUrl": "https://www.youtube.com/iframe_api"}'
data-bumper-metadata='null'
data-autoadvance-enabled="False"
data-poster='null'
tabindex="-1"
>
<div class="focus_grabber first"></div>
<div class="tc-wrapper">
<div class="video-wrapper">
<span tabindex="0" class="spinner" aria-hidden="false" aria-label="Loading video player"></span>
<span tabindex="-1" class="btn-play fa fa-youtube-play fa-2x is-hidden" aria-hidden="true" aria-label="Play video"></span>
<div class="video-player-pre"></div>
<div class="video-player">
<div id="U3L4e"></div>
<h4 class="hd hd-4 video-error is-hidden">No playable video sources found.</h4>
<h4 class="hd hd-4 video-hls-error is-hidden">
Your browser does not support this video format. Try using a different browser.
</h4>
</div>
<div class="video-player-post"></div>
<div class="closed-captions"></div>
<div class="video-controls is-hidden">
<div>
<div class="vcr"><div class="vidtime">0:00 / 0:00</div></div>
<div class="secondary-controls"></div>
</div>
</div>
</div>
</div>
<div class="focus_grabber last"></div>
</div>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_site_search_box5xx">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="html" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_site_search_box5xx" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.1x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = 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; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('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 go_to_search = function(){
get_search_module();
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 get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_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-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="VerticalStudentView" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="vertical" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@vertical+block@CQ_Syndrome_measurement_for_the_three-qubit_bit-flip_code" data-runtime-class="LmsRuntime" data-has-score="False">
<h2 class="hd hd-2 unit-title">CQ: Syndrome measurement for the three-qubit bit-flip code</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.1x+2T2018+type@problem+block@u3_4_cq_bf_syndrome">
<div class="xblock xblock-public_view xblock-public_view-problem xmodule_display xmodule_ProblemBlock" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="problem" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@problem+block@u3_4_cq_bf_syndrome" data-runtime-class="LmsRuntime" data-has-score="True">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Problem"}
</script>
<div id="problem_u3_4_cq_bf_syndrome" class="problems-wrapper" role="group"
aria-labelledby="u3_4_cq_bf_syndrome-problem-title"
data-problem-id="block-v1:MITx+8.371.1x+2T2018+type@problem+block@u3_4_cq_bf_syndrome" data-url="/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@problem+block@u3_4_cq_bf_syndrome/handler/xmodule_handler"
data-problem-score="0"
data-problem-total-possible="1"
data-attempts-used="0"
data-content="
<h3 class="hd hd-3 problem-header" id="u3_4_cq_bf_syndrome-problem-title" aria-describedby="block-v1:MITx+8.371.1x+2T2018+type@problem+block@u3_4_cq_bf_syndrome-problem-progress" tabindex="-1">
Syndrome measurement for the three-qubit bit-flip code
</h3>
<div class="problem-progress" id="block-v1:MITx+8.371.1x+2T2018+type@problem+block@u3_4_cq_bf_syndrome-problem-progress"></div>
<div class="problem">
<div>
<p>
This is a concept question, provided to check your understanding of the previous video clip. </p>
<p>
Prof. Chuang described in lecture how syndrome measurement for the three-qubit bit-flip code can be done by measuring the operators [mathjaxinline]U_1 = ZZI[/mathjaxinline] and [mathjaxinline]U_2 = IZZ[/mathjaxinline]. Which of the following statements about this syndrome measurement are correct? Check all that apply: </p>
<p>
<div class="wrapper-problem-response" tabindex="-1" aria-label="Question 1" role="group"><div class="choicegroup capa_inputtype" id="inputtype_u3_4_cq_bf_syndrome_2_1">
<fieldset aria-describedby="status_u3_4_cq_bf_syndrome_2_1">
<div class="field">
<input type="checkbox" name="input_u3_4_cq_bf_syndrome_2_1[]" id="input_u3_4_cq_bf_syndrome_2_1_choice_0" class="field-input input-checkbox" value="choice_0"/><label id="u3_4_cq_bf_syndrome_2_1-choice_0-label" for="input_u3_4_cq_bf_syndrome_2_1_choice_0" class="response-label field-label label-inline" aria-describedby="status_u3_4_cq_bf_syndrome_2_1">
<text>Just as effective for syndrome measurement would be measuring the two operators [mathjaxinline]U'_1 = ZZI[/mathjaxinline] and [mathjaxinline]U'_2 = ZIZ[/mathjaxinline].</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_u3_4_cq_bf_syndrome_2_1[]" id="input_u3_4_cq_bf_syndrome_2_1_choice_1" class="field-input input-checkbox" value="choice_1"/><label id="u3_4_cq_bf_syndrome_2_1-choice_1-label" for="input_u3_4_cq_bf_syndrome_2_1_choice_1" class="response-label field-label label-inline" aria-describedby="status_u3_4_cq_bf_syndrome_2_1">
<text>Just as effective for syndrome measurement would be measuring the two operators [mathjaxinline]U'_1 = XXI[/mathjaxinline] and [mathjaxinline]U'_2 = IXX[/mathjaxinline].</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_u3_4_cq_bf_syndrome_2_1[]" id="input_u3_4_cq_bf_syndrome_2_1_choice_2" class="field-input input-checkbox" value="choice_2"/><label id="u3_4_cq_bf_syndrome_2_1-choice_2-label" for="input_u3_4_cq_bf_syndrome_2_1_choice_2" class="response-label field-label label-inline" aria-describedby="status_u3_4_cq_bf_syndrome_2_1">
<text>Just as effective for syndrome measurement would be measuring just one operator [mathjaxinline]U'_1 = ZZZ[/mathjaxinline].</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_u3_4_cq_bf_syndrome_2_1[]" id="input_u3_4_cq_bf_syndrome_2_1_choice_3" class="field-input input-checkbox" value="choice_3"/><label id="u3_4_cq_bf_syndrome_2_1-choice_3-label" for="input_u3_4_cq_bf_syndrome_2_1_choice_3" class="response-label field-label label-inline" aria-describedby="status_u3_4_cq_bf_syndrome_2_1">
<text>Just as effective for syndrome measurement would be measuring the two operators [mathjaxinline]U'_1 = ZZI[/mathjaxinline] and [mathjaxinline]U'_2 = ZZZ[/mathjaxinline].</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_u3_4_cq_bf_syndrome_2_1[]" id="input_u3_4_cq_bf_syndrome_2_1_choice_4" class="field-input input-checkbox" value="choice_4"/><label id="u3_4_cq_bf_syndrome_2_1-choice_4-label" for="input_u3_4_cq_bf_syndrome_2_1_choice_4" class="response-label field-label label-inline" aria-describedby="status_u3_4_cq_bf_syndrome_2_1">
<text>Measuring the three operators [mathjaxinline]U_1 = ZZI[/mathjaxinline], [mathjaxinline]U_2 = IZZ[/mathjaxinline], [mathjaxinline]U_3 = ZIZ[/mathjaxinline] would also provide functional, albeit redundant, syndrome measurement.</text>
</label>
</div>
<span id="answer_u3_4_cq_bf_syndrome_2_1"/>
</fieldset>
<div class="indicator-container">
<span class="status unanswered" id="status_u3_4_cq_bf_syndrome_2_1" data-tooltip="Not yet answered.">
<span class="sr">unanswered</span><span class="status-icon" aria-hidden="true"/>
</span>
</div>
</div></div>
</p>
</div>
<div class="action">
<input type="hidden" name="problem_id" value="Syndrome measurement for the three-qubit bit-flip code" />
<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_u3_4_cq_bf_syndrome" >
<span class="submit-label">Submit</span>
</button>
<div class="submission-feedback" id="submission_feedback_u3_4_cq_bf_syndrome">
<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="u3_4_cq_bf_syndrome-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="u3_4_cq_bf_syndrome-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="u3_4_cq_bf_syndrome-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.371.1x+2T2018+type@html+block@html_site_search_box2xxxx">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="html" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_site_search_box2xxxx" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.1x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = 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; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('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 go_to_search = function(){
get_search_module();
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 get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_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-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="VerticalStudentView" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="vertical" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@vertical+block@Syndrome_operators_-_phase_flip_code_and_Shor_9-qubit_code" data-runtime-class="LmsRuntime" data-has-score="False">
<h2 class="hd hd-2 unit-title">Syndrome operators - phase flip code and Shor 9-qubit code</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L4f">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="video" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L4f" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Syndrome operators - phase flip code and Shor 9-qubit code</h3>
<div
id="video_U3L4f"
class="video closed"
data-metadata='{"publishCompletionUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L4f/handler/publish_completion", "duration": 0.0, "transcriptLanguage": "en", "ytTestTimeout": 1500, "prioritizeHls": false, "generalSpeed": 1.0, "sources": [], "captionDataDir": null, "autoAdvance": false, "poster": null, "autohideHtml5": false, "speed": null, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L4f/handler/transcript/translation/__lang__", "recordedYoutubeIsAvailable": true, "completionEnabled": false, "end": 0.0, "ytMetadataEndpoint": "", "completionPercentage": 0.95, "savedVideoPosition": 0.0, "lmsRootURL": "https://openlearninglibrary.mit.edu", "saveStateEnabled": false, "start": 0.0, "streams": "1.00:YFJPYoG8aYQ", "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L4f/handler/transcript/available_translations", "autoplay": false, "showCaptions": "true", "transcriptLanguages": {"en": "English"}, "saveStateUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L4f/handler/xmodule_handler/save_user_state", "ytApiUrl": "https://www.youtube.com/iframe_api"}'
data-bumper-metadata='null'
data-autoadvance-enabled="False"
data-poster='null'
tabindex="-1"
>
<div class="focus_grabber first"></div>
<div class="tc-wrapper">
<div class="video-wrapper">
<span tabindex="0" class="spinner" aria-hidden="false" aria-label="Loading video player"></span>
<span tabindex="-1" class="btn-play fa fa-youtube-play fa-2x is-hidden" aria-hidden="true" aria-label="Play video"></span>
<div class="video-player-pre"></div>
<div class="video-player">
<div id="U3L4f"></div>
<h4 class="hd hd-4 video-error is-hidden">No playable video sources found.</h4>
<h4 class="hd hd-4 video-hls-error is-hidden">
Your browser does not support this video format. Try using a different browser.
</h4>
</div>
<div class="video-player-post"></div>
<div class="closed-captions"></div>
<div class="video-controls is-hidden">
<div>
<div class="vcr"><div class="vidtime">0:00 / 0:00</div></div>
<div class="secondary-controls"></div>
</div>
</div>
</div>
</div>
<div class="focus_grabber last"></div>
</div>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_site_search_box6xx">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="html" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_site_search_box6xx" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.1x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = 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; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('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 go_to_search = function(){
get_search_module();
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 get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_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-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="VerticalStudentView" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="vertical" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@vertical+block@Quantum_error_correction_criteria" data-runtime-class="LmsRuntime" data-has-score="False">
<h2 class="hd hd-2 unit-title">Quantum error correction criteria</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L4g">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="video" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L4g" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Quantum error correction criteria</h3>
<div
id="video_U3L4g"
class="video closed"
data-metadata='{"publishCompletionUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L4g/handler/publish_completion", "duration": 0.0, "transcriptLanguage": "en", "ytTestTimeout": 1500, "prioritizeHls": false, "generalSpeed": 1.0, "sources": [], "captionDataDir": null, "autoAdvance": false, "poster": null, "autohideHtml5": false, "speed": null, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L4g/handler/transcript/translation/__lang__", "recordedYoutubeIsAvailable": true, "completionEnabled": false, "end": 0.0, "ytMetadataEndpoint": "", "completionPercentage": 0.95, "savedVideoPosition": 0.0, "lmsRootURL": "https://openlearninglibrary.mit.edu", "saveStateEnabled": false, "start": 0.0, "streams": "1.00:oDu-ZAPiOzc", "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L4g/handler/transcript/available_translations", "autoplay": false, "showCaptions": "true", "transcriptLanguages": {"en": "English"}, "saveStateUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@U3L4g/handler/xmodule_handler/save_user_state", "ytApiUrl": "https://www.youtube.com/iframe_api"}'
data-bumper-metadata='null'
data-autoadvance-enabled="False"
data-poster='null'
tabindex="-1"
>
<div class="focus_grabber first"></div>
<div class="tc-wrapper">
<div class="video-wrapper">
<span tabindex="0" class="spinner" aria-hidden="false" aria-label="Loading video player"></span>
<span tabindex="-1" class="btn-play fa fa-youtube-play fa-2x is-hidden" aria-hidden="true" aria-label="Play video"></span>
<div class="video-player-pre"></div>
<div class="video-player">
<div id="U3L4g"></div>
<h4 class="hd hd-4 video-error is-hidden">No playable video sources found.</h4>
<h4 class="hd hd-4 video-hls-error is-hidden">
Your browser does not support this video format. Try using a different browser.
</h4>
</div>
<div class="video-player-post"></div>
<div class="closed-captions"></div>
<div class="video-controls is-hidden">
<div>
<div class="vcr"><div class="vidtime">0:00 / 0:00</div></div>
<div class="secondary-controls"></div>
</div>
</div>
</div>
</div>
<div class="focus_grabber last"></div>
</div>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_site_search_box7xx">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="html" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_site_search_box7xx" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.1x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = 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; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('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 go_to_search = function(){
get_search_module();
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 get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_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-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="VerticalStudentView" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="vertical" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@vertical+block@CQ_Ideas_behind_the_quantum_error_correction_criteria" data-runtime-class="LmsRuntime" data-has-score="False">
<h2 class="hd hd-2 unit-title">CQ: Ideas behind the quantum error correction criteria</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.1x+2T2018+type@problem+block@u3_4_cq_qecc">
<div class="xblock xblock-public_view xblock-public_view-problem xmodule_display xmodule_ProblemBlock" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="problem" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@problem+block@u3_4_cq_qecc" data-runtime-class="LmsRuntime" data-has-score="True">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Problem"}
</script>
<div id="problem_u3_4_cq_qecc" class="problems-wrapper" role="group"
aria-labelledby="u3_4_cq_qecc-problem-title"
data-problem-id="block-v1:MITx+8.371.1x+2T2018+type@problem+block@u3_4_cq_qecc" data-url="/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@problem+block@u3_4_cq_qecc/handler/xmodule_handler"
data-problem-score="0"
data-problem-total-possible="1"
data-attempts-used="0"
data-content="
<h3 class="hd hd-3 problem-header" id="u3_4_cq_qecc-problem-title" aria-describedby="block-v1:MITx+8.371.1x+2T2018+type@problem+block@u3_4_cq_qecc-problem-progress" tabindex="-1">
Ideas behind the quantum error correction criteria
</h3>
<div class="problem-progress" id="block-v1:MITx+8.371.1x+2T2018+type@problem+block@u3_4_cq_qecc-problem-progress"></div>
<div class="problem">
<div>
<p>
This is a concept question, provided to check your understanding of the previous video clip. </p>
<p>
The quantum error correction criteria, as described in lecture, place conditions on errors [mathjaxinline]\{ E_ k\}[/mathjaxinline] to be correctable for a quantum code [mathjaxinline]C[/mathjaxinline], defined by its codeword states [mathjaxinline]\{ |\psi _\ell \rangle \}[/mathjaxinline]. </p>
<p>
Which of the following statements about the quantum error correction criteria are correct? Check all that apply: </p>
<p>
<div class="wrapper-problem-response" tabindex="-1" aria-label="Question 1" role="group"><div class="choicegroup capa_inputtype" id="inputtype_u3_4_cq_qecc_2_1">
<fieldset aria-describedby="status_u3_4_cq_qecc_2_1">
<div class="field">
<input type="checkbox" name="input_u3_4_cq_qecc_2_1[]" id="input_u3_4_cq_qecc_2_1_choice_0" class="field-input input-checkbox" value="choice_0"/><label id="u3_4_cq_qecc_2_1-choice_0-label" for="input_u3_4_cq_qecc_2_1_choice_0" class="response-label field-label label-inline" aria-describedby="status_u3_4_cq_qecc_2_1">
<text>The orthogonality criterion is that [mathjaxinline]\langle \psi _\ell | E^\dagger _ j E_ k|\psi _\ell \rangle = 0[/mathjaxinline] for all [mathjaxinline]j\neq k[/mathjaxinline] and for all [mathjaxinline]\ell[/mathjaxinline].</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_u3_4_cq_qecc_2_1[]" id="input_u3_4_cq_qecc_2_1_choice_1" class="field-input input-checkbox" value="choice_1"/><label id="u3_4_cq_qecc_2_1-choice_1-label" for="input_u3_4_cq_qecc_2_1_choice_1" class="response-label field-label label-inline" aria-describedby="status_u3_4_cq_qecc_2_1">
<text>The orthogonality criterion is that [mathjaxinline]\langle \psi _\ell | E^\dagger _ j E_ k|\psi _\ell \rangle = 0[/mathjaxinline] for [mathjaxinline]j=k[/mathjaxinline] and for all [mathjaxinline]\ell[/mathjaxinline].</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_u3_4_cq_qecc_2_1[]" id="input_u3_4_cq_qecc_2_1_choice_2" class="field-input input-checkbox" value="choice_2"/><label id="u3_4_cq_qecc_2_1-choice_2-label" for="input_u3_4_cq_qecc_2_1_choice_2" class="response-label field-label label-inline" aria-describedby="status_u3_4_cq_qecc_2_1">
<text>The non-deformation criterion is that [mathjaxinline]\langle \psi _\ell | E^\dagger _ j E_ k|\psi _\ell \rangle = d_\ell[/mathjaxinline] for all [mathjaxinline]j[/mathjaxinline] and [mathjaxinline]k[/mathjaxinline].</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_u3_4_cq_qecc_2_1[]" id="input_u3_4_cq_qecc_2_1_choice_3" class="field-input input-checkbox" value="choice_3"/><label id="u3_4_cq_qecc_2_1-choice_3-label" for="input_u3_4_cq_qecc_2_1_choice_3" class="response-label field-label label-inline" aria-describedby="status_u3_4_cq_qecc_2_1">
<text>The non-deformation criterion is that [mathjaxinline]\langle \psi _\ell | E^\dagger _ j E_ k|\psi _\ell \rangle = 0[/mathjaxinline] for all [mathjaxinline]j[/mathjaxinline] and [mathjaxinline]k[/mathjaxinline].</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_u3_4_cq_qecc_2_1[]" id="input_u3_4_cq_qecc_2_1_choice_4" class="field-input input-checkbox" value="choice_4"/><label id="u3_4_cq_qecc_2_1-choice_4-label" for="input_u3_4_cq_qecc_2_1_choice_4" class="response-label field-label label-inline" aria-describedby="status_u3_4_cq_qecc_2_1">
<text>The non-deformation criterion is that [mathjaxinline]\langle \psi _\ell | E^\dagger _ j E_ k|\psi _\ell \rangle = d_ k[/mathjaxinline] for all [mathjaxinline]j=k[/mathjaxinline] and for all [mathjaxinline]\ell[/mathjaxinline].</text>
</label>
</div>
<span id="answer_u3_4_cq_qecc_2_1"/>
</fieldset>
<div class="indicator-container">
<span class="status unanswered" id="status_u3_4_cq_qecc_2_1" data-tooltip="Not yet answered.">
<span class="sr">unanswered</span><span class="status-icon" aria-hidden="true"/>
</span>
</div>
</div></div>
</p>
</div>
<div class="action">
<input type="hidden" name="problem_id" value="Ideas behind the quantum error correction criteria" />
<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_u3_4_cq_qecc" >
<span class="submit-label">Submit</span>
</button>
<div class="submission-feedback" id="submission_feedback_u3_4_cq_qecc">
<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="u3_4_cq_qecc-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="u3_4_cq_qecc-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="u3_4_cq_qecc-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.371.1x+2T2018+type@html+block@html_site_search_box3xxx">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-graded="True" data-init="XBlockToXModuleShim" data-request-token="84f18b68225911f0979116ffcd2b1d4d" data-runtime-version="1" data-block-type="html" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_site_search_box3xxx" data-runtime-class="LmsRuntime" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.1x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = 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; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('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 go_to_search = function(){
get_search_module();
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 get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_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