<div class="xblock xblock-public_view xblock-public_view-vertical" data-course-id="course-v1:MITx+8.371.2x+2T2018" data-runtime-class="LmsRuntime" data-init="VerticalStudentView" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@vertical+block@Complexity_and_hardness_-_lecture_introduction" data-has-score="False" data-runtime-version="1" data-block-type="vertical" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<h2 class="hd hd-2 unit-title">Complexity and hardness - lecture introduction</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13a">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-course-id="course-v1:MITx+8.371.2x+2T2018" data-runtime-class="LmsRuntime" data-init="XBlockToXModuleShim" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13a" data-has-score="False" data-runtime-version="1" data-block-type="video" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Complexity and hardness - lecture introduction</h3>
<div
id="video_M2L13a"
class="video closed"
data-metadata='{"ytTestTimeout": 1500, "autohideHtml5": false, "generalSpeed": 1.0, "sources": [], "end": 0.0, "saveStateUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13a/handler/xmodule_handler/save_user_state", "speed": null, "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13a/handler/transcript/available_translations", "completionEnabled": false, "transcriptLanguage": "en", "streams": "1.00:jHn2RGm-O74", "captionDataDir": null, "ytApiUrl": "https://www.youtube.com/iframe_api", "lmsRootURL": "https://openlearninglibrary.mit.edu", "showCaptions": "true", "ytMetadataEndpoint": "", "autoplay": false, "recordedYoutubeIsAvailable": true, "savedVideoPosition": 0.0, "transcriptLanguages": {"en": "English"}, "poster": null, "autoAdvance": false, "prioritizeHls": false, "start": 0.0, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13a/handler/transcript/translation/__lang__", "completionPercentage": 0.95, "duration": 0.0, "saveStateEnabled": false, "publishCompletionUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13a/handler/publish_completion"}'
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="M2L13a"></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.2x+2T2018+type@html+block@html_site_search_box1">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:MITx+8.371.2x+2T2018" data-runtime-class="LmsRuntime" data-init="XBlockToXModuleShim" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@html+block@html_site_search_box1" data-has-score="False" data-runtime-version="1" data-block-type="html" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.2x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.2x+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.2x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.2x+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.2x+2T2018" data-runtime-class="LmsRuntime" data-init="VerticalStudentView" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@vertical+block@Quantum_gate_compiling_-_the_problem" data-has-score="False" data-runtime-version="1" data-block-type="vertical" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<h2 class="hd hd-2 unit-title">Quantum gate compiling - the problem</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13b">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-course-id="course-v1:MITx+8.371.2x+2T2018" data-runtime-class="LmsRuntime" data-init="XBlockToXModuleShim" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13b" data-has-score="False" data-runtime-version="1" data-block-type="video" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Quantum gate compiling - the problem</h3>
<div
id="video_M2L13b"
class="video closed"
data-metadata='{"ytTestTimeout": 1500, "autohideHtml5": false, "generalSpeed": 1.0, "sources": [], "end": 0.0, "saveStateUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13b/handler/xmodule_handler/save_user_state", "speed": null, "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13b/handler/transcript/available_translations", "completionEnabled": false, "transcriptLanguage": "en", "streams": "1.00:XbgCJFZBKz0", "captionDataDir": null, "ytApiUrl": "https://www.youtube.com/iframe_api", "lmsRootURL": "https://openlearninglibrary.mit.edu", "showCaptions": "true", "ytMetadataEndpoint": "", "autoplay": false, "recordedYoutubeIsAvailable": true, "savedVideoPosition": 0.0, "transcriptLanguages": {"en": "English"}, "poster": null, "autoAdvance": false, "prioritizeHls": false, "start": 0.0, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13b/handler/transcript/translation/__lang__", "completionPercentage": 0.95, "duration": 0.0, "saveStateEnabled": false, "publishCompletionUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13b/handler/publish_completion"}'
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="M2L13b"></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.2x+2T2018+type@html+block@html_site_search_box2">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:MITx+8.371.2x+2T2018" data-runtime-class="LmsRuntime" data-init="XBlockToXModuleShim" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@html+block@html_site_search_box2" data-has-score="False" data-runtime-version="1" data-block-type="html" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.2x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.2x+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.2x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.2x+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.2x+2T2018" data-runtime-class="LmsRuntime" data-init="VerticalStudentView" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@vertical+block@Quantum_gate_compiling_-_Solovay-Kitaev_theorem" data-has-score="False" data-runtime-version="1" data-block-type="vertical" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<h2 class="hd hd-2 unit-title">Quantum gate compiling - Solovay-Kitaev theorem</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13c">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-course-id="course-v1:MITx+8.371.2x+2T2018" data-runtime-class="LmsRuntime" data-init="XBlockToXModuleShim" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13c" data-has-score="False" data-runtime-version="1" data-block-type="video" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Quantum gate compiling - Solovay-Kitaev theorem</h3>
<div
id="video_M2L13c"
class="video closed"
data-metadata='{"ytTestTimeout": 1500, "autohideHtml5": false, "generalSpeed": 1.0, "sources": [], "end": 0.0, "saveStateUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13c/handler/xmodule_handler/save_user_state", "speed": null, "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13c/handler/transcript/available_translations", "completionEnabled": false, "transcriptLanguage": "en", "streams": "1.00:J0pjUNoZVnY", "captionDataDir": null, "ytApiUrl": "https://www.youtube.com/iframe_api", "lmsRootURL": "https://openlearninglibrary.mit.edu", "showCaptions": "true", "ytMetadataEndpoint": "", "autoplay": false, "recordedYoutubeIsAvailable": true, "savedVideoPosition": 0.0, "transcriptLanguages": {"en": "English"}, "poster": null, "autoAdvance": false, "prioritizeHls": false, "start": 0.0, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13c/handler/transcript/translation/__lang__", "completionPercentage": 0.95, "duration": 0.0, "saveStateEnabled": false, "publishCompletionUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13c/handler/publish_completion"}'
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="M2L13c"></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.2x+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.2x+2T2018" data-runtime-class="LmsRuntime" data-init="XBlockToXModuleShim" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@html+block@html_site_search_box3" data-has-score="False" data-runtime-version="1" data-block-type="html" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.2x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.2x+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.2x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.2x+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.2x+2T2018" data-runtime-class="LmsRuntime" data-init="VerticalStudentView" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@vertical+block@Quantum_gate_compiling_-_significance_of_the_Solovay-Kitaev_theorem_for_BQP" data-has-score="False" data-runtime-version="1" data-block-type="vertical" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<h2 class="hd hd-2 unit-title">Quantum gate compiling - significance of the Solovay-Kitaev theorem for BQP</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13d">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-course-id="course-v1:MITx+8.371.2x+2T2018" data-runtime-class="LmsRuntime" data-init="XBlockToXModuleShim" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13d" data-has-score="False" data-runtime-version="1" data-block-type="video" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Quantum gate compiling - significance of the Solovay-Kitaev theorem for BQP</h3>
<div
id="video_M2L13d"
class="video closed"
data-metadata='{"ytTestTimeout": 1500, "autohideHtml5": false, "generalSpeed": 1.0, "sources": [], "end": 0.0, "saveStateUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13d/handler/xmodule_handler/save_user_state", "speed": null, "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13d/handler/transcript/available_translations", "completionEnabled": false, "transcriptLanguage": "en", "streams": "1.00:36yXRcf0yfE", "captionDataDir": null, "ytApiUrl": "https://www.youtube.com/iframe_api", "lmsRootURL": "https://openlearninglibrary.mit.edu", "showCaptions": "true", "ytMetadataEndpoint": "", "autoplay": false, "recordedYoutubeIsAvailable": true, "savedVideoPosition": 0.0, "transcriptLanguages": {"en": "English"}, "poster": null, "autoAdvance": false, "prioritizeHls": false, "start": 0.0, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13d/handler/transcript/translation/__lang__", "completionPercentage": 0.95, "duration": 0.0, "saveStateEnabled": false, "publishCompletionUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13d/handler/publish_completion"}'
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="M2L13d"></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.2x+2T2018+type@html+block@Quantum_gate_compiling_-_significance_of_the_Solovay-Kitaev_theorem_for_BQP_html">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:MITx+8.371.2x+2T2018" data-runtime-class="LmsRuntime" data-init="XBlockToXModuleShim" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@html+block@Quantum_gate_compiling_-_significance_of_the_Solovay-Kitaev_theorem_for_BQP_html" data-has-score="False" data-runtime-version="1" data-block-type="html" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<p>
Also see <a href="/asset-v1:MITx+8.371.2x+2T2018+type@asset+block/THESIS-harrow-mit-sb-physics-2001.pdf" target="_blank">Aram Harrow's 2001 MIT Physics S.B. thesis on “quantum compiling"</a>. </p>
</div>
</div>
<div class="vert vert-2" data-id="block-v1:MITx+8.371.2x+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.2x+2T2018" data-runtime-class="LmsRuntime" data-init="XBlockToXModuleShim" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@html+block@html_site_search_box4" data-has-score="False" data-runtime-version="1" data-block-type="html" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.2x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.2x+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.2x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.2x+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.2x+2T2018" data-runtime-class="LmsRuntime" data-init="VerticalStudentView" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@vertical+block@CQ_Solovay_Kitaev_and_universal_gate_sets" data-has-score="False" data-runtime-version="1" data-block-type="vertical" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<h2 class="hd hd-2 unit-title">CQ: Solovay Kitaev and universal gate sets</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.2x+2T2018+type@problem+block@cq_M2L13_Solovay_Kitaev_and_universal_gate_sets">
<div class="xblock xblock-public_view xblock-public_view-problem xmodule_display xmodule_ProblemBlock" data-course-id="course-v1:MITx+8.371.2x+2T2018" data-runtime-class="LmsRuntime" data-init="XBlockToXModuleShim" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@problem+block@cq_M2L13_Solovay_Kitaev_and_universal_gate_sets" data-has-score="True" data-runtime-version="1" data-block-type="problem" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Problem"}
</script>
<div id="problem_cq_M2L13_Solovay_Kitaev_and_universal_gate_sets" class="problems-wrapper" role="group"
aria-labelledby="cq_M2L13_Solovay_Kitaev_and_universal_gate_sets-problem-title"
data-problem-id="block-v1:MITx+8.371.2x+2T2018+type@problem+block@cq_M2L13_Solovay_Kitaev_and_universal_gate_sets" data-url="/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@problem+block@cq_M2L13_Solovay_Kitaev_and_universal_gate_sets/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="cq_M2L13_Solovay_Kitaev_and_universal_gate_sets-problem-title" aria-describedby="block-v1:MITx+8.371.2x+2T2018+type@problem+block@cq_M2L13_Solovay_Kitaev_and_universal_gate_sets-problem-progress" tabindex="-1">
Solovay Kitaev and universal gate sets
</h3>
<div class="problem-progress" id="block-v1:MITx+8.371.2x+2T2018+type@problem+block@cq_M2L13_Solovay_Kitaev_and_universal_gate_sets-problem-progress"></div>
<div class="problem">
<div>
<p>
This is a concept question, provided to check your understanding of the previous lecture video clips. </p>
<p>
Which of the following are true? </p>
<p>
<div class="wrapper-problem-response" tabindex="-1" aria-label="Question 1" role="group"><div class="choicegroup capa_inputtype" id="inputtype_cq_M2L13_Solovay_Kitaev_and_universal_gate_sets_2_1">
<fieldset aria-describedby="status_cq_M2L13_Solovay_Kitaev_and_universal_gate_sets_2_1">
<div class="field">
<input type="checkbox" name="input_cq_M2L13_Solovay_Kitaev_and_universal_gate_sets_2_1[]" id="input_cq_M2L13_Solovay_Kitaev_and_universal_gate_sets_2_1_choice_0" class="field-input input-checkbox" value="choice_0"/><label id="cq_M2L13_Solovay_Kitaev_and_universal_gate_sets_2_1-choice_0-label" for="input_cq_M2L13_Solovay_Kitaev_and_universal_gate_sets_2_1_choice_0" class="response-label field-label label-inline" aria-describedby="status_cq_M2L13_Solovay_Kitaev_and_universal_gate_sets_2_1">
<text>We can compile a gate set into another gate set using overhead polynomial in the number of precision bits of the error.</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_cq_M2L13_Solovay_Kitaev_and_universal_gate_sets_2_1[]" id="input_cq_M2L13_Solovay_Kitaev_and_universal_gate_sets_2_1_choice_1" class="field-input input-checkbox" value="choice_1"/><label id="cq_M2L13_Solovay_Kitaev_and_universal_gate_sets_2_1-choice_1-label" for="input_cq_M2L13_Solovay_Kitaev_and_universal_gate_sets_2_1_choice_1" class="response-label field-label label-inline" aria-describedby="status_cq_M2L13_Solovay_Kitaev_and_universal_gate_sets_2_1">
<text>Almost any gate set is universal.</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_cq_M2L13_Solovay_Kitaev_and_universal_gate_sets_2_1[]" id="input_cq_M2L13_Solovay_Kitaev_and_universal_gate_sets_2_1_choice_2" class="field-input input-checkbox" value="choice_2"/><label id="cq_M2L13_Solovay_Kitaev_and_universal_gate_sets_2_1-choice_2-label" for="input_cq_M2L13_Solovay_Kitaev_and_universal_gate_sets_2_1_choice_2" class="response-label field-label label-inline" aria-describedby="status_cq_M2L13_Solovay_Kitaev_and_universal_gate_sets_2_1">
<text>A gate set is universal if we can construct all unitaries exactly using that gate set.</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_cq_M2L13_Solovay_Kitaev_and_universal_gate_sets_2_1[]" id="input_cq_M2L13_Solovay_Kitaev_and_universal_gate_sets_2_1_choice_3" class="field-input input-checkbox" value="choice_3"/><label id="cq_M2L13_Solovay_Kitaev_and_universal_gate_sets_2_1-choice_3-label" for="input_cq_M2L13_Solovay_Kitaev_and_universal_gate_sets_2_1_choice_3" class="response-label field-label label-inline" aria-describedby="status_cq_M2L13_Solovay_Kitaev_and_universal_gate_sets_2_1">
<text>A gate set is universal if we can construct all unitaries exactly using polynomial-size circuits in that gate set.</text>
</label>
</div>
<span id="answer_cq_M2L13_Solovay_Kitaev_and_universal_gate_sets_2_1"/>
</fieldset>
<div class="indicator-container">
<span class="status unanswered" id="status_cq_M2L13_Solovay_Kitaev_and_universal_gate_sets_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="Solovay Kitaev and universal gate sets" />
<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_cq_M2L13_Solovay_Kitaev_and_universal_gate_sets" >
<span class="submit-label">Submit</span>
</button>
<div class="submission-feedback" id="submission_feedback_cq_M2L13_Solovay_Kitaev_and_universal_gate_sets">
<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="cq_M2L13_Solovay_Kitaev_and_universal_gate_sets-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="cq_M2L13_Solovay_Kitaev_and_universal_gate_sets-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="cq_M2L13_Solovay_Kitaev_and_universal_gate_sets-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>
</div>
<div class="xblock xblock-public_view xblock-public_view-vertical" data-course-id="course-v1:MITx+8.371.2x+2T2018" data-runtime-class="LmsRuntime" data-init="VerticalStudentView" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@vertical+block@Complete_problems_and_the_generality_of_complexity_class_definitions_-_reductions" data-has-score="False" data-runtime-version="1" data-block-type="vertical" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<h2 class="hd hd-2 unit-title">Complete problems and the generality of complexity class definitions - reductions</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13e">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-course-id="course-v1:MITx+8.371.2x+2T2018" data-runtime-class="LmsRuntime" data-init="XBlockToXModuleShim" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13e" data-has-score="False" data-runtime-version="1" data-block-type="video" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Complete problems and the generality of complexity class definitions - reductions</h3>
<div
id="video_M2L13e"
class="video closed"
data-metadata='{"ytTestTimeout": 1500, "autohideHtml5": false, "generalSpeed": 1.0, "sources": [], "end": 0.0, "saveStateUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13e/handler/xmodule_handler/save_user_state", "speed": null, "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13e/handler/transcript/available_translations", "completionEnabled": false, "transcriptLanguage": "en", "streams": "1.00:v9icA_vESZ8", "captionDataDir": null, "ytApiUrl": "https://www.youtube.com/iframe_api", "lmsRootURL": "https://openlearninglibrary.mit.edu", "showCaptions": "true", "ytMetadataEndpoint": "", "autoplay": false, "recordedYoutubeIsAvailable": true, "savedVideoPosition": 0.0, "transcriptLanguages": {"en": "English"}, "poster": null, "autoAdvance": false, "prioritizeHls": false, "start": 0.0, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13e/handler/transcript/translation/__lang__", "completionPercentage": 0.95, "duration": 0.0, "saveStateEnabled": false, "publishCompletionUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13e/handler/publish_completion"}'
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="M2L13e"></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.2x+2T2018+type@html+block@html_site_search_box5">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:MITx+8.371.2x+2T2018" data-runtime-class="LmsRuntime" data-init="XBlockToXModuleShim" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@html+block@html_site_search_box5" data-has-score="False" data-runtime-version="1" data-block-type="html" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.2x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.2x+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.2x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.2x+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.2x+2T2018" data-runtime-class="LmsRuntime" data-init="VerticalStudentView" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@vertical+block@CQ_Complexity_theory_and_complete_problems" data-has-score="False" data-runtime-version="1" data-block-type="vertical" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<h2 class="hd hd-2 unit-title">CQ: Complexity theory and complete problems</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.2x+2T2018+type@problem+block@cq_M2L13_Complexity_theory_and_complete_problems">
<div class="xblock xblock-public_view xblock-public_view-problem xmodule_display xmodule_ProblemBlock" data-course-id="course-v1:MITx+8.371.2x+2T2018" data-runtime-class="LmsRuntime" data-init="XBlockToXModuleShim" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@problem+block@cq_M2L13_Complexity_theory_and_complete_problems" data-has-score="True" data-runtime-version="1" data-block-type="problem" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Problem"}
</script>
<div id="problem_cq_M2L13_Complexity_theory_and_complete_problems" class="problems-wrapper" role="group"
aria-labelledby="cq_M2L13_Complexity_theory_and_complete_problems-problem-title"
data-problem-id="block-v1:MITx+8.371.2x+2T2018+type@problem+block@cq_M2L13_Complexity_theory_and_complete_problems" data-url="/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@problem+block@cq_M2L13_Complexity_theory_and_complete_problems/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="cq_M2L13_Complexity_theory_and_complete_problems-problem-title" aria-describedby="block-v1:MITx+8.371.2x+2T2018+type@problem+block@cq_M2L13_Complexity_theory_and_complete_problems-problem-progress" tabindex="-1">
Complexity theory and complete problems
</h3>
<div class="problem-progress" id="block-v1:MITx+8.371.2x+2T2018+type@problem+block@cq_M2L13_Complexity_theory_and_complete_problems-problem-progress"></div>
<div class="problem">
<div>
<p>
This is a concept question, provided to check your understanding of the previous lecture video clips. </p>
<p>
Which of the following are true? </p>
<p>
<div class="wrapper-problem-response" tabindex="-1" aria-label="Question 1" role="group"><div class="choicegroup capa_inputtype" id="inputtype_cq_M2L13_Complexity_theory_and_complete_problems_2_1">
<fieldset aria-describedby="status_cq_M2L13_Complexity_theory_and_complete_problems_2_1">
<div class="field">
<input type="checkbox" name="input_cq_M2L13_Complexity_theory_and_complete_problems_2_1[]" id="input_cq_M2L13_Complexity_theory_and_complete_problems_2_1_choice_0" class="field-input input-checkbox" value="choice_0"/><label id="cq_M2L13_Complexity_theory_and_complete_problems_2_1-choice_0-label" for="input_cq_M2L13_Complexity_theory_and_complete_problems_2_1_choice_0" class="response-label field-label label-inline" aria-describedby="status_cq_M2L13_Complexity_theory_and_complete_problems_2_1">
<text>Language A is reducible to language B if by solving A we can solve B .</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_cq_M2L13_Complexity_theory_and_complete_problems_2_1[]" id="input_cq_M2L13_Complexity_theory_and_complete_problems_2_1_choice_1" class="field-input input-checkbox" value="choice_1"/><label id="cq_M2L13_Complexity_theory_and_complete_problems_2_1-choice_1-label" for="input_cq_M2L13_Complexity_theory_and_complete_problems_2_1_choice_1" class="response-label field-label label-inline" aria-describedby="status_cq_M2L13_Complexity_theory_and_complete_problems_2_1">
<text>NP-hard problems are contained in NP.</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_cq_M2L13_Complexity_theory_and_complete_problems_2_1[]" id="input_cq_M2L13_Complexity_theory_and_complete_problems_2_1_choice_2" class="field-input input-checkbox" value="choice_2"/><label id="cq_M2L13_Complexity_theory_and_complete_problems_2_1-choice_2-label" for="input_cq_M2L13_Complexity_theory_and_complete_problems_2_1_choice_2" class="response-label field-label label-inline" aria-describedby="status_cq_M2L13_Complexity_theory_and_complete_problems_2_1">
<text>Circuit satisfiability is in NP.</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_cq_M2L13_Complexity_theory_and_complete_problems_2_1[]" id="input_cq_M2L13_Complexity_theory_and_complete_problems_2_1_choice_3" class="field-input input-checkbox" value="choice_3"/><label id="cq_M2L13_Complexity_theory_and_complete_problems_2_1-choice_3-label" for="input_cq_M2L13_Complexity_theory_and_complete_problems_2_1_choice_3" class="response-label field-label label-inline" aria-describedby="status_cq_M2L13_Complexity_theory_and_complete_problems_2_1">
<text>If we can solve circuit-SAT in polynomial time then P = NP.</text>
</label>
</div>
<span id="answer_cq_M2L13_Complexity_theory_and_complete_problems_2_1"/>
</fieldset>
<div class="indicator-container">
<span class="status unanswered" id="status_cq_M2L13_Complexity_theory_and_complete_problems_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="Complexity theory and complete problems" />
<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_cq_M2L13_Complexity_theory_and_complete_problems" >
<span class="submit-label">Submit</span>
</button>
<div class="submission-feedback" id="submission_feedback_cq_M2L13_Complexity_theory_and_complete_problems">
<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="cq_M2L13_Complexity_theory_and_complete_problems-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="cq_M2L13_Complexity_theory_and_complete_problems-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="cq_M2L13_Complexity_theory_and_complete_problems-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>
</div>
<div class="xblock xblock-public_view xblock-public_view-vertical" data-course-id="course-v1:MITx+8.371.2x+2T2018" data-runtime-class="LmsRuntime" data-init="VerticalStudentView" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@vertical+block@Reductions_-_example_NP_complete_problem_Circuit_SAT" data-has-score="False" data-runtime-version="1" data-block-type="vertical" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<h2 class="hd hd-2 unit-title">Reductions - example NP complete problem: Circuit SAT</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13f">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-course-id="course-v1:MITx+8.371.2x+2T2018" data-runtime-class="LmsRuntime" data-init="XBlockToXModuleShim" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13f" data-has-score="False" data-runtime-version="1" data-block-type="video" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Reductions - example NP complete problem: Circuit SAT</h3>
<div
id="video_M2L13f"
class="video closed"
data-metadata='{"ytTestTimeout": 1500, "autohideHtml5": false, "generalSpeed": 1.0, "sources": [], "end": 0.0, "saveStateUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13f/handler/xmodule_handler/save_user_state", "speed": null, "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13f/handler/transcript/available_translations", "completionEnabled": false, "transcriptLanguage": "en", "streams": "1.00:GDffWYP6DUM", "captionDataDir": null, "ytApiUrl": "https://www.youtube.com/iframe_api", "lmsRootURL": "https://openlearninglibrary.mit.edu", "showCaptions": "true", "ytMetadataEndpoint": "", "autoplay": false, "recordedYoutubeIsAvailable": true, "savedVideoPosition": 0.0, "transcriptLanguages": {"en": "English"}, "poster": null, "autoAdvance": false, "prioritizeHls": false, "start": 0.0, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13f/handler/transcript/translation/__lang__", "completionPercentage": 0.95, "duration": 0.0, "saveStateEnabled": false, "publishCompletionUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13f/handler/publish_completion"}'
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="M2L13f"></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.2x+2T2018+type@html+block@html_site_search_box6">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:MITx+8.371.2x+2T2018" data-runtime-class="LmsRuntime" data-init="XBlockToXModuleShim" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@html+block@html_site_search_box6" data-has-score="False" data-runtime-version="1" data-block-type="html" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.2x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.2x+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.2x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.2x+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.2x+2T2018" data-runtime-class="LmsRuntime" data-init="VerticalStudentView" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@vertical+block@The_P_NP_problem_-_hardness_statements_and_runtime_lower_bounds" data-has-score="False" data-runtime-version="1" data-block-type="vertical" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<h2 class="hd hd-2 unit-title">The P=NP problem - hardness statements and runtime lower bounds</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13g">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-course-id="course-v1:MITx+8.371.2x+2T2018" data-runtime-class="LmsRuntime" data-init="XBlockToXModuleShim" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13g" data-has-score="False" data-runtime-version="1" data-block-type="video" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">The P=NP problem - hardness statements and runtime lower bounds</h3>
<div
id="video_M2L13g"
class="video closed"
data-metadata='{"ytTestTimeout": 1500, "autohideHtml5": false, "generalSpeed": 1.0, "sources": [], "end": 0.0, "saveStateUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13g/handler/xmodule_handler/save_user_state", "speed": null, "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13g/handler/transcript/available_translations", "completionEnabled": false, "transcriptLanguage": "en", "streams": "1.00:ifLXtlepJe0", "captionDataDir": null, "ytApiUrl": "https://www.youtube.com/iframe_api", "lmsRootURL": "https://openlearninglibrary.mit.edu", "showCaptions": "true", "ytMetadataEndpoint": "", "autoplay": false, "recordedYoutubeIsAvailable": true, "savedVideoPosition": 0.0, "transcriptLanguages": {"en": "English"}, "poster": null, "autoAdvance": false, "prioritizeHls": false, "start": 0.0, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13g/handler/transcript/translation/__lang__", "completionPercentage": 0.95, "duration": 0.0, "saveStateEnabled": false, "publishCompletionUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13g/handler/publish_completion"}'
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="M2L13g"></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.2x+2T2018+type@html+block@html_site_search_box7">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:MITx+8.371.2x+2T2018" data-runtime-class="LmsRuntime" data-init="XBlockToXModuleShim" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@html+block@html_site_search_box7" data-has-score="False" data-runtime-version="1" data-block-type="html" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.2x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.2x+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.2x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.2x+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.2x+2T2018" data-runtime-class="LmsRuntime" data-init="VerticalStudentView" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@vertical+block@Some_NP_complete_problems_3SAT_TSP_and_IP" data-has-score="False" data-runtime-version="1" data-block-type="vertical" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<h2 class="hd hd-2 unit-title">Some NP complete problems: 3SAT TSP and IP</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13h">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-course-id="course-v1:MITx+8.371.2x+2T2018" data-runtime-class="LmsRuntime" data-init="XBlockToXModuleShim" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13h" data-has-score="False" data-runtime-version="1" data-block-type="video" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Some NP complete problems: 3SAT TSP and IP</h3>
<div
id="video_M2L13h"
class="video closed"
data-metadata='{"ytTestTimeout": 1500, "autohideHtml5": false, "generalSpeed": 1.0, "sources": [], "end": 0.0, "saveStateUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13h/handler/xmodule_handler/save_user_state", "speed": null, "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13h/handler/transcript/available_translations", "completionEnabled": false, "transcriptLanguage": "en", "streams": "1.00:Xv96Ao2cIDU", "captionDataDir": null, "ytApiUrl": "https://www.youtube.com/iframe_api", "lmsRootURL": "https://openlearninglibrary.mit.edu", "showCaptions": "true", "ytMetadataEndpoint": "", "autoplay": false, "recordedYoutubeIsAvailable": true, "savedVideoPosition": 0.0, "transcriptLanguages": {"en": "English"}, "poster": null, "autoAdvance": false, "prioritizeHls": false, "start": 0.0, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13h/handler/transcript/translation/__lang__", "completionPercentage": 0.95, "duration": 0.0, "saveStateEnabled": false, "publishCompletionUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13h/handler/publish_completion"}'
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="M2L13h"></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.2x+2T2018+type@html+block@html_site_search_box8">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:MITx+8.371.2x+2T2018" data-runtime-class="LmsRuntime" data-init="XBlockToXModuleShim" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@html+block@html_site_search_box8" data-has-score="False" data-runtime-version="1" data-block-type="html" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.2x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.2x+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.2x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.2x+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.2x+2T2018" data-runtime-class="LmsRuntime" data-init="VerticalStudentView" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@vertical+block@A_BQP-complete_problem_quantum_circuit_evaluation" data-has-score="False" data-runtime-version="1" data-block-type="vertical" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<h2 class="hd hd-2 unit-title">A BQP-complete problem: quantum circuit evaluation</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13j">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-course-id="course-v1:MITx+8.371.2x+2T2018" data-runtime-class="LmsRuntime" data-init="XBlockToXModuleShim" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13j" data-has-score="False" data-runtime-version="1" data-block-type="video" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">A BQP-complete problem: quantum circuit evaluation</h3>
<div
id="video_M2L13j"
class="video closed"
data-metadata='{"ytTestTimeout": 1500, "autohideHtml5": false, "generalSpeed": 1.0, "sources": [], "end": 0.0, "saveStateUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13j/handler/xmodule_handler/save_user_state", "speed": null, "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13j/handler/transcript/available_translations", "completionEnabled": false, "transcriptLanguage": "en", "streams": "1.00:kYj_Uj2Ke5U", "captionDataDir": null, "ytApiUrl": "https://www.youtube.com/iframe_api", "lmsRootURL": "https://openlearninglibrary.mit.edu", "showCaptions": "true", "ytMetadataEndpoint": "", "autoplay": false, "recordedYoutubeIsAvailable": true, "savedVideoPosition": 0.0, "transcriptLanguages": {"en": "English"}, "poster": null, "autoAdvance": false, "prioritizeHls": false, "start": 0.0, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13j/handler/transcript/translation/__lang__", "completionPercentage": 0.95, "duration": 0.0, "saveStateEnabled": false, "publishCompletionUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13j/handler/publish_completion"}'
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="M2L13j"></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.2x+2T2018+type@html+block@html_site_search_box9">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:MITx+8.371.2x+2T2018" data-runtime-class="LmsRuntime" data-init="XBlockToXModuleShim" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@html+block@html_site_search_box9" data-has-score="False" data-runtime-version="1" data-block-type="html" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.2x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.2x+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.2x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.2x+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.2x+2T2018" data-runtime-class="LmsRuntime" data-init="VerticalStudentView" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@vertical+block@The_relationship_of_BQP_and_BPP_quantum_vs_classical_complexity" data-has-score="False" data-runtime-version="1" data-block-type="vertical" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<h2 class="hd hd-2 unit-title">The relationship of BQP and BPP: quantum vs classical complexity</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13k">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-course-id="course-v1:MITx+8.371.2x+2T2018" data-runtime-class="LmsRuntime" data-init="XBlockToXModuleShim" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13k" data-has-score="False" data-runtime-version="1" data-block-type="video" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">The relationship of BQP and BPP: quantum vs classical complexity</h3>
<div
id="video_M2L13k"
class="video closed"
data-metadata='{"ytTestTimeout": 1500, "autohideHtml5": false, "generalSpeed": 1.0, "sources": [], "end": 0.0, "saveStateUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13k/handler/xmodule_handler/save_user_state", "speed": null, "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13k/handler/transcript/available_translations", "completionEnabled": false, "transcriptLanguage": "en", "streams": "1.00:ww35ALIWZBc", "captionDataDir": null, "ytApiUrl": "https://www.youtube.com/iframe_api", "lmsRootURL": "https://openlearninglibrary.mit.edu", "showCaptions": "true", "ytMetadataEndpoint": "", "autoplay": false, "recordedYoutubeIsAvailable": true, "savedVideoPosition": 0.0, "transcriptLanguages": {"en": "English"}, "poster": null, "autoAdvance": false, "prioritizeHls": false, "start": 0.0, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13k/handler/transcript/translation/__lang__", "completionPercentage": 0.95, "duration": 0.0, "saveStateEnabled": false, "publishCompletionUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13k/handler/publish_completion"}'
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="M2L13k"></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.2x+2T2018+type@html+block@html_site_search_box10">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:MITx+8.371.2x+2T2018" data-runtime-class="LmsRuntime" data-init="XBlockToXModuleShim" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@html+block@html_site_search_box10" data-has-score="False" data-runtime-version="1" data-block-type="html" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.2x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.2x+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.2x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.2x+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.2x+2T2018" data-runtime-class="LmsRuntime" data-init="VerticalStudentView" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@vertical+block@The_relationship_of_BQP_and_BPP_a_taste_of_quantum_supremacy" data-has-score="False" data-runtime-version="1" data-block-type="vertical" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<h2 class="hd hd-2 unit-title">The relationship of BQP and BPP: a taste of quantum supremacy</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13m">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-course-id="course-v1:MITx+8.371.2x+2T2018" data-runtime-class="LmsRuntime" data-init="XBlockToXModuleShim" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13m" data-has-score="False" data-runtime-version="1" data-block-type="video" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">The relationship of BQP and BPP: a taste of quantum supremacy</h3>
<div
id="video_M2L13m"
class="video closed"
data-metadata='{"ytTestTimeout": 1500, "autohideHtml5": false, "generalSpeed": 1.0, "sources": [], "end": 0.0, "saveStateUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13m/handler/xmodule_handler/save_user_state", "speed": null, "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13m/handler/transcript/available_translations", "completionEnabled": false, "transcriptLanguage": "en", "streams": "1.00:CC0C5bfgUPk", "captionDataDir": null, "ytApiUrl": "https://www.youtube.com/iframe_api", "lmsRootURL": "https://openlearninglibrary.mit.edu", "showCaptions": "true", "ytMetadataEndpoint": "", "autoplay": false, "recordedYoutubeIsAvailable": true, "savedVideoPosition": 0.0, "transcriptLanguages": {"en": "English"}, "poster": null, "autoAdvance": false, "prioritizeHls": false, "start": 0.0, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13m/handler/transcript/translation/__lang__", "completionPercentage": 0.95, "duration": 0.0, "saveStateEnabled": false, "publishCompletionUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13m/handler/publish_completion"}'
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="M2L13m"></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.2x+2T2018+type@html+block@html_site_search_box11">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:MITx+8.371.2x+2T2018" data-runtime-class="LmsRuntime" data-init="XBlockToXModuleShim" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@html+block@html_site_search_box11" data-has-score="False" data-runtime-version="1" data-block-type="html" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.2x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.2x+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.2x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.2x+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.2x+2T2018" data-runtime-class="LmsRuntime" data-init="VerticalStudentView" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@vertical+block@Beyond_NP_starting_with_counting_solutions" data-has-score="False" data-runtime-version="1" data-block-type="vertical" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<h2 class="hd hd-2 unit-title">Beyond NP: starting with counting solutions</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13n">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-course-id="course-v1:MITx+8.371.2x+2T2018" data-runtime-class="LmsRuntime" data-init="XBlockToXModuleShim" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13n" data-has-score="False" data-runtime-version="1" data-block-type="video" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Beyond NP: starting with counting solutions</h3>
<div
id="video_M2L13n"
class="video closed"
data-metadata='{"ytTestTimeout": 1500, "autohideHtml5": false, "generalSpeed": 1.0, "sources": [], "end": 0.0, "saveStateUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13n/handler/xmodule_handler/save_user_state", "speed": null, "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13n/handler/transcript/available_translations", "completionEnabled": false, "transcriptLanguage": "en", "streams": "1.00:lTaPU8mTEOk", "captionDataDir": null, "ytApiUrl": "https://www.youtube.com/iframe_api", "lmsRootURL": "https://openlearninglibrary.mit.edu", "showCaptions": "true", "ytMetadataEndpoint": "", "autoplay": false, "recordedYoutubeIsAvailable": true, "savedVideoPosition": 0.0, "transcriptLanguages": {"en": "English"}, "poster": null, "autoAdvance": false, "prioritizeHls": false, "start": 0.0, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13n/handler/transcript/translation/__lang__", "completionPercentage": 0.95, "duration": 0.0, "saveStateEnabled": false, "publishCompletionUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13n/handler/publish_completion"}'
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="M2L13n"></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.2x+2T2018+type@html+block@html_site_search_box12">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:MITx+8.371.2x+2T2018" data-runtime-class="LmsRuntime" data-init="XBlockToXModuleShim" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@html+block@html_site_search_box12" data-has-score="False" data-runtime-version="1" data-block-type="html" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.2x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.2x+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.2x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.2x+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.2x+2T2018" data-runtime-class="LmsRuntime" data-init="VerticalStudentView" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@vertical+block@Beyond_NP_approximate_and_exact_counting" data-has-score="False" data-runtime-version="1" data-block-type="vertical" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<h2 class="hd hd-2 unit-title">Beyond NP: approximate and exact counting</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13o">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-course-id="course-v1:MITx+8.371.2x+2T2018" data-runtime-class="LmsRuntime" data-init="XBlockToXModuleShim" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13o" data-has-score="False" data-runtime-version="1" data-block-type="video" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Beyond NP: approximate and exact counting</h3>
<div
id="video_M2L13o"
class="video closed"
data-metadata='{"ytTestTimeout": 1500, "autohideHtml5": false, "generalSpeed": 1.0, "sources": [], "end": 0.0, "saveStateUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13o/handler/xmodule_handler/save_user_state", "speed": null, "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13o/handler/transcript/available_translations", "completionEnabled": false, "transcriptLanguage": "en", "streams": "1.00:Wo32n3rF2AM", "captionDataDir": null, "ytApiUrl": "https://www.youtube.com/iframe_api", "lmsRootURL": "https://openlearninglibrary.mit.edu", "showCaptions": "true", "ytMetadataEndpoint": "", "autoplay": false, "recordedYoutubeIsAvailable": true, "savedVideoPosition": 0.0, "transcriptLanguages": {"en": "English"}, "poster": null, "autoAdvance": false, "prioritizeHls": false, "start": 0.0, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13o/handler/transcript/translation/__lang__", "completionPercentage": 0.95, "duration": 0.0, "saveStateEnabled": false, "publishCompletionUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13o/handler/publish_completion"}'
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="M2L13o"></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.2x+2T2018+type@html+block@html_site_search_box13">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:MITx+8.371.2x+2T2018" data-runtime-class="LmsRuntime" data-init="XBlockToXModuleShim" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@html+block@html_site_search_box13" data-has-score="False" data-runtime-version="1" data-block-type="html" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.2x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.2x+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.2x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.2x+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.2x+2T2018" data-runtime-class="LmsRuntime" data-init="VerticalStudentView" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@vertical+block@The_modern_argument_of_quantum_supremacy" data-has-score="False" data-runtime-version="1" data-block-type="vertical" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<h2 class="hd hd-2 unit-title">The modern argument of quantum supremacy</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13p">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-course-id="course-v1:MITx+8.371.2x+2T2018" data-runtime-class="LmsRuntime" data-init="XBlockToXModuleShim" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13p" data-has-score="False" data-runtime-version="1" data-block-type="video" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">The modern argument of quantum supremacy</h3>
<div
id="video_M2L13p"
class="video closed"
data-metadata='{"ytTestTimeout": 1500, "autohideHtml5": false, "generalSpeed": 1.0, "sources": [], "end": 0.0, "saveStateUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13p/handler/xmodule_handler/save_user_state", "speed": null, "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13p/handler/transcript/available_translations", "completionEnabled": false, "transcriptLanguage": "en", "streams": "1.00:PzM_y4BHYaI", "captionDataDir": null, "ytApiUrl": "https://www.youtube.com/iframe_api", "lmsRootURL": "https://openlearninglibrary.mit.edu", "showCaptions": "true", "ytMetadataEndpoint": "", "autoplay": false, "recordedYoutubeIsAvailable": true, "savedVideoPosition": 0.0, "transcriptLanguages": {"en": "English"}, "poster": null, "autoAdvance": false, "prioritizeHls": false, "start": 0.0, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13p/handler/transcript/translation/__lang__", "completionPercentage": 0.95, "duration": 0.0, "saveStateEnabled": false, "publishCompletionUrl": "/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@video+block@M2L13p/handler/publish_completion"}'
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="M2L13p"></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.2x+2T2018+type@html+block@html_site_search_box14">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:MITx+8.371.2x+2T2018" data-runtime-class="LmsRuntime" data-init="XBlockToXModuleShim" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@html+block@html_site_search_box14" data-has-score="False" data-runtime-version="1" data-block-type="html" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.2x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.2x+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.2x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.2x+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.2x+2T2018" data-runtime-class="LmsRuntime" data-init="VerticalStudentView" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@vertical+block@CQ_Complexity_of_BQP" data-has-score="False" data-runtime-version="1" data-block-type="vertical" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<h2 class="hd hd-2 unit-title">CQ: Complexity of BQP</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.2x+2T2018+type@problem+block@cq_M2L13_Complexity_of_BQP">
<div class="xblock xblock-public_view xblock-public_view-problem xmodule_display xmodule_ProblemBlock" data-course-id="course-v1:MITx+8.371.2x+2T2018" data-runtime-class="LmsRuntime" data-init="XBlockToXModuleShim" data-usage-id="block-v1:MITx+8.371.2x+2T2018+type@problem+block@cq_M2L13_Complexity_of_BQP" data-has-score="True" data-runtime-version="1" data-block-type="problem" data-request-token="4a882a54eddf11eeb46c1299a322540b" data-graded="True">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Problem"}
</script>
<div id="problem_cq_M2L13_Complexity_of_BQP" class="problems-wrapper" role="group"
aria-labelledby="cq_M2L13_Complexity_of_BQP-problem-title"
data-problem-id="block-v1:MITx+8.371.2x+2T2018+type@problem+block@cq_M2L13_Complexity_of_BQP" data-url="/courses/course-v1:MITx+8.371.2x+2T2018/xblock/block-v1:MITx+8.371.2x+2T2018+type@problem+block@cq_M2L13_Complexity_of_BQP/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="cq_M2L13_Complexity_of_BQP-problem-title" aria-describedby="block-v1:MITx+8.371.2x+2T2018+type@problem+block@cq_M2L13_Complexity_of_BQP-problem-progress" tabindex="-1">
Complexity of BQP
</h3>
<div class="problem-progress" id="block-v1:MITx+8.371.2x+2T2018+type@problem+block@cq_M2L13_Complexity_of_BQP-problem-progress"></div>
<div class="problem">
<div>
<p>
This is a concept question, provided to check your understanding of the previous lecture video clips. </p>
<p>
Which of the following are true? </p>
<p>
<div class="wrapper-problem-response" tabindex="-1" aria-label="Question 1" role="group"><div class="choicegroup capa_inputtype" id="inputtype_cq_M2L13_Complexity_of_BQP_2_1">
<fieldset aria-describedby="status_cq_M2L13_Complexity_of_BQP_2_1">
<div class="field">
<input type="checkbox" name="input_cq_M2L13_Complexity_of_BQP_2_1[]" id="input_cq_M2L13_Complexity_of_BQP_2_1_choice_0" class="field-input input-checkbox" value="choice_0"/><label id="cq_M2L13_Complexity_of_BQP_2_1-choice_0-label" for="input_cq_M2L13_Complexity_of_BQP_2_1_choice_0" class="response-label field-label label-inline" aria-describedby="status_cq_M2L13_Complexity_of_BQP_2_1">
<text>BQP has a complete promise problem.</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_cq_M2L13_Complexity_of_BQP_2_1[]" id="input_cq_M2L13_Complexity_of_BQP_2_1_choice_1" class="field-input input-checkbox" value="choice_1"/><label id="cq_M2L13_Complexity_of_BQP_2_1-choice_1-label" for="input_cq_M2L13_Complexity_of_BQP_2_1_choice_1" class="response-label field-label label-inline" aria-describedby="status_cq_M2L13_Complexity_of_BQP_2_1">
<text>BQP is known to be a subset of NP.</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_cq_M2L13_Complexity_of_BQP_2_1[]" id="input_cq_M2L13_Complexity_of_BQP_2_1_choice_2" class="field-input input-checkbox" value="choice_2"/><label id="cq_M2L13_Complexity_of_BQP_2_1-choice_2-label" for="input_cq_M2L13_Complexity_of_BQP_2_1_choice_2" class="response-label field-label label-inline" aria-describedby="status_cq_M2L13_Complexity_of_BQP_2_1">
<text>Circuit evaluation is equivalent to the problem of deciding whether a given circuit accepts the all-zeros string.</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_cq_M2L13_Complexity_of_BQP_2_1[]" id="input_cq_M2L13_Complexity_of_BQP_2_1_choice_3" class="field-input input-checkbox" value="choice_3"/><label id="cq_M2L13_Complexity_of_BQP_2_1-choice_3-label" for="input_cq_M2L13_Complexity_of_BQP_2_1_choice_3" class="response-label field-label label-inline" aria-describedby="status_cq_M2L13_Complexity_of_BQP_2_1">
<text>The quantum-circuit evaluation problem is BQP-complete if the number of gates in the circuit is [mathjaxinline]n^2[/mathjaxinline].</text>
</label>
</div>
<span id="answer_cq_M2L13_Complexity_of_BQP_2_1"/>
</fieldset>
<div class="indicator-container">
<span class="status unanswered" id="status_cq_M2L13_Complexity_of_BQP_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="Complexity of BQP" />
<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_cq_M2L13_Complexity_of_BQP" >
<span class="submit-label">Submit</span>
</button>
<div class="submission-feedback" id="submission_feedback_cq_M2L13_Complexity_of_BQP">
<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="cq_M2L13_Complexity_of_BQP-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="cq_M2L13_Complexity_of_BQP-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="cq_M2L13_Complexity_of_BQP-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>
</div>
© All Rights Reserved