<div class="xblock xblock-public_view xblock-public_view-vertical" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@vertical+block@Introduction_to_quantum_information_science" data-init="VerticalStudentView" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="vertical" data-has-score="False" data-graded="True" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<h2 class="hd hd-2 unit-title">Introduction to quantum information science</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1a">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1a" data-init="XBlockToXModuleShim" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="video" data-has-score="False" data-graded="True" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Introduction to quantum information science</h3>
<div
id="video_M1L1a"
class="video closed"
data-metadata='{"speed": null, "publishCompletionUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1a/handler/publish_completion", "streams": "1.00:KfY-TMttHIA", "prioritizeHls": false, "completionEnabled": false, "autoAdvance": false, "captionDataDir": null, "transcriptLanguages": {"en": "English"}, "recordedYoutubeIsAvailable": true, "showCaptions": "true", "completionPercentage": 0.95, "saveStateUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1a/handler/xmodule_handler/save_user_state", "ytMetadataEndpoint": "", "duration": 0.0, "autohideHtml5": false, "transcriptLanguage": "en", "ytApiUrl": "https://www.youtube.com/iframe_api", "lmsRootURL": "https://openlearninglibrary.mit.edu", "sources": [], "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1a/handler/transcript/available_translations", "savedVideoPosition": 0.0, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1a/handler/transcript/translation/__lang__", "saveStateEnabled": false, "ytTestTimeout": 1500, "poster": null, "autoplay": false, "generalSpeed": 1.0, "start": 0.0, "end": 0.0}'
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="M1L1a"></div>
<h4 class="hd hd-4 video-error is-hidden">No playable video sources found.</h4>
<h4 class="hd hd-4 video-hls-error is-hidden">
Your browser does not support this video format. Try using a different browser.
</h4>
</div>
<div class="video-player-post"></div>
<div class="closed-captions"></div>
<div class="video-controls is-hidden">
<div>
<div class="vcr"><div class="vidtime">0:00 / 0:00</div></div>
<div class="secondary-controls"></div>
</div>
</div>
</div>
</div>
<div class="focus_grabber last"></div>
</div>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@site_search_box1">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@site_search_box1" data-init="XBlockToXModuleShim" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="html" data-has-score="False" data-graded="True" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.1x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = function(){
course_static_url = $('#dummy_course_static_link').attr('href').replace('/NONE', '');
jump_to_url = $('#dummy_jump_link').attr('href').replace('/NONE', '');
if (typeof String.prototype.startsWith != 'function') {
// see below for better implementation!
String.prototype.startsWith = function (str){
return this.indexOf(str) === 0;
};
}
if(typeof(String.prototype.trim) === "undefined")
{
String.prototype.trim = function()
{
return String(this).replace(/^\s+|\s+$/g, '');
};
}
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var amp = String.fromCharCode(38);
var rlb = rb + lb;
var mke = function(x){ return lb + x + rb; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('div.course-index').find('nav').find('a').each(function(){
if ($(this).text().trim().startsWith("Search this course")){
search_module_url = $(this).attr('href');
console.log("search_module_url = ", search_module_url);
}
});
}
var go_to_search = function(){
get_search_module();
var sterm = $('#site-search-box').val();
// new_url = jump_to_url + "/Search_this_module/?q=" + sterm;
new_url = search_module_url + "?q=" + sterm;
console.log("sterm = ", sterm, " ; going to ", new_url);
window.location.href = new_url;
}
if (!$('#site-search-box').length){
$("nav.courseware").find("ol").append(lb + "section style='float:right'" + rlb + "input size='20'"
+ " id='site-search-box'"
+ rlb + "img src='" + course_static_url
+ "/images_search_glass.png'/" + rlb + "/input" + rlb + "/section" + rb);
}
$("#site-search-box").keypress(function(event) {
if (event.which == 13) {
event.preventDefault();
go_to_search();
}
});
// $('#site-search-box').bind("enterKey", go_to_search);
var get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_search();
var add_fix_transcript = function(){
if ($('div.wrap-instructor-info').length==0){
return;
}
$('div.xblock-student_view-video').each(function(key, vblock_e){
var vblock = $(vblock_e);
var vuid = vblock.data('usage-id').split('@');
var vid;
if (vuid.length==1){
vuid = vblock.data('usage-id').split(';_')
vid = vuid[5];
}else{
vid = vuid[2];
}
var mfnpre = vid.split("_video",1)[0];
var mfnid = mfnpre; // no periods
mfnpre = mfnpre.replace('8_370', '8.370'); // periods in gh filename
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var mke = function(x){ return lb + x + rb; }
var ftid = "fix_transcript_" + mfnid;
if (!$('#' + ftid).length){
var html = lb + "span id='" + ftid + "' style='float:right'" + rb + lb + "a href='#'" + rb;
html += "contribute transcript fix" + mke("/a") + mke("/span");
console.log("html = ", html);
vblock.after(html)
}
$('#' + ftid).click(function(){
var cst = $('ol.subtitles').find('li.current');
var cindex = Number(cst.data('index'));
var gurl;
if (mfnpre.endsWith('_cq_sol')){
gurl = "https://github.com/mitocw/content-mit-8370x-cq-sol-subtitles/blob/master/";
}else{
gurl = "https://github.com/mitocw/content-mit-8370x-subtitles/blob/master/";
}
gurl += mfnpre + ".txt#L" + String(cindex + 10 + 1);
console.log("going to ", gurl);
window.open(gurl, "MITx 8.370x subtitle source");
});
});
}
try{
add_fix_transcript();
}
catch(err){
console.log(err);
}
try{
var rb = String.fromCharCode(62);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 3000);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 8000);
}
catch(err){
console.log(err);
}
</script></span>
</div>
</div>
</div>
</div>
<div class="xblock xblock-public_view xblock-public_view-vertical" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@vertical+block@Topics_covered_in_this_8_371_course" data-init="VerticalStudentView" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="vertical" data-has-score="False" data-graded="True" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<h2 class="hd hd-2 unit-title">Topics covered in this 8.371 course</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1b">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1b" data-init="XBlockToXModuleShim" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="video" data-has-score="False" data-graded="True" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Topics covered in this 8.371 course</h3>
<div
id="video_M1L1b"
class="video closed"
data-metadata='{"speed": null, "publishCompletionUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1b/handler/publish_completion", "streams": "1.00:bzD3IKoOz_Y", "prioritizeHls": false, "completionEnabled": false, "autoAdvance": false, "captionDataDir": null, "transcriptLanguages": {"en": "English"}, "recordedYoutubeIsAvailable": true, "showCaptions": "true", "completionPercentage": 0.95, "saveStateUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1b/handler/xmodule_handler/save_user_state", "ytMetadataEndpoint": "", "duration": 0.0, "autohideHtml5": false, "transcriptLanguage": "en", "ytApiUrl": "https://www.youtube.com/iframe_api", "lmsRootURL": "https://openlearninglibrary.mit.edu", "sources": [], "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1b/handler/transcript/available_translations", "savedVideoPosition": 0.0, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1b/handler/transcript/translation/__lang__", "saveStateEnabled": false, "ytTestTimeout": 1500, "poster": null, "autoplay": false, "generalSpeed": 1.0, "start": 0.0, "end": 0.0}'
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="M1L1b"></div>
<h4 class="hd hd-4 video-error is-hidden">No playable video sources found.</h4>
<h4 class="hd hd-4 video-hls-error is-hidden">
Your browser does not support this video format. Try using a different browser.
</h4>
</div>
<div class="video-player-post"></div>
<div class="closed-captions"></div>
<div class="video-controls is-hidden">
<div>
<div class="vcr"><div class="vidtime">0:00 / 0:00</div></div>
<div class="secondary-controls"></div>
</div>
</div>
</div>
</div>
<div class="focus_grabber last"></div>
</div>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@site_search_box2">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@site_search_box2" data-init="XBlockToXModuleShim" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="html" data-has-score="False" data-graded="True" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.1x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = function(){
course_static_url = $('#dummy_course_static_link').attr('href').replace('/NONE', '');
jump_to_url = $('#dummy_jump_link').attr('href').replace('/NONE', '');
if (typeof String.prototype.startsWith != 'function') {
// see below for better implementation!
String.prototype.startsWith = function (str){
return this.indexOf(str) === 0;
};
}
if(typeof(String.prototype.trim) === "undefined")
{
String.prototype.trim = function()
{
return String(this).replace(/^\s+|\s+$/g, '');
};
}
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var amp = String.fromCharCode(38);
var rlb = rb + lb;
var mke = function(x){ return lb + x + rb; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('div.course-index').find('nav').find('a').each(function(){
if ($(this).text().trim().startsWith("Search this course")){
search_module_url = $(this).attr('href');
console.log("search_module_url = ", search_module_url);
}
});
}
var go_to_search = function(){
get_search_module();
var sterm = $('#site-search-box').val();
// new_url = jump_to_url + "/Search_this_module/?q=" + sterm;
new_url = search_module_url + "?q=" + sterm;
console.log("sterm = ", sterm, " ; going to ", new_url);
window.location.href = new_url;
}
if (!$('#site-search-box').length){
$("nav.courseware").find("ol").append(lb + "section style='float:right'" + rlb + "input size='20'"
+ " id='site-search-box'"
+ rlb + "img src='" + course_static_url
+ "/images_search_glass.png'/" + rlb + "/input" + rlb + "/section" + rb);
}
$("#site-search-box").keypress(function(event) {
if (event.which == 13) {
event.preventDefault();
go_to_search();
}
});
// $('#site-search-box').bind("enterKey", go_to_search);
var get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_search();
var add_fix_transcript = function(){
if ($('div.wrap-instructor-info').length==0){
return;
}
$('div.xblock-student_view-video').each(function(key, vblock_e){
var vblock = $(vblock_e);
var vuid = vblock.data('usage-id').split('@');
var vid;
if (vuid.length==1){
vuid = vblock.data('usage-id').split(';_')
vid = vuid[5];
}else{
vid = vuid[2];
}
var mfnpre = vid.split("_video",1)[0];
var mfnid = mfnpre; // no periods
mfnpre = mfnpre.replace('8_370', '8.370'); // periods in gh filename
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var mke = function(x){ return lb + x + rb; }
var ftid = "fix_transcript_" + mfnid;
if (!$('#' + ftid).length){
var html = lb + "span id='" + ftid + "' style='float:right'" + rb + lb + "a href='#'" + rb;
html += "contribute transcript fix" + mke("/a") + mke("/span");
console.log("html = ", html);
vblock.after(html)
}
$('#' + ftid).click(function(){
var cst = $('ol.subtitles').find('li.current');
var cindex = Number(cst.data('index'));
var gurl;
if (mfnpre.endsWith('_cq_sol')){
gurl = "https://github.com/mitocw/content-mit-8370x-cq-sol-subtitles/blob/master/";
}else{
gurl = "https://github.com/mitocw/content-mit-8370x-subtitles/blob/master/";
}
gurl += mfnpre + ".txt#L" + String(cindex + 10 + 1);
console.log("going to ", gurl);
window.open(gurl, "MITx 8.370x subtitle source");
});
});
}
try{
add_fix_transcript();
}
catch(err){
console.log(err);
}
try{
var rb = String.fromCharCode(62);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 3000);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 8000);
}
catch(err){
console.log(err);
}
</script></span>
</div>
</div>
</div>
</div>
<div class="xblock xblock-public_view xblock-public_view-vertical" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@vertical+block@Quantum_states_and_operations_-_overview" data-init="VerticalStudentView" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="vertical" data-has-score="False" data-graded="True" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<h2 class="hd hd-2 unit-title">Quantum states and operations - overview</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1c">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1c" data-init="XBlockToXModuleShim" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="video" data-has-score="False" data-graded="True" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Quantum states and operations - overview</h3>
<div
id="video_M1L1c"
class="video closed"
data-metadata='{"speed": null, "publishCompletionUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1c/handler/publish_completion", "streams": "1.00:aGuT14FWiWs", "prioritizeHls": false, "completionEnabled": false, "autoAdvance": false, "captionDataDir": null, "transcriptLanguages": {"en": "English"}, "recordedYoutubeIsAvailable": true, "showCaptions": "true", "completionPercentage": 0.95, "saveStateUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1c/handler/xmodule_handler/save_user_state", "ytMetadataEndpoint": "", "duration": 0.0, "autohideHtml5": false, "transcriptLanguage": "en", "ytApiUrl": "https://www.youtube.com/iframe_api", "lmsRootURL": "https://openlearninglibrary.mit.edu", "sources": [], "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1c/handler/transcript/available_translations", "savedVideoPosition": 0.0, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1c/handler/transcript/translation/__lang__", "saveStateEnabled": false, "ytTestTimeout": 1500, "poster": null, "autoplay": false, "generalSpeed": 1.0, "start": 0.0, "end": 0.0}'
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="M1L1c"></div>
<h4 class="hd hd-4 video-error is-hidden">No playable video sources found.</h4>
<h4 class="hd hd-4 video-hls-error is-hidden">
Your browser does not support this video format. Try using a different browser.
</h4>
</div>
<div class="video-player-post"></div>
<div class="closed-captions"></div>
<div class="video-controls is-hidden">
<div>
<div class="vcr"><div class="vidtime">0:00 / 0:00</div></div>
<div class="secondary-controls"></div>
</div>
</div>
</div>
</div>
<div class="focus_grabber last"></div>
</div>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@site_search_box3">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@site_search_box3" data-init="XBlockToXModuleShim" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="html" data-has-score="False" data-graded="False" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.1x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = function(){
course_static_url = $('#dummy_course_static_link').attr('href').replace('/NONE', '');
jump_to_url = $('#dummy_jump_link').attr('href').replace('/NONE', '');
if (typeof String.prototype.startsWith != 'function') {
// see below for better implementation!
String.prototype.startsWith = function (str){
return this.indexOf(str) === 0;
};
}
if(typeof(String.prototype.trim) === "undefined")
{
String.prototype.trim = function()
{
return String(this).replace(/^\s+|\s+$/g, '');
};
}
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var amp = String.fromCharCode(38);
var rlb = rb + lb;
var mke = function(x){ return lb + x + rb; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('div.course-index').find('nav').find('a').each(function(){
if ($(this).text().trim().startsWith("Search this course")){
search_module_url = $(this).attr('href');
console.log("search_module_url = ", search_module_url);
}
});
}
var go_to_search = function(){
get_search_module();
var sterm = $('#site-search-box').val();
// new_url = jump_to_url + "/Search_this_module/?q=" + sterm;
new_url = search_module_url + "?q=" + sterm;
console.log("sterm = ", sterm, " ; going to ", new_url);
window.location.href = new_url;
}
if (!$('#site-search-box').length){
$("nav.courseware").find("ol").append(lb + "section style='float:right'" + rlb + "input size='20'"
+ " id='site-search-box'"
+ rlb + "img src='" + course_static_url
+ "/images_search_glass.png'/" + rlb + "/input" + rlb + "/section" + rb);
}
$("#site-search-box").keypress(function(event) {
if (event.which == 13) {
event.preventDefault();
go_to_search();
}
});
// $('#site-search-box').bind("enterKey", go_to_search);
var get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_search();
var add_fix_transcript = function(){
if ($('div.wrap-instructor-info').length==0){
return;
}
$('div.xblock-student_view-video').each(function(key, vblock_e){
var vblock = $(vblock_e);
var vuid = vblock.data('usage-id').split('@');
var vid;
if (vuid.length==1){
vuid = vblock.data('usage-id').split(';_')
vid = vuid[5];
}else{
vid = vuid[2];
}
var mfnpre = vid.split("_video",1)[0];
var mfnid = mfnpre; // no periods
mfnpre = mfnpre.replace('8_370', '8.370'); // periods in gh filename
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var mke = function(x){ return lb + x + rb; }
var ftid = "fix_transcript_" + mfnid;
if (!$('#' + ftid).length){
var html = lb + "span id='" + ftid + "' style='float:right'" + rb + lb + "a href='#'" + rb;
html += "contribute transcript fix" + mke("/a") + mke("/span");
console.log("html = ", html);
vblock.after(html)
}
$('#' + ftid).click(function(){
var cst = $('ol.subtitles').find('li.current');
var cindex = Number(cst.data('index'));
var gurl;
if (mfnpre.endsWith('_cq_sol')){
gurl = "https://github.com/mitocw/content-mit-8370x-cq-sol-subtitles/blob/master/";
}else{
gurl = "https://github.com/mitocw/content-mit-8370x-subtitles/blob/master/";
}
gurl += mfnpre + ".txt#L" + String(cindex + 10 + 1);
console.log("going to ", gurl);
window.open(gurl, "MITx 8.370x subtitle source");
});
});
}
try{
add_fix_transcript();
}
catch(err){
console.log(err);
}
try{
var rb = String.fromCharCode(62);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 3000);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 8000);
}
catch(err){
console.log(err);
}
</script></span>
</div>
</div>
</div>
</div>
<div class="xblock xblock-public_view xblock-public_view-vertical" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@vertical+block@Density_matrices_and_ensembles" data-init="VerticalStudentView" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="vertical" data-has-score="False" data-graded="True" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<h2 class="hd hd-2 unit-title">Density matrices and ensembles</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1d">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1d" data-init="XBlockToXModuleShim" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="video" data-has-score="False" data-graded="True" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Density matrices and ensembles</h3>
<div
id="video_M1L1d"
class="video closed"
data-metadata='{"speed": null, "publishCompletionUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1d/handler/publish_completion", "streams": "1.00:wFxSfs1yKuY", "prioritizeHls": false, "completionEnabled": false, "autoAdvance": false, "captionDataDir": null, "transcriptLanguages": {"en": "English"}, "recordedYoutubeIsAvailable": true, "showCaptions": "true", "completionPercentage": 0.95, "saveStateUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1d/handler/xmodule_handler/save_user_state", "ytMetadataEndpoint": "", "duration": 0.0, "autohideHtml5": false, "transcriptLanguage": "en", "ytApiUrl": "https://www.youtube.com/iframe_api", "lmsRootURL": "https://openlearninglibrary.mit.edu", "sources": [], "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1d/handler/transcript/available_translations", "savedVideoPosition": 0.0, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1d/handler/transcript/translation/__lang__", "saveStateEnabled": false, "ytTestTimeout": 1500, "poster": null, "autoplay": false, "generalSpeed": 1.0, "start": 0.0, "end": 0.0}'
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="M1L1d"></div>
<h4 class="hd hd-4 video-error is-hidden">No playable video sources found.</h4>
<h4 class="hd hd-4 video-hls-error is-hidden">
Your browser does not support this video format. Try using a different browser.
</h4>
</div>
<div class="video-player-post"></div>
<div class="closed-captions"></div>
<div class="video-controls is-hidden">
<div>
<div class="vcr"><div class="vidtime">0:00 / 0:00</div></div>
<div class="secondary-controls"></div>
</div>
</div>
</div>
</div>
<div class="focus_grabber last"></div>
</div>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@site_search_box4">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@site_search_box4" data-init="XBlockToXModuleShim" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="html" data-has-score="False" data-graded="False" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.1x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = function(){
course_static_url = $('#dummy_course_static_link').attr('href').replace('/NONE', '');
jump_to_url = $('#dummy_jump_link').attr('href').replace('/NONE', '');
if (typeof String.prototype.startsWith != 'function') {
// see below for better implementation!
String.prototype.startsWith = function (str){
return this.indexOf(str) === 0;
};
}
if(typeof(String.prototype.trim) === "undefined")
{
String.prototype.trim = function()
{
return String(this).replace(/^\s+|\s+$/g, '');
};
}
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var amp = String.fromCharCode(38);
var rlb = rb + lb;
var mke = function(x){ return lb + x + rb; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('div.course-index').find('nav').find('a').each(function(){
if ($(this).text().trim().startsWith("Search this course")){
search_module_url = $(this).attr('href');
console.log("search_module_url = ", search_module_url);
}
});
}
var go_to_search = function(){
get_search_module();
var sterm = $('#site-search-box').val();
// new_url = jump_to_url + "/Search_this_module/?q=" + sterm;
new_url = search_module_url + "?q=" + sterm;
console.log("sterm = ", sterm, " ; going to ", new_url);
window.location.href = new_url;
}
if (!$('#site-search-box').length){
$("nav.courseware").find("ol").append(lb + "section style='float:right'" + rlb + "input size='20'"
+ " id='site-search-box'"
+ rlb + "img src='" + course_static_url
+ "/images_search_glass.png'/" + rlb + "/input" + rlb + "/section" + rb);
}
$("#site-search-box").keypress(function(event) {
if (event.which == 13) {
event.preventDefault();
go_to_search();
}
});
// $('#site-search-box').bind("enterKey", go_to_search);
var get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_search();
var add_fix_transcript = function(){
if ($('div.wrap-instructor-info').length==0){
return;
}
$('div.xblock-student_view-video').each(function(key, vblock_e){
var vblock = $(vblock_e);
var vuid = vblock.data('usage-id').split('@');
var vid;
if (vuid.length==1){
vuid = vblock.data('usage-id').split(';_')
vid = vuid[5];
}else{
vid = vuid[2];
}
var mfnpre = vid.split("_video",1)[0];
var mfnid = mfnpre; // no periods
mfnpre = mfnpre.replace('8_370', '8.370'); // periods in gh filename
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var mke = function(x){ return lb + x + rb; }
var ftid = "fix_transcript_" + mfnid;
if (!$('#' + ftid).length){
var html = lb + "span id='" + ftid + "' style='float:right'" + rb + lb + "a href='#'" + rb;
html += "contribute transcript fix" + mke("/a") + mke("/span");
console.log("html = ", html);
vblock.after(html)
}
$('#' + ftid).click(function(){
var cst = $('ol.subtitles').find('li.current');
var cindex = Number(cst.data('index'));
var gurl;
if (mfnpre.endsWith('_cq_sol')){
gurl = "https://github.com/mitocw/content-mit-8370x-cq-sol-subtitles/blob/master/";
}else{
gurl = "https://github.com/mitocw/content-mit-8370x-subtitles/blob/master/";
}
gurl += mfnpre + ".txt#L" + String(cindex + 10 + 1);
console.log("going to ", gurl);
window.open(gurl, "MITx 8.370x subtitle source");
});
});
}
try{
add_fix_transcript();
}
catch(err){
console.log(err);
}
try{
var rb = String.fromCharCode(62);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 3000);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 8000);
}
catch(err){
console.log(err);
}
</script></span>
</div>
</div>
</div>
</div>
<div class="xblock xblock-public_view xblock-public_view-vertical" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@vertical+block@Mathematical_definition_of_density_matrices" data-init="VerticalStudentView" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="vertical" data-has-score="False" data-graded="True" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<h2 class="hd hd-2 unit-title">Mathematical definition of density matrices</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1e">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1e" data-init="XBlockToXModuleShim" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="video" data-has-score="False" data-graded="True" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Mathematical definition of density matrices</h3>
<div
id="video_M1L1e"
class="video closed"
data-metadata='{"speed": null, "publishCompletionUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1e/handler/publish_completion", "streams": "1.00:nIgdZfChUrA", "prioritizeHls": false, "completionEnabled": false, "autoAdvance": false, "captionDataDir": null, "transcriptLanguages": {"en": "English"}, "recordedYoutubeIsAvailable": true, "showCaptions": "true", "completionPercentage": 0.95, "saveStateUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1e/handler/xmodule_handler/save_user_state", "ytMetadataEndpoint": "", "duration": 0.0, "autohideHtml5": false, "transcriptLanguage": "en", "ytApiUrl": "https://www.youtube.com/iframe_api", "lmsRootURL": "https://openlearninglibrary.mit.edu", "sources": [], "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1e/handler/transcript/available_translations", "savedVideoPosition": 0.0, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1e/handler/transcript/translation/__lang__", "saveStateEnabled": false, "ytTestTimeout": 1500, "poster": null, "autoplay": false, "generalSpeed": 1.0, "start": 0.0, "end": 0.0}'
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="M1L1e"></div>
<h4 class="hd hd-4 video-error is-hidden">No playable video sources found.</h4>
<h4 class="hd hd-4 video-hls-error is-hidden">
Your browser does not support this video format. Try using a different browser.
</h4>
</div>
<div class="video-player-post"></div>
<div class="closed-captions"></div>
<div class="video-controls is-hidden">
<div>
<div class="vcr"><div class="vidtime">0:00 / 0:00</div></div>
<div class="secondary-controls"></div>
</div>
</div>
</div>
</div>
<div class="focus_grabber last"></div>
</div>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@site_search_box5">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@site_search_box5" data-init="XBlockToXModuleShim" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="html" data-has-score="False" data-graded="True" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.1x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = function(){
course_static_url = $('#dummy_course_static_link').attr('href').replace('/NONE', '');
jump_to_url = $('#dummy_jump_link').attr('href').replace('/NONE', '');
if (typeof String.prototype.startsWith != 'function') {
// see below for better implementation!
String.prototype.startsWith = function (str){
return this.indexOf(str) === 0;
};
}
if(typeof(String.prototype.trim) === "undefined")
{
String.prototype.trim = function()
{
return String(this).replace(/^\s+|\s+$/g, '');
};
}
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var amp = String.fromCharCode(38);
var rlb = rb + lb;
var mke = function(x){ return lb + x + rb; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('div.course-index').find('nav').find('a').each(function(){
if ($(this).text().trim().startsWith("Search this course")){
search_module_url = $(this).attr('href');
console.log("search_module_url = ", search_module_url);
}
});
}
var go_to_search = function(){
get_search_module();
var sterm = $('#site-search-box').val();
// new_url = jump_to_url + "/Search_this_module/?q=" + sterm;
new_url = search_module_url + "?q=" + sterm;
console.log("sterm = ", sterm, " ; going to ", new_url);
window.location.href = new_url;
}
if (!$('#site-search-box').length){
$("nav.courseware").find("ol").append(lb + "section style='float:right'" + rlb + "input size='20'"
+ " id='site-search-box'"
+ rlb + "img src='" + course_static_url
+ "/images_search_glass.png'/" + rlb + "/input" + rlb + "/section" + rb);
}
$("#site-search-box").keypress(function(event) {
if (event.which == 13) {
event.preventDefault();
go_to_search();
}
});
// $('#site-search-box').bind("enterKey", go_to_search);
var get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_search();
var add_fix_transcript = function(){
if ($('div.wrap-instructor-info').length==0){
return;
}
$('div.xblock-student_view-video').each(function(key, vblock_e){
var vblock = $(vblock_e);
var vuid = vblock.data('usage-id').split('@');
var vid;
if (vuid.length==1){
vuid = vblock.data('usage-id').split(';_')
vid = vuid[5];
}else{
vid = vuid[2];
}
var mfnpre = vid.split("_video",1)[0];
var mfnid = mfnpre; // no periods
mfnpre = mfnpre.replace('8_370', '8.370'); // periods in gh filename
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var mke = function(x){ return lb + x + rb; }
var ftid = "fix_transcript_" + mfnid;
if (!$('#' + ftid).length){
var html = lb + "span id='" + ftid + "' style='float:right'" + rb + lb + "a href='#'" + rb;
html += "contribute transcript fix" + mke("/a") + mke("/span");
console.log("html = ", html);
vblock.after(html)
}
$('#' + ftid).click(function(){
var cst = $('ol.subtitles').find('li.current');
var cindex = Number(cst.data('index'));
var gurl;
if (mfnpre.endsWith('_cq_sol')){
gurl = "https://github.com/mitocw/content-mit-8370x-cq-sol-subtitles/blob/master/";
}else{
gurl = "https://github.com/mitocw/content-mit-8370x-subtitles/blob/master/";
}
gurl += mfnpre + ".txt#L" + String(cindex + 10 + 1);
console.log("going to ", gurl);
window.open(gurl, "MITx 8.370x subtitle source");
});
});
}
try{
add_fix_transcript();
}
catch(err){
console.log(err);
}
try{
var rb = String.fromCharCode(62);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 3000);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 8000);
}
catch(err){
console.log(err);
}
</script></span>
</div>
</div>
</div>
</div>
<div class="xblock xblock-public_view xblock-public_view-vertical" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@vertical+block@CQ_Mathematical_criteria_satisfied_by_density_matrices" data-init="VerticalStudentView" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="vertical" data-has-score="False" data-graded="True" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<h2 class="hd hd-2 unit-title">CQ: Mathematical criteria satisfied by density matrices</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.1x+2T2018+type@problem+block@M1L1-cq-denmat-crit">
<div class="xblock xblock-public_view xblock-public_view-problem xmodule_display xmodule_ProblemBlock" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@problem+block@M1L1-cq-denmat-crit" data-init="XBlockToXModuleShim" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="problem" data-has-score="True" data-graded="True" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Problem"}
</script>
<div id="problem_M1L1-cq-denmat-crit" class="problems-wrapper" role="group"
aria-labelledby="M1L1-cq-denmat-crit-problem-title"
data-problem-id="block-v1:MITx+8.371.1x+2T2018+type@problem+block@M1L1-cq-denmat-crit" data-url="/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@problem+block@M1L1-cq-denmat-crit/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="M1L1-cq-denmat-crit-problem-title" aria-describedby="block-v1:MITx+8.371.1x+2T2018+type@problem+block@M1L1-cq-denmat-crit-problem-progress" tabindex="-1">
Mathematical criteria satisfied by density matrices
</h3>
<div class="problem-progress" id="block-v1:MITx+8.371.1x+2T2018+type@problem+block@M1L1-cq-denmat-crit-problem-progress"></div>
<div class="problem">
<div>
<p>
This is a concept question, provided to check your understanding of the previous video clip. </p>
<p>
Which of the following mathematical criteria must be satisfied for a matrix [mathjaxinline]\rho[/mathjaxinline] to be a density matrix? </p>
<p>
<div class="wrapper-problem-response" tabindex="-1" aria-label="Question 1" role="group"><div class="choicegroup capa_inputtype" id="inputtype_M1L1-cq-denmat-crit_2_1">
<fieldset aria-describedby="status_M1L1-cq-denmat-crit_2_1">
<div class="field">
<input type="checkbox" name="input_M1L1-cq-denmat-crit_2_1[]" id="input_M1L1-cq-denmat-crit_2_1_choice_0" class="field-input input-checkbox" value="choice_0"/><label id="M1L1-cq-denmat-crit_2_1-choice_0-label" for="input_M1L1-cq-denmat-crit_2_1_choice_0" class="response-label field-label label-inline" aria-describedby="status_M1L1-cq-denmat-crit_2_1">
<text>[mathjaxinline]\rho[/mathjaxinline] must be a square matrix</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_M1L1-cq-denmat-crit_2_1[]" id="input_M1L1-cq-denmat-crit_2_1_choice_1" class="field-input input-checkbox" value="choice_1"/><label id="M1L1-cq-denmat-crit_2_1-choice_1-label" for="input_M1L1-cq-denmat-crit_2_1_choice_1" class="response-label field-label label-inline" aria-describedby="status_M1L1-cq-denmat-crit_2_1">
<text>[mathjaxinline]\rho[/mathjaxinline] may have complex eignvalues, but they must have unit magnitude</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_M1L1-cq-denmat-crit_2_1[]" id="input_M1L1-cq-denmat-crit_2_1_choice_2" class="field-input input-checkbox" value="choice_2"/><label id="M1L1-cq-denmat-crit_2_1-choice_2-label" for="input_M1L1-cq-denmat-crit_2_1_choice_2" class="response-label field-label label-inline" aria-describedby="status_M1L1-cq-denmat-crit_2_1">
<text>[mathjaxinline]\rho[/mathjaxinline] cannot have eigenvalues equal to zero</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_M1L1-cq-denmat-crit_2_1[]" id="input_M1L1-cq-denmat-crit_2_1_choice_3" class="field-input input-checkbox" value="choice_3"/><label id="M1L1-cq-denmat-crit_2_1-choice_3-label" for="input_M1L1-cq-denmat-crit_2_1_choice_3" class="response-label field-label label-inline" aria-describedby="status_M1L1-cq-denmat-crit_2_1">
<text>[mathjaxinline]\rho[/mathjaxinline] must have non-negative eigenvalues</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_M1L1-cq-denmat-crit_2_1[]" id="input_M1L1-cq-denmat-crit_2_1_choice_4" class="field-input input-checkbox" value="choice_4"/><label id="M1L1-cq-denmat-crit_2_1-choice_4-label" for="input_M1L1-cq-denmat-crit_2_1_choice_4" class="response-label field-label label-inline" aria-describedby="status_M1L1-cq-denmat-crit_2_1">
<text>The sum of the eigenvalues of [mathjaxinline]\rho[/mathjaxinline] must equal one</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_M1L1-cq-denmat-crit_2_1[]" id="input_M1L1-cq-denmat-crit_2_1_choice_5" class="field-input input-checkbox" value="choice_5"/><label id="M1L1-cq-denmat-crit_2_1-choice_5-label" for="input_M1L1-cq-denmat-crit_2_1_choice_5" class="response-label field-label label-inline" aria-describedby="status_M1L1-cq-denmat-crit_2_1">
<text>[mathjaxinline]\rho[/mathjaxinline] must be traceless</text>
</label>
</div>
<span id="answer_M1L1-cq-denmat-crit_2_1"/>
</fieldset>
<div class="indicator-container">
<span class="status unanswered" id="status_M1L1-cq-denmat-crit_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="Mathematical criteria satisfied by density matrices" />
<div class="submit-attempt-container">
<button type="button" class="submit btn-brand" data-submitting="Submitting" data-value="Submit" data-should-enable-submit-button="True" aria-describedby="submission_feedback_M1L1-cq-denmat-crit" >
<span class="submit-label">Submit</span>
</button>
<div class="submission-feedback" id="submission_feedback_M1L1-cq-denmat-crit">
<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="M1L1-cq-denmat-crit-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="M1L1-cq-denmat-crit-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="M1L1-cq-denmat-crit-problem-title">Answers are displayed within the problem
</span>
<div class="notification-btn-wrapper">
<button type="button" class="btn btn-default btn-small notification-btn review-btn sr">Review</button>
</div>
</div>
</div>
"
data-graded="True">
<p class="loading-spinner">
<i class="fa fa-spinner fa-pulse fa-2x fa-fw"></i>
<span class="sr">Loading…</span>
</p>
</div>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_site_search_box1">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_site_search_box1" data-init="XBlockToXModuleShim" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="html" data-has-score="False" data-graded="True" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.1x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = function(){
course_static_url = $('#dummy_course_static_link').attr('href').replace('/NONE', '');
jump_to_url = $('#dummy_jump_link').attr('href').replace('/NONE', '');
if (typeof String.prototype.startsWith != 'function') {
// see below for better implementation!
String.prototype.startsWith = function (str){
return this.indexOf(str) === 0;
};
}
if(typeof(String.prototype.trim) === "undefined")
{
String.prototype.trim = function()
{
return String(this).replace(/^\s+|\s+$/g, '');
};
}
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var amp = String.fromCharCode(38);
var rlb = rb + lb;
var mke = function(x){ return lb + x + rb; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('div.course-index').find('nav').find('a').each(function(){
if ($(this).text().trim().startsWith("Search this course")){
search_module_url = $(this).attr('href');
console.log("search_module_url = ", search_module_url);
}
});
}
var go_to_search = function(){
get_search_module();
var sterm = $('#site-search-box').val();
// new_url = jump_to_url + "/Search_this_module/?q=" + sterm;
new_url = search_module_url + "?q=" + sterm;
console.log("sterm = ", sterm, " ; going to ", new_url);
window.location.href = new_url;
}
if (!$('#site-search-box').length){
$("nav.courseware").find("ol").append(lb + "section style='float:right'" + rlb + "input size='20'"
+ " id='site-search-box'"
+ rlb + "img src='" + course_static_url
+ "/images_search_glass.png'/" + rlb + "/input" + rlb + "/section" + rb);
}
$("#site-search-box").keypress(function(event) {
if (event.which == 13) {
event.preventDefault();
go_to_search();
}
});
// $('#site-search-box').bind("enterKey", go_to_search);
var get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_search();
var add_fix_transcript = function(){
if ($('div.wrap-instructor-info').length==0){
return;
}
$('div.xblock-student_view-video').each(function(key, vblock_e){
var vblock = $(vblock_e);
var vuid = vblock.data('usage-id').split('@');
var vid;
if (vuid.length==1){
vuid = vblock.data('usage-id').split(';_')
vid = vuid[5];
}else{
vid = vuid[2];
}
var mfnpre = vid.split("_video",1)[0];
var mfnid = mfnpre; // no periods
mfnpre = mfnpre.replace('8_370', '8.370'); // periods in gh filename
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var mke = function(x){ return lb + x + rb; }
var ftid = "fix_transcript_" + mfnid;
if (!$('#' + ftid).length){
var html = lb + "span id='" + ftid + "' style='float:right'" + rb + lb + "a href='#'" + rb;
html += "contribute transcript fix" + mke("/a") + mke("/span");
console.log("html = ", html);
vblock.after(html)
}
$('#' + ftid).click(function(){
var cst = $('ol.subtitles').find('li.current');
var cindex = Number(cst.data('index'));
var gurl;
if (mfnpre.endsWith('_cq_sol')){
gurl = "https://github.com/mitocw/content-mit-8370x-cq-sol-subtitles/blob/master/";
}else{
gurl = "https://github.com/mitocw/content-mit-8370x-subtitles/blob/master/";
}
gurl += mfnpre + ".txt#L" + String(cindex + 10 + 1);
console.log("going to ", gurl);
window.open(gurl, "MITx 8.370x subtitle source");
});
});
}
try{
add_fix_transcript();
}
catch(err){
console.log(err);
}
try{
var rb = String.fromCharCode(62);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 3000);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 8000);
}
catch(err){
console.log(err);
}
</script></span>
</div>
</div>
</div>
</div>
<div class="xblock xblock-public_view xblock-public_view-vertical" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@vertical+block@Special_cases_of_density_matrices_-_pure_states" data-init="VerticalStudentView" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="vertical" data-has-score="False" data-graded="True" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<h2 class="hd hd-2 unit-title">Special cases of density matrices - pure states</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1f">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1f" data-init="XBlockToXModuleShim" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="video" data-has-score="False" data-graded="True" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Special cases of density matrices - pure states</h3>
<div
id="video_M1L1f"
class="video closed"
data-metadata='{"speed": null, "publishCompletionUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1f/handler/publish_completion", "streams": "1.00:oj0aP6iysW0", "prioritizeHls": false, "completionEnabled": false, "autoAdvance": false, "captionDataDir": null, "transcriptLanguages": {"en": "English"}, "recordedYoutubeIsAvailable": true, "showCaptions": "true", "completionPercentage": 0.95, "saveStateUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1f/handler/xmodule_handler/save_user_state", "ytMetadataEndpoint": "", "duration": 0.0, "autohideHtml5": false, "transcriptLanguage": "en", "ytApiUrl": "https://www.youtube.com/iframe_api", "lmsRootURL": "https://openlearninglibrary.mit.edu", "sources": [], "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1f/handler/transcript/available_translations", "savedVideoPosition": 0.0, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1f/handler/transcript/translation/__lang__", "saveStateEnabled": false, "ytTestTimeout": 1500, "poster": null, "autoplay": false, "generalSpeed": 1.0, "start": 0.0, "end": 0.0}'
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="M1L1f"></div>
<h4 class="hd hd-4 video-error is-hidden">No playable video sources found.</h4>
<h4 class="hd hd-4 video-hls-error is-hidden">
Your browser does not support this video format. Try using a different browser.
</h4>
</div>
<div class="video-player-post"></div>
<div class="closed-captions"></div>
<div class="video-controls is-hidden">
<div>
<div class="vcr"><div class="vidtime">0:00 / 0:00</div></div>
<div class="secondary-controls"></div>
</div>
</div>
</div>
</div>
<div class="focus_grabber last"></div>
</div>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@site_search_box6">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@site_search_box6" data-init="XBlockToXModuleShim" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="html" data-has-score="False" data-graded="False" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.1x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = function(){
course_static_url = $('#dummy_course_static_link').attr('href').replace('/NONE', '');
jump_to_url = $('#dummy_jump_link').attr('href').replace('/NONE', '');
if (typeof String.prototype.startsWith != 'function') {
// see below for better implementation!
String.prototype.startsWith = function (str){
return this.indexOf(str) === 0;
};
}
if(typeof(String.prototype.trim) === "undefined")
{
String.prototype.trim = function()
{
return String(this).replace(/^\s+|\s+$/g, '');
};
}
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var amp = String.fromCharCode(38);
var rlb = rb + lb;
var mke = function(x){ return lb + x + rb; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('div.course-index').find('nav').find('a').each(function(){
if ($(this).text().trim().startsWith("Search this course")){
search_module_url = $(this).attr('href');
console.log("search_module_url = ", search_module_url);
}
});
}
var go_to_search = function(){
get_search_module();
var sterm = $('#site-search-box').val();
// new_url = jump_to_url + "/Search_this_module/?q=" + sterm;
new_url = search_module_url + "?q=" + sterm;
console.log("sterm = ", sterm, " ; going to ", new_url);
window.location.href = new_url;
}
if (!$('#site-search-box').length){
$("nav.courseware").find("ol").append(lb + "section style='float:right'" + rlb + "input size='20'"
+ " id='site-search-box'"
+ rlb + "img src='" + course_static_url
+ "/images_search_glass.png'/" + rlb + "/input" + rlb + "/section" + rb);
}
$("#site-search-box").keypress(function(event) {
if (event.which == 13) {
event.preventDefault();
go_to_search();
}
});
// $('#site-search-box').bind("enterKey", go_to_search);
var get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_search();
var add_fix_transcript = function(){
if ($('div.wrap-instructor-info').length==0){
return;
}
$('div.xblock-student_view-video').each(function(key, vblock_e){
var vblock = $(vblock_e);
var vuid = vblock.data('usage-id').split('@');
var vid;
if (vuid.length==1){
vuid = vblock.data('usage-id').split(';_')
vid = vuid[5];
}else{
vid = vuid[2];
}
var mfnpre = vid.split("_video",1)[0];
var mfnid = mfnpre; // no periods
mfnpre = mfnpre.replace('8_370', '8.370'); // periods in gh filename
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var mke = function(x){ return lb + x + rb; }
var ftid = "fix_transcript_" + mfnid;
if (!$('#' + ftid).length){
var html = lb + "span id='" + ftid + "' style='float:right'" + rb + lb + "a href='#'" + rb;
html += "contribute transcript fix" + mke("/a") + mke("/span");
console.log("html = ", html);
vblock.after(html)
}
$('#' + ftid).click(function(){
var cst = $('ol.subtitles').find('li.current');
var cindex = Number(cst.data('index'));
var gurl;
if (mfnpre.endsWith('_cq_sol')){
gurl = "https://github.com/mitocw/content-mit-8370x-cq-sol-subtitles/blob/master/";
}else{
gurl = "https://github.com/mitocw/content-mit-8370x-subtitles/blob/master/";
}
gurl += mfnpre + ".txt#L" + String(cindex + 10 + 1);
console.log("going to ", gurl);
window.open(gurl, "MITx 8.370x subtitle source");
});
});
}
try{
add_fix_transcript();
}
catch(err){
console.log(err);
}
try{
var rb = String.fromCharCode(62);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 3000);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 8000);
}
catch(err){
console.log(err);
}
</script></span>
</div>
</div>
</div>
</div>
<div class="xblock xblock-public_view xblock-public_view-vertical" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@vertical+block@Special_cases_of_density_matrices_-_probability_distributions" data-init="VerticalStudentView" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="vertical" data-has-score="False" data-graded="True" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<h2 class="hd hd-2 unit-title">Special cases of density matrices - probability distributions</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1g">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1g" data-init="XBlockToXModuleShim" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="video" data-has-score="False" data-graded="True" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Special cases of density matrices - probability distributions</h3>
<div
id="video_M1L1g"
class="video closed"
data-metadata='{"speed": null, "publishCompletionUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1g/handler/publish_completion", "streams": "1.00:5Sfk-ElG0yY", "prioritizeHls": false, "completionEnabled": false, "autoAdvance": false, "captionDataDir": null, "transcriptLanguages": {"en": "English"}, "recordedYoutubeIsAvailable": true, "showCaptions": "true", "completionPercentage": 0.95, "saveStateUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1g/handler/xmodule_handler/save_user_state", "ytMetadataEndpoint": "", "duration": 0.0, "autohideHtml5": false, "transcriptLanguage": "en", "ytApiUrl": "https://www.youtube.com/iframe_api", "lmsRootURL": "https://openlearninglibrary.mit.edu", "sources": [], "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1g/handler/transcript/available_translations", "savedVideoPosition": 0.0, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1g/handler/transcript/translation/__lang__", "saveStateEnabled": false, "ytTestTimeout": 1500, "poster": null, "autoplay": false, "generalSpeed": 1.0, "start": 0.0, "end": 0.0}'
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="M1L1g"></div>
<h4 class="hd hd-4 video-error is-hidden">No playable video sources found.</h4>
<h4 class="hd hd-4 video-hls-error is-hidden">
Your browser does not support this video format. Try using a different browser.
</h4>
</div>
<div class="video-player-post"></div>
<div class="closed-captions"></div>
<div class="video-controls is-hidden">
<div>
<div class="vcr"><div class="vidtime">0:00 / 0:00</div></div>
<div class="secondary-controls"></div>
</div>
</div>
</div>
</div>
<div class="focus_grabber last"></div>
</div>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@site_search_box7">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@site_search_box7" data-init="XBlockToXModuleShim" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="html" data-has-score="False" data-graded="True" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.1x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = function(){
course_static_url = $('#dummy_course_static_link').attr('href').replace('/NONE', '');
jump_to_url = $('#dummy_jump_link').attr('href').replace('/NONE', '');
if (typeof String.prototype.startsWith != 'function') {
// see below for better implementation!
String.prototype.startsWith = function (str){
return this.indexOf(str) === 0;
};
}
if(typeof(String.prototype.trim) === "undefined")
{
String.prototype.trim = function()
{
return String(this).replace(/^\s+|\s+$/g, '');
};
}
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var amp = String.fromCharCode(38);
var rlb = rb + lb;
var mke = function(x){ return lb + x + rb; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('div.course-index').find('nav').find('a').each(function(){
if ($(this).text().trim().startsWith("Search this course")){
search_module_url = $(this).attr('href');
console.log("search_module_url = ", search_module_url);
}
});
}
var go_to_search = function(){
get_search_module();
var sterm = $('#site-search-box').val();
// new_url = jump_to_url + "/Search_this_module/?q=" + sterm;
new_url = search_module_url + "?q=" + sterm;
console.log("sterm = ", sterm, " ; going to ", new_url);
window.location.href = new_url;
}
if (!$('#site-search-box').length){
$("nav.courseware").find("ol").append(lb + "section style='float:right'" + rlb + "input size='20'"
+ " id='site-search-box'"
+ rlb + "img src='" + course_static_url
+ "/images_search_glass.png'/" + rlb + "/input" + rlb + "/section" + rb);
}
$("#site-search-box").keypress(function(event) {
if (event.which == 13) {
event.preventDefault();
go_to_search();
}
});
// $('#site-search-box').bind("enterKey", go_to_search);
var get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_search();
var add_fix_transcript = function(){
if ($('div.wrap-instructor-info').length==0){
return;
}
$('div.xblock-student_view-video').each(function(key, vblock_e){
var vblock = $(vblock_e);
var vuid = vblock.data('usage-id').split('@');
var vid;
if (vuid.length==1){
vuid = vblock.data('usage-id').split(';_')
vid = vuid[5];
}else{
vid = vuid[2];
}
var mfnpre = vid.split("_video",1)[0];
var mfnid = mfnpre; // no periods
mfnpre = mfnpre.replace('8_370', '8.370'); // periods in gh filename
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var mke = function(x){ return lb + x + rb; }
var ftid = "fix_transcript_" + mfnid;
if (!$('#' + ftid).length){
var html = lb + "span id='" + ftid + "' style='float:right'" + rb + lb + "a href='#'" + rb;
html += "contribute transcript fix" + mke("/a") + mke("/span");
console.log("html = ", html);
vblock.after(html)
}
$('#' + ftid).click(function(){
var cst = $('ol.subtitles').find('li.current');
var cindex = Number(cst.data('index'));
var gurl;
if (mfnpre.endsWith('_cq_sol')){
gurl = "https://github.com/mitocw/content-mit-8370x-cq-sol-subtitles/blob/master/";
}else{
gurl = "https://github.com/mitocw/content-mit-8370x-subtitles/blob/master/";
}
gurl += mfnpre + ".txt#L" + String(cindex + 10 + 1);
console.log("going to ", gurl);
window.open(gurl, "MITx 8.370x subtitle source");
});
});
}
try{
add_fix_transcript();
}
catch(err){
console.log(err);
}
try{
var rb = String.fromCharCode(62);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 3000);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 8000);
}
catch(err){
console.log(err);
}
</script></span>
</div>
</div>
</div>
</div>
<div class="xblock xblock-public_view xblock-public_view-vertical" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@vertical+block@Eigenvalues_of_density_matrices_specify_a_probability_distribution" data-init="VerticalStudentView" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="vertical" data-has-score="False" data-graded="True" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<h2 class="hd hd-2 unit-title">Eigenvalues of density matrices specify a probability distribution</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1h">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1h" data-init="XBlockToXModuleShim" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="video" data-has-score="False" data-graded="True" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Eigenvalues of density matrices specify a probability distribution</h3>
<div
id="video_M1L1h"
class="video closed"
data-metadata='{"speed": null, "publishCompletionUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1h/handler/publish_completion", "streams": "1.00:hzpXplfcJM0", "prioritizeHls": false, "completionEnabled": false, "autoAdvance": false, "captionDataDir": null, "transcriptLanguages": {"en": "English"}, "recordedYoutubeIsAvailable": true, "showCaptions": "true", "completionPercentage": 0.95, "saveStateUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1h/handler/xmodule_handler/save_user_state", "ytMetadataEndpoint": "", "duration": 0.0, "autohideHtml5": false, "transcriptLanguage": "en", "ytApiUrl": "https://www.youtube.com/iframe_api", "lmsRootURL": "https://openlearninglibrary.mit.edu", "sources": [], "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1h/handler/transcript/available_translations", "savedVideoPosition": 0.0, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1h/handler/transcript/translation/__lang__", "saveStateEnabled": false, "ytTestTimeout": 1500, "poster": null, "autoplay": false, "generalSpeed": 1.0, "start": 0.0, "end": 0.0}'
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="M1L1h"></div>
<h4 class="hd hd-4 video-error is-hidden">No playable video sources found.</h4>
<h4 class="hd hd-4 video-hls-error is-hidden">
Your browser does not support this video format. Try using a different browser.
</h4>
</div>
<div class="video-player-post"></div>
<div class="closed-captions"></div>
<div class="video-controls is-hidden">
<div>
<div class="vcr"><div class="vidtime">0:00 / 0:00</div></div>
<div class="secondary-controls"></div>
</div>
</div>
</div>
</div>
<div class="focus_grabber last"></div>
</div>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@site_search_box8">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@site_search_box8" data-init="XBlockToXModuleShim" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="html" data-has-score="False" data-graded="True" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.1x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = function(){
course_static_url = $('#dummy_course_static_link').attr('href').replace('/NONE', '');
jump_to_url = $('#dummy_jump_link').attr('href').replace('/NONE', '');
if (typeof String.prototype.startsWith != 'function') {
// see below for better implementation!
String.prototype.startsWith = function (str){
return this.indexOf(str) === 0;
};
}
if(typeof(String.prototype.trim) === "undefined")
{
String.prototype.trim = function()
{
return String(this).replace(/^\s+|\s+$/g, '');
};
}
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var amp = String.fromCharCode(38);
var rlb = rb + lb;
var mke = function(x){ return lb + x + rb; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('div.course-index').find('nav').find('a').each(function(){
if ($(this).text().trim().startsWith("Search this course")){
search_module_url = $(this).attr('href');
console.log("search_module_url = ", search_module_url);
}
});
}
var go_to_search = function(){
get_search_module();
var sterm = $('#site-search-box').val();
// new_url = jump_to_url + "/Search_this_module/?q=" + sterm;
new_url = search_module_url + "?q=" + sterm;
console.log("sterm = ", sterm, " ; going to ", new_url);
window.location.href = new_url;
}
if (!$('#site-search-box').length){
$("nav.courseware").find("ol").append(lb + "section style='float:right'" + rlb + "input size='20'"
+ " id='site-search-box'"
+ rlb + "img src='" + course_static_url
+ "/images_search_glass.png'/" + rlb + "/input" + rlb + "/section" + rb);
}
$("#site-search-box").keypress(function(event) {
if (event.which == 13) {
event.preventDefault();
go_to_search();
}
});
// $('#site-search-box').bind("enterKey", go_to_search);
var get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_search();
var add_fix_transcript = function(){
if ($('div.wrap-instructor-info').length==0){
return;
}
$('div.xblock-student_view-video').each(function(key, vblock_e){
var vblock = $(vblock_e);
var vuid = vblock.data('usage-id').split('@');
var vid;
if (vuid.length==1){
vuid = vblock.data('usage-id').split(';_')
vid = vuid[5];
}else{
vid = vuid[2];
}
var mfnpre = vid.split("_video",1)[0];
var mfnid = mfnpre; // no periods
mfnpre = mfnpre.replace('8_370', '8.370'); // periods in gh filename
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var mke = function(x){ return lb + x + rb; }
var ftid = "fix_transcript_" + mfnid;
if (!$('#' + ftid).length){
var html = lb + "span id='" + ftid + "' style='float:right'" + rb + lb + "a href='#'" + rb;
html += "contribute transcript fix" + mke("/a") + mke("/span");
console.log("html = ", html);
vblock.after(html)
}
$('#' + ftid).click(function(){
var cst = $('ol.subtitles').find('li.current');
var cindex = Number(cst.data('index'));
var gurl;
if (mfnpre.endsWith('_cq_sol')){
gurl = "https://github.com/mitocw/content-mit-8370x-cq-sol-subtitles/blob/master/";
}else{
gurl = "https://github.com/mitocw/content-mit-8370x-subtitles/blob/master/";
}
gurl += mfnpre + ".txt#L" + String(cindex + 10 + 1);
console.log("going to ", gurl);
window.open(gurl, "MITx 8.370x subtitle source");
});
});
}
try{
add_fix_transcript();
}
catch(err){
console.log(err);
}
try{
var rb = String.fromCharCode(62);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 3000);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 8000);
}
catch(err){
console.log(err);
}
</script></span>
</div>
</div>
</div>
</div>
<div class="xblock xblock-public_view xblock-public_view-vertical" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@vertical+block@Special_cases_of_density_matrices_-_qubits" data-init="VerticalStudentView" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="vertical" data-has-score="False" data-graded="True" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<h2 class="hd hd-2 unit-title">Special cases of density matrices - qubits</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1j">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1j" data-init="XBlockToXModuleShim" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="video" data-has-score="False" data-graded="True" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Special cases of density matrices - qubits</h3>
<div
id="video_M1L1j"
class="video closed"
data-metadata='{"speed": null, "publishCompletionUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1j/handler/publish_completion", "streams": "1.00:U65NpHo8GZs", "prioritizeHls": false, "completionEnabled": false, "autoAdvance": false, "captionDataDir": null, "transcriptLanguages": {"en": "English"}, "recordedYoutubeIsAvailable": true, "showCaptions": "true", "completionPercentage": 0.95, "saveStateUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1j/handler/xmodule_handler/save_user_state", "ytMetadataEndpoint": "", "duration": 0.0, "autohideHtml5": false, "transcriptLanguage": "en", "ytApiUrl": "https://www.youtube.com/iframe_api", "lmsRootURL": "https://openlearninglibrary.mit.edu", "sources": [], "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1j/handler/transcript/available_translations", "savedVideoPosition": 0.0, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1j/handler/transcript/translation/__lang__", "saveStateEnabled": false, "ytTestTimeout": 1500, "poster": null, "autoplay": false, "generalSpeed": 1.0, "start": 0.0, "end": 0.0}'
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="M1L1j"></div>
<h4 class="hd hd-4 video-error is-hidden">No playable video sources found.</h4>
<h4 class="hd hd-4 video-hls-error is-hidden">
Your browser does not support this video format. Try using a different browser.
</h4>
</div>
<div class="video-player-post"></div>
<div class="closed-captions"></div>
<div class="video-controls is-hidden">
<div>
<div class="vcr"><div class="vidtime">0:00 / 0:00</div></div>
<div class="secondary-controls"></div>
</div>
</div>
</div>
</div>
<div class="focus_grabber last"></div>
</div>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@site_search_box9">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@site_search_box9" data-init="XBlockToXModuleShim" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="html" data-has-score="False" data-graded="True" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.1x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = function(){
course_static_url = $('#dummy_course_static_link').attr('href').replace('/NONE', '');
jump_to_url = $('#dummy_jump_link').attr('href').replace('/NONE', '');
if (typeof String.prototype.startsWith != 'function') {
// see below for better implementation!
String.prototype.startsWith = function (str){
return this.indexOf(str) === 0;
};
}
if(typeof(String.prototype.trim) === "undefined")
{
String.prototype.trim = function()
{
return String(this).replace(/^\s+|\s+$/g, '');
};
}
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var amp = String.fromCharCode(38);
var rlb = rb + lb;
var mke = function(x){ return lb + x + rb; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('div.course-index').find('nav').find('a').each(function(){
if ($(this).text().trim().startsWith("Search this course")){
search_module_url = $(this).attr('href');
console.log("search_module_url = ", search_module_url);
}
});
}
var go_to_search = function(){
get_search_module();
var sterm = $('#site-search-box').val();
// new_url = jump_to_url + "/Search_this_module/?q=" + sterm;
new_url = search_module_url + "?q=" + sterm;
console.log("sterm = ", sterm, " ; going to ", new_url);
window.location.href = new_url;
}
if (!$('#site-search-box').length){
$("nav.courseware").find("ol").append(lb + "section style='float:right'" + rlb + "input size='20'"
+ " id='site-search-box'"
+ rlb + "img src='" + course_static_url
+ "/images_search_glass.png'/" + rlb + "/input" + rlb + "/section" + rb);
}
$("#site-search-box").keypress(function(event) {
if (event.which == 13) {
event.preventDefault();
go_to_search();
}
});
// $('#site-search-box').bind("enterKey", go_to_search);
var get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_search();
var add_fix_transcript = function(){
if ($('div.wrap-instructor-info').length==0){
return;
}
$('div.xblock-student_view-video').each(function(key, vblock_e){
var vblock = $(vblock_e);
var vuid = vblock.data('usage-id').split('@');
var vid;
if (vuid.length==1){
vuid = vblock.data('usage-id').split(';_')
vid = vuid[5];
}else{
vid = vuid[2];
}
var mfnpre = vid.split("_video",1)[0];
var mfnid = mfnpre; // no periods
mfnpre = mfnpre.replace('8_370', '8.370'); // periods in gh filename
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var mke = function(x){ return lb + x + rb; }
var ftid = "fix_transcript_" + mfnid;
if (!$('#' + ftid).length){
var html = lb + "span id='" + ftid + "' style='float:right'" + rb + lb + "a href='#'" + rb;
html += "contribute transcript fix" + mke("/a") + mke("/span");
console.log("html = ", html);
vblock.after(html)
}
$('#' + ftid).click(function(){
var cst = $('ol.subtitles').find('li.current');
var cindex = Number(cst.data('index'));
var gurl;
if (mfnpre.endsWith('_cq_sol')){
gurl = "https://github.com/mitocw/content-mit-8370x-cq-sol-subtitles/blob/master/";
}else{
gurl = "https://github.com/mitocw/content-mit-8370x-subtitles/blob/master/";
}
gurl += mfnpre + ".txt#L" + String(cindex + 10 + 1);
console.log("going to ", gurl);
window.open(gurl, "MITx 8.370x subtitle source");
});
});
}
try{
add_fix_transcript();
}
catch(err){
console.log(err);
}
try{
var rb = String.fromCharCode(62);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 3000);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 8000);
}
catch(err){
console.log(err);
}
</script></span>
</div>
</div>
</div>
</div>
<div class="xblock xblock-public_view xblock-public_view-vertical" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@vertical+block@The_Bloch_sphere" data-init="VerticalStudentView" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="vertical" data-has-score="False" data-graded="True" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<h2 class="hd hd-2 unit-title">The Bloch sphere</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1k">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1k" data-init="XBlockToXModuleShim" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="video" data-has-score="False" data-graded="True" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">The Bloch sphere</h3>
<div
id="video_M1L1k"
class="video closed"
data-metadata='{"speed": null, "publishCompletionUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1k/handler/publish_completion", "streams": "1.00:HVnfm4CeCN0", "prioritizeHls": false, "completionEnabled": false, "autoAdvance": false, "captionDataDir": null, "transcriptLanguages": {"en": "English"}, "recordedYoutubeIsAvailable": true, "showCaptions": "true", "completionPercentage": 0.95, "saveStateUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1k/handler/xmodule_handler/save_user_state", "ytMetadataEndpoint": "", "duration": 0.0, "autohideHtml5": false, "transcriptLanguage": "en", "ytApiUrl": "https://www.youtube.com/iframe_api", "lmsRootURL": "https://openlearninglibrary.mit.edu", "sources": [], "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1k/handler/transcript/available_translations", "savedVideoPosition": 0.0, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1k/handler/transcript/translation/__lang__", "saveStateEnabled": false, "ytTestTimeout": 1500, "poster": null, "autoplay": false, "generalSpeed": 1.0, "start": 0.0, "end": 0.0}'
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="M1L1k"></div>
<h4 class="hd hd-4 video-error is-hidden">No playable video sources found.</h4>
<h4 class="hd hd-4 video-hls-error is-hidden">
Your browser does not support this video format. Try using a different browser.
</h4>
</div>
<div class="video-player-post"></div>
<div class="closed-captions"></div>
<div class="video-controls is-hidden">
<div>
<div class="vcr"><div class="vidtime">0:00 / 0:00</div></div>
<div class="secondary-controls"></div>
</div>
</div>
</div>
</div>
<div class="focus_grabber last"></div>
</div>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@site_search_box10">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@site_search_box10" data-init="XBlockToXModuleShim" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="html" data-has-score="False" data-graded="True" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.1x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = function(){
course_static_url = $('#dummy_course_static_link').attr('href').replace('/NONE', '');
jump_to_url = $('#dummy_jump_link').attr('href').replace('/NONE', '');
if (typeof String.prototype.startsWith != 'function') {
// see below for better implementation!
String.prototype.startsWith = function (str){
return this.indexOf(str) === 0;
};
}
if(typeof(String.prototype.trim) === "undefined")
{
String.prototype.trim = function()
{
return String(this).replace(/^\s+|\s+$/g, '');
};
}
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var amp = String.fromCharCode(38);
var rlb = rb + lb;
var mke = function(x){ return lb + x + rb; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('div.course-index').find('nav').find('a').each(function(){
if ($(this).text().trim().startsWith("Search this course")){
search_module_url = $(this).attr('href');
console.log("search_module_url = ", search_module_url);
}
});
}
var go_to_search = function(){
get_search_module();
var sterm = $('#site-search-box').val();
// new_url = jump_to_url + "/Search_this_module/?q=" + sterm;
new_url = search_module_url + "?q=" + sterm;
console.log("sterm = ", sterm, " ; going to ", new_url);
window.location.href = new_url;
}
if (!$('#site-search-box').length){
$("nav.courseware").find("ol").append(lb + "section style='float:right'" + rlb + "input size='20'"
+ " id='site-search-box'"
+ rlb + "img src='" + course_static_url
+ "/images_search_glass.png'/" + rlb + "/input" + rlb + "/section" + rb);
}
$("#site-search-box").keypress(function(event) {
if (event.which == 13) {
event.preventDefault();
go_to_search();
}
});
// $('#site-search-box').bind("enterKey", go_to_search);
var get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_search();
var add_fix_transcript = function(){
if ($('div.wrap-instructor-info').length==0){
return;
}
$('div.xblock-student_view-video').each(function(key, vblock_e){
var vblock = $(vblock_e);
var vuid = vblock.data('usage-id').split('@');
var vid;
if (vuid.length==1){
vuid = vblock.data('usage-id').split(';_')
vid = vuid[5];
}else{
vid = vuid[2];
}
var mfnpre = vid.split("_video",1)[0];
var mfnid = mfnpre; // no periods
mfnpre = mfnpre.replace('8_370', '8.370'); // periods in gh filename
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var mke = function(x){ return lb + x + rb; }
var ftid = "fix_transcript_" + mfnid;
if (!$('#' + ftid).length){
var html = lb + "span id='" + ftid + "' style='float:right'" + rb + lb + "a href='#'" + rb;
html += "contribute transcript fix" + mke("/a") + mke("/span");
console.log("html = ", html);
vblock.after(html)
}
$('#' + ftid).click(function(){
var cst = $('ol.subtitles').find('li.current');
var cindex = Number(cst.data('index'));
var gurl;
if (mfnpre.endsWith('_cq_sol')){
gurl = "https://github.com/mitocw/content-mit-8370x-cq-sol-subtitles/blob/master/";
}else{
gurl = "https://github.com/mitocw/content-mit-8370x-subtitles/blob/master/";
}
gurl += mfnpre + ".txt#L" + String(cindex + 10 + 1);
console.log("going to ", gurl);
window.open(gurl, "MITx 8.370x subtitle source");
});
});
}
try{
add_fix_transcript();
}
catch(err){
console.log(err);
}
try{
var rb = String.fromCharCode(62);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 3000);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 8000);
}
catch(err){
console.log(err);
}
</script></span>
</div>
</div>
</div>
</div>
<div class="xblock xblock-public_view xblock-public_view-vertical" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@vertical+block@CQ_Example_density_matrices" data-init="VerticalStudentView" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="vertical" data-has-score="False" data-graded="True" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<h2 class="hd hd-2 unit-title">CQ: Example density matrices</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.1x+2T2018+type@problem+block@M1L1-cq-denmats">
<div class="xblock xblock-public_view xblock-public_view-problem xmodule_display xmodule_ProblemBlock" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@problem+block@M1L1-cq-denmats" data-init="XBlockToXModuleShim" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="problem" data-has-score="True" data-graded="True" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Problem"}
</script>
<div id="problem_M1L1-cq-denmats" class="problems-wrapper" role="group"
aria-labelledby="M1L1-cq-denmats-problem-title"
data-problem-id="block-v1:MITx+8.371.1x+2T2018+type@problem+block@M1L1-cq-denmats" data-url="/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@problem+block@M1L1-cq-denmats/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="M1L1-cq-denmats-problem-title" aria-describedby="block-v1:MITx+8.371.1x+2T2018+type@problem+block@M1L1-cq-denmats-problem-progress" tabindex="-1">
Example density matrices
</h3>
<div class="problem-progress" id="block-v1:MITx+8.371.1x+2T2018+type@problem+block@M1L1-cq-denmats-problem-progress"></div>
<div class="problem">
<div>
<p>
This is a concept question, provided to check your understanding of the previous video clip. </p>
<p>
Prof. Harrow presented some example density matrices in lecture; which of the following statements about such density matrices [mathjaxinline]\rho[/mathjaxinline] are true? </p>
<p>
<div class="wrapper-problem-response" tabindex="-1" aria-label="Question 1" role="group"><div class="choicegroup capa_inputtype" id="inputtype_M1L1-cq-denmats_2_1">
<fieldset aria-describedby="status_M1L1-cq-denmats_2_1">
<div class="field">
<input type="checkbox" name="input_M1L1-cq-denmats_2_1[]" id="input_M1L1-cq-denmats_2_1_choice_0" class="field-input input-checkbox" value="choice_0"/><label id="M1L1-cq-denmats_2_1-choice_0-label" for="input_M1L1-cq-denmats_2_1_choice_0" class="response-label field-label label-inline" aria-describedby="status_M1L1-cq-denmats_2_1">
<text>The diagonal entries [mathjaxinline]\rho _{kk}[/mathjaxinline] of [mathjaxinline]\rho[/mathjaxinline] represent probabilities of measurements resulting in the [mathjaxinline]k^{\rm th}[/mathjaxinline] eigenstate of [mathjaxinline]\rho[/mathjaxinline]</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_M1L1-cq-denmats_2_1[]" id="input_M1L1-cq-denmats_2_1_choice_1" class="field-input input-checkbox" value="choice_1"/><label id="M1L1-cq-denmats_2_1-choice_1-label" for="input_M1L1-cq-denmats_2_1_choice_1" class="response-label field-label label-inline" aria-describedby="status_M1L1-cq-denmats_2_1">
<text>The diagonal entries [mathjaxinline]\rho _{kk}[/mathjaxinline] of [mathjaxinline]\rho[/mathjaxinline] represent the probabilities of measurements resulting basis element [mathjaxinline]|k\rangle[/mathjaxinline] of [mathjaxinline]\rho[/mathjaxinline]</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_M1L1-cq-denmats_2_1[]" id="input_M1L1-cq-denmats_2_1_choice_2" class="field-input input-checkbox" value="choice_2"/><label id="M1L1-cq-denmats_2_1-choice_2-label" for="input_M1L1-cq-denmats_2_1_choice_2" class="response-label field-label label-inline" aria-describedby="status_M1L1-cq-denmats_2_1">
<text>The density matrix for a qubit is [mathjaxinline]2\times 2[/mathjaxinline] and has four real degrees of freedom</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_M1L1-cq-denmats_2_1[]" id="input_M1L1-cq-denmats_2_1_choice_3" class="field-input input-checkbox" value="choice_3"/><label id="M1L1-cq-denmats_2_1-choice_3-label" for="input_M1L1-cq-denmats_2_1_choice_3" class="response-label field-label label-inline" aria-describedby="status_M1L1-cq-denmats_2_1">
<text>The density matrix for a qubit is [mathjaxinline]2\times 2[/mathjaxinline] and has three real degrees of freedom</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_M1L1-cq-denmats_2_1[]" id="input_M1L1-cq-denmats_2_1_choice_4" class="field-input input-checkbox" value="choice_4"/><label id="M1L1-cq-denmats_2_1-choice_4-label" for="input_M1L1-cq-denmats_2_1_choice_4" class="response-label field-label label-inline" aria-describedby="status_M1L1-cq-denmats_2_1">
<text>The [mathjaxinline]2\times 2[/mathjaxinline] identity matrix (divided by two) is a qubit density matrix represented by a point at the center of the Bloch sphere</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_M1L1-cq-denmats_2_1[]" id="input_M1L1-cq-denmats_2_1_choice_5" class="field-input input-checkbox" value="choice_5"/><label id="M1L1-cq-denmats_2_1-choice_5-label" for="input_M1L1-cq-denmats_2_1_choice_5" class="response-label field-label label-inline" aria-describedby="status_M1L1-cq-denmats_2_1">
<text>The [mathjaxinline]2\times 2[/mathjaxinline] identity matrix (divided by two) is a qubit density matrix represented by a point at the north pole of the Bloch sphere</text>
</label>
</div>
<span id="answer_M1L1-cq-denmats_2_1"/>
</fieldset>
<div class="indicator-container">
<span class="status unanswered" id="status_M1L1-cq-denmats_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="Example density matrices" />
<div class="submit-attempt-container">
<button type="button" class="submit btn-brand" data-submitting="Submitting" data-value="Submit" data-should-enable-submit-button="True" aria-describedby="submission_feedback_M1L1-cq-denmats" >
<span class="submit-label">Submit</span>
</button>
<div class="submission-feedback" id="submission_feedback_M1L1-cq-denmats">
<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="M1L1-cq-denmats-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="M1L1-cq-denmats-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="M1L1-cq-denmats-problem-title">Answers are displayed within the problem
</span>
<div class="notification-btn-wrapper">
<button type="button" class="btn btn-default btn-small notification-btn review-btn sr">Review</button>
</div>
</div>
</div>
"
data-graded="True">
<p class="loading-spinner">
<i class="fa fa-spinner fa-pulse fa-2x fa-fw"></i>
<span class="sr">Loading…</span>
</p>
</div>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_site_search_box2">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_site_search_box2" data-init="XBlockToXModuleShim" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="html" data-has-score="False" data-graded="True" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.1x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = function(){
course_static_url = $('#dummy_course_static_link').attr('href').replace('/NONE', '');
jump_to_url = $('#dummy_jump_link').attr('href').replace('/NONE', '');
if (typeof String.prototype.startsWith != 'function') {
// see below for better implementation!
String.prototype.startsWith = function (str){
return this.indexOf(str) === 0;
};
}
if(typeof(String.prototype.trim) === "undefined")
{
String.prototype.trim = function()
{
return String(this).replace(/^\s+|\s+$/g, '');
};
}
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var amp = String.fromCharCode(38);
var rlb = rb + lb;
var mke = function(x){ return lb + x + rb; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('div.course-index').find('nav').find('a').each(function(){
if ($(this).text().trim().startsWith("Search this course")){
search_module_url = $(this).attr('href');
console.log("search_module_url = ", search_module_url);
}
});
}
var go_to_search = function(){
get_search_module();
var sterm = $('#site-search-box').val();
// new_url = jump_to_url + "/Search_this_module/?q=" + sterm;
new_url = search_module_url + "?q=" + sterm;
console.log("sterm = ", sterm, " ; going to ", new_url);
window.location.href = new_url;
}
if (!$('#site-search-box').length){
$("nav.courseware").find("ol").append(lb + "section style='float:right'" + rlb + "input size='20'"
+ " id='site-search-box'"
+ rlb + "img src='" + course_static_url
+ "/images_search_glass.png'/" + rlb + "/input" + rlb + "/section" + rb);
}
$("#site-search-box").keypress(function(event) {
if (event.which == 13) {
event.preventDefault();
go_to_search();
}
});
// $('#site-search-box').bind("enterKey", go_to_search);
var get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_search();
var add_fix_transcript = function(){
if ($('div.wrap-instructor-info').length==0){
return;
}
$('div.xblock-student_view-video').each(function(key, vblock_e){
var vblock = $(vblock_e);
var vuid = vblock.data('usage-id').split('@');
var vid;
if (vuid.length==1){
vuid = vblock.data('usage-id').split(';_')
vid = vuid[5];
}else{
vid = vuid[2];
}
var mfnpre = vid.split("_video",1)[0];
var mfnid = mfnpre; // no periods
mfnpre = mfnpre.replace('8_370', '8.370'); // periods in gh filename
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var mke = function(x){ return lb + x + rb; }
var ftid = "fix_transcript_" + mfnid;
if (!$('#' + ftid).length){
var html = lb + "span id='" + ftid + "' style='float:right'" + rb + lb + "a href='#'" + rb;
html += "contribute transcript fix" + mke("/a") + mke("/span");
console.log("html = ", html);
vblock.after(html)
}
$('#' + ftid).click(function(){
var cst = $('ol.subtitles').find('li.current');
var cindex = Number(cst.data('index'));
var gurl;
if (mfnpre.endsWith('_cq_sol')){
gurl = "https://github.com/mitocw/content-mit-8370x-cq-sol-subtitles/blob/master/";
}else{
gurl = "https://github.com/mitocw/content-mit-8370x-subtitles/blob/master/";
}
gurl += mfnpre + ".txt#L" + String(cindex + 10 + 1);
console.log("going to ", gurl);
window.open(gurl, "MITx 8.370x subtitle source");
});
});
}
try{
add_fix_transcript();
}
catch(err){
console.log(err);
}
try{
var rb = String.fromCharCode(62);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 3000);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 8000);
}
catch(err){
console.log(err);
}
</script></span>
</div>
</div>
</div>
</div>
<div class="xblock xblock-public_view xblock-public_view-vertical" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@vertical+block@Deterministic_classical_and_quantum_maps" data-init="VerticalStudentView" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="vertical" data-has-score="False" data-graded="True" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<h2 class="hd hd-2 unit-title">Deterministic classical and quantum maps</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1m">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1m" data-init="XBlockToXModuleShim" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="video" data-has-score="False" data-graded="True" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Deterministic classical and quantum maps</h3>
<div
id="video_M1L1m"
class="video closed"
data-metadata='{"speed": null, "publishCompletionUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1m/handler/publish_completion", "streams": "1.00:gQfkxYgs7Ao", "prioritizeHls": false, "completionEnabled": false, "autoAdvance": false, "captionDataDir": null, "transcriptLanguages": {"en": "English"}, "recordedYoutubeIsAvailable": true, "showCaptions": "true", "completionPercentage": 0.95, "saveStateUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1m/handler/xmodule_handler/save_user_state", "ytMetadataEndpoint": "", "duration": 0.0, "autohideHtml5": false, "transcriptLanguage": "en", "ytApiUrl": "https://www.youtube.com/iframe_api", "lmsRootURL": "https://openlearninglibrary.mit.edu", "sources": [], "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1m/handler/transcript/available_translations", "savedVideoPosition": 0.0, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1m/handler/transcript/translation/__lang__", "saveStateEnabled": false, "ytTestTimeout": 1500, "poster": null, "autoplay": false, "generalSpeed": 1.0, "start": 0.0, "end": 0.0}'
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="M1L1m"></div>
<h4 class="hd hd-4 video-error is-hidden">No playable video sources found.</h4>
<h4 class="hd hd-4 video-hls-error is-hidden">
Your browser does not support this video format. Try using a different browser.
</h4>
</div>
<div class="video-player-post"></div>
<div class="closed-captions"></div>
<div class="video-controls is-hidden">
<div>
<div class="vcr"><div class="vidtime">0:00 / 0:00</div></div>
<div class="secondary-controls"></div>
</div>
</div>
</div>
</div>
<div class="focus_grabber last"></div>
</div>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@site_search_box11">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@site_search_box11" data-init="XBlockToXModuleShim" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="html" data-has-score="False" data-graded="True" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.1x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = function(){
course_static_url = $('#dummy_course_static_link').attr('href').replace('/NONE', '');
jump_to_url = $('#dummy_jump_link').attr('href').replace('/NONE', '');
if (typeof String.prototype.startsWith != 'function') {
// see below for better implementation!
String.prototype.startsWith = function (str){
return this.indexOf(str) === 0;
};
}
if(typeof(String.prototype.trim) === "undefined")
{
String.prototype.trim = function()
{
return String(this).replace(/^\s+|\s+$/g, '');
};
}
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var amp = String.fromCharCode(38);
var rlb = rb + lb;
var mke = function(x){ return lb + x + rb; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('div.course-index').find('nav').find('a').each(function(){
if ($(this).text().trim().startsWith("Search this course")){
search_module_url = $(this).attr('href');
console.log("search_module_url = ", search_module_url);
}
});
}
var go_to_search = function(){
get_search_module();
var sterm = $('#site-search-box').val();
// new_url = jump_to_url + "/Search_this_module/?q=" + sterm;
new_url = search_module_url + "?q=" + sterm;
console.log("sterm = ", sterm, " ; going to ", new_url);
window.location.href = new_url;
}
if (!$('#site-search-box').length){
$("nav.courseware").find("ol").append(lb + "section style='float:right'" + rlb + "input size='20'"
+ " id='site-search-box'"
+ rlb + "img src='" + course_static_url
+ "/images_search_glass.png'/" + rlb + "/input" + rlb + "/section" + rb);
}
$("#site-search-box").keypress(function(event) {
if (event.which == 13) {
event.preventDefault();
go_to_search();
}
});
// $('#site-search-box').bind("enterKey", go_to_search);
var get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_search();
var add_fix_transcript = function(){
if ($('div.wrap-instructor-info').length==0){
return;
}
$('div.xblock-student_view-video').each(function(key, vblock_e){
var vblock = $(vblock_e);
var vuid = vblock.data('usage-id').split('@');
var vid;
if (vuid.length==1){
vuid = vblock.data('usage-id').split(';_')
vid = vuid[5];
}else{
vid = vuid[2];
}
var mfnpre = vid.split("_video",1)[0];
var mfnid = mfnpre; // no periods
mfnpre = mfnpre.replace('8_370', '8.370'); // periods in gh filename
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var mke = function(x){ return lb + x + rb; }
var ftid = "fix_transcript_" + mfnid;
if (!$('#' + ftid).length){
var html = lb + "span id='" + ftid + "' style='float:right'" + rb + lb + "a href='#'" + rb;
html += "contribute transcript fix" + mke("/a") + mke("/span");
console.log("html = ", html);
vblock.after(html)
}
$('#' + ftid).click(function(){
var cst = $('ol.subtitles').find('li.current');
var cindex = Number(cst.data('index'));
var gurl;
if (mfnpre.endsWith('_cq_sol')){
gurl = "https://github.com/mitocw/content-mit-8370x-cq-sol-subtitles/blob/master/";
}else{
gurl = "https://github.com/mitocw/content-mit-8370x-subtitles/blob/master/";
}
gurl += mfnpre + ".txt#L" + String(cindex + 10 + 1);
console.log("going to ", gurl);
window.open(gurl, "MITx 8.370x subtitle source");
});
});
}
try{
add_fix_transcript();
}
catch(err){
console.log(err);
}
try{
var rb = String.fromCharCode(62);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 3000);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 8000);
}
catch(err){
console.log(err);
}
</script></span>
</div>
</div>
</div>
</div>
<div class="xblock xblock-public_view xblock-public_view-vertical" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@vertical+block@Classical_random_maps" data-init="VerticalStudentView" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="vertical" data-has-score="False" data-graded="True" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<h2 class="hd hd-2 unit-title">Classical random maps</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1n">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1n" data-init="XBlockToXModuleShim" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="video" data-has-score="False" data-graded="True" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Classical random maps</h3>
<div
id="video_M1L1n"
class="video closed"
data-metadata='{"speed": null, "publishCompletionUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1n/handler/publish_completion", "streams": "1.00:Z95-2I-y0qA", "prioritizeHls": false, "completionEnabled": false, "autoAdvance": false, "captionDataDir": null, "transcriptLanguages": {"en": "English"}, "recordedYoutubeIsAvailable": true, "showCaptions": "true", "completionPercentage": 0.95, "saveStateUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1n/handler/xmodule_handler/save_user_state", "ytMetadataEndpoint": "", "duration": 0.0, "autohideHtml5": false, "transcriptLanguage": "en", "ytApiUrl": "https://www.youtube.com/iframe_api", "lmsRootURL": "https://openlearninglibrary.mit.edu", "sources": [], "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1n/handler/transcript/available_translations", "savedVideoPosition": 0.0, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1n/handler/transcript/translation/__lang__", "saveStateEnabled": false, "ytTestTimeout": 1500, "poster": null, "autoplay": false, "generalSpeed": 1.0, "start": 0.0, "end": 0.0}'
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="M1L1n"></div>
<h4 class="hd hd-4 video-error is-hidden">No playable video sources found.</h4>
<h4 class="hd hd-4 video-hls-error is-hidden">
Your browser does not support this video format. Try using a different browser.
</h4>
</div>
<div class="video-player-post"></div>
<div class="closed-captions"></div>
<div class="video-controls is-hidden">
<div>
<div class="vcr"><div class="vidtime">0:00 / 0:00</div></div>
<div class="secondary-controls"></div>
</div>
</div>
</div>
</div>
<div class="focus_grabber last"></div>
</div>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@site_search_box12">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@site_search_box12" data-init="XBlockToXModuleShim" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="html" data-has-score="False" data-graded="False" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.1x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = function(){
course_static_url = $('#dummy_course_static_link').attr('href').replace('/NONE', '');
jump_to_url = $('#dummy_jump_link').attr('href').replace('/NONE', '');
if (typeof String.prototype.startsWith != 'function') {
// see below for better implementation!
String.prototype.startsWith = function (str){
return this.indexOf(str) === 0;
};
}
if(typeof(String.prototype.trim) === "undefined")
{
String.prototype.trim = function()
{
return String(this).replace(/^\s+|\s+$/g, '');
};
}
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var amp = String.fromCharCode(38);
var rlb = rb + lb;
var mke = function(x){ return lb + x + rb; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('div.course-index').find('nav').find('a').each(function(){
if ($(this).text().trim().startsWith("Search this course")){
search_module_url = $(this).attr('href');
console.log("search_module_url = ", search_module_url);
}
});
}
var go_to_search = function(){
get_search_module();
var sterm = $('#site-search-box').val();
// new_url = jump_to_url + "/Search_this_module/?q=" + sterm;
new_url = search_module_url + "?q=" + sterm;
console.log("sterm = ", sterm, " ; going to ", new_url);
window.location.href = new_url;
}
if (!$('#site-search-box').length){
$("nav.courseware").find("ol").append(lb + "section style='float:right'" + rlb + "input size='20'"
+ " id='site-search-box'"
+ rlb + "img src='" + course_static_url
+ "/images_search_glass.png'/" + rlb + "/input" + rlb + "/section" + rb);
}
$("#site-search-box").keypress(function(event) {
if (event.which == 13) {
event.preventDefault();
go_to_search();
}
});
// $('#site-search-box').bind("enterKey", go_to_search);
var get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_search();
var add_fix_transcript = function(){
if ($('div.wrap-instructor-info').length==0){
return;
}
$('div.xblock-student_view-video').each(function(key, vblock_e){
var vblock = $(vblock_e);
var vuid = vblock.data('usage-id').split('@');
var vid;
if (vuid.length==1){
vuid = vblock.data('usage-id').split(';_')
vid = vuid[5];
}else{
vid = vuid[2];
}
var mfnpre = vid.split("_video",1)[0];
var mfnid = mfnpre; // no periods
mfnpre = mfnpre.replace('8_370', '8.370'); // periods in gh filename
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var mke = function(x){ return lb + x + rb; }
var ftid = "fix_transcript_" + mfnid;
if (!$('#' + ftid).length){
var html = lb + "span id='" + ftid + "' style='float:right'" + rb + lb + "a href='#'" + rb;
html += "contribute transcript fix" + mke("/a") + mke("/span");
console.log("html = ", html);
vblock.after(html)
}
$('#' + ftid).click(function(){
var cst = $('ol.subtitles').find('li.current');
var cindex = Number(cst.data('index'));
var gurl;
if (mfnpre.endsWith('_cq_sol')){
gurl = "https://github.com/mitocw/content-mit-8370x-cq-sol-subtitles/blob/master/";
}else{
gurl = "https://github.com/mitocw/content-mit-8370x-subtitles/blob/master/";
}
gurl += mfnpre + ".txt#L" + String(cindex + 10 + 1);
console.log("going to ", gurl);
window.open(gurl, "MITx 8.370x subtitle source");
});
});
}
try{
add_fix_transcript();
}
catch(err){
console.log(err);
}
try{
var rb = String.fromCharCode(62);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 3000);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 8000);
}
catch(err){
console.log(err);
}
</script></span>
</div>
</div>
</div>
</div>
<div class="xblock xblock-public_view xblock-public_view-vertical" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@vertical+block@Introduction_to_quantum_operations" data-init="VerticalStudentView" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="vertical" data-has-score="False" data-graded="True" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<h2 class="hd hd-2 unit-title">Introduction to quantum operations</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1o">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1o" data-init="XBlockToXModuleShim" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="video" data-has-score="False" data-graded="True" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Introduction to quantum operations</h3>
<div
id="video_M1L1o"
class="video closed"
data-metadata='{"speed": null, "publishCompletionUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1o/handler/publish_completion", "streams": "1.00:RmeijTRMI3E", "prioritizeHls": false, "completionEnabled": false, "autoAdvance": false, "captionDataDir": null, "transcriptLanguages": {"en": "English"}, "recordedYoutubeIsAvailable": true, "showCaptions": "true", "completionPercentage": 0.95, "saveStateUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1o/handler/xmodule_handler/save_user_state", "ytMetadataEndpoint": "", "duration": 0.0, "autohideHtml5": false, "transcriptLanguage": "en", "ytApiUrl": "https://www.youtube.com/iframe_api", "lmsRootURL": "https://openlearninglibrary.mit.edu", "sources": [], "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1o/handler/transcript/available_translations", "savedVideoPosition": 0.0, "transcriptTranslationUrl": "/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@video+block@M1L1o/handler/transcript/translation/__lang__", "saveStateEnabled": false, "ytTestTimeout": 1500, "poster": null, "autoplay": false, "generalSpeed": 1.0, "start": 0.0, "end": 0.0}'
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="M1L1o"></div>
<h4 class="hd hd-4 video-error is-hidden">No playable video sources found.</h4>
<h4 class="hd hd-4 video-hls-error is-hidden">
Your browser does not support this video format. Try using a different browser.
</h4>
</div>
<div class="video-player-post"></div>
<div class="closed-captions"></div>
<div class="video-controls is-hidden">
<div>
<div class="vcr"><div class="vidtime">0:00 / 0:00</div></div>
<div class="secondary-controls"></div>
</div>
</div>
</div>
</div>
<div class="focus_grabber last"></div>
</div>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@site_search_box13">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@site_search_box13" data-init="XBlockToXModuleShim" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="html" data-has-score="False" data-graded="True" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.1x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = function(){
course_static_url = $('#dummy_course_static_link').attr('href').replace('/NONE', '');
jump_to_url = $('#dummy_jump_link').attr('href').replace('/NONE', '');
if (typeof String.prototype.startsWith != 'function') {
// see below for better implementation!
String.prototype.startsWith = function (str){
return this.indexOf(str) === 0;
};
}
if(typeof(String.prototype.trim) === "undefined")
{
String.prototype.trim = function()
{
return String(this).replace(/^\s+|\s+$/g, '');
};
}
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var amp = String.fromCharCode(38);
var rlb = rb + lb;
var mke = function(x){ return lb + x + rb; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('div.course-index').find('nav').find('a').each(function(){
if ($(this).text().trim().startsWith("Search this course")){
search_module_url = $(this).attr('href');
console.log("search_module_url = ", search_module_url);
}
});
}
var go_to_search = function(){
get_search_module();
var sterm = $('#site-search-box').val();
// new_url = jump_to_url + "/Search_this_module/?q=" + sterm;
new_url = search_module_url + "?q=" + sterm;
console.log("sterm = ", sterm, " ; going to ", new_url);
window.location.href = new_url;
}
if (!$('#site-search-box').length){
$("nav.courseware").find("ol").append(lb + "section style='float:right'" + rlb + "input size='20'"
+ " id='site-search-box'"
+ rlb + "img src='" + course_static_url
+ "/images_search_glass.png'/" + rlb + "/input" + rlb + "/section" + rb);
}
$("#site-search-box").keypress(function(event) {
if (event.which == 13) {
event.preventDefault();
go_to_search();
}
});
// $('#site-search-box').bind("enterKey", go_to_search);
var get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_search();
var add_fix_transcript = function(){
if ($('div.wrap-instructor-info').length==0){
return;
}
$('div.xblock-student_view-video').each(function(key, vblock_e){
var vblock = $(vblock_e);
var vuid = vblock.data('usage-id').split('@');
var vid;
if (vuid.length==1){
vuid = vblock.data('usage-id').split(';_')
vid = vuid[5];
}else{
vid = vuid[2];
}
var mfnpre = vid.split("_video",1)[0];
var mfnid = mfnpre; // no periods
mfnpre = mfnpre.replace('8_370', '8.370'); // periods in gh filename
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var mke = function(x){ return lb + x + rb; }
var ftid = "fix_transcript_" + mfnid;
if (!$('#' + ftid).length){
var html = lb + "span id='" + ftid + "' style='float:right'" + rb + lb + "a href='#'" + rb;
html += "contribute transcript fix" + mke("/a") + mke("/span");
console.log("html = ", html);
vblock.after(html)
}
$('#' + ftid).click(function(){
var cst = $('ol.subtitles').find('li.current');
var cindex = Number(cst.data('index'));
var gurl;
if (mfnpre.endsWith('_cq_sol')){
gurl = "https://github.com/mitocw/content-mit-8370x-cq-sol-subtitles/blob/master/";
}else{
gurl = "https://github.com/mitocw/content-mit-8370x-subtitles/blob/master/";
}
gurl += mfnpre + ".txt#L" + String(cindex + 10 + 1);
console.log("going to ", gurl);
window.open(gurl, "MITx 8.370x subtitle source");
});
});
}
try{
add_fix_transcript();
}
catch(err){
console.log(err);
}
try{
var rb = String.fromCharCode(62);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 3000);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 8000);
}
catch(err){
console.log(err);
}
</script></span>
</div>
</div>
</div>
</div>
<div class="xblock xblock-public_view xblock-public_view-vertical" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@vertical+block@CQ_Quantum_operations" data-init="VerticalStudentView" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="vertical" data-has-score="False" data-graded="True" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<h2 class="hd hd-2 unit-title">CQ: Quantum operations</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+8.371.1x+2T2018+type@problem+block@M1L1-cq-qop">
<div class="xblock xblock-public_view xblock-public_view-problem xmodule_display xmodule_ProblemBlock" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@problem+block@M1L1-cq-qop" data-init="XBlockToXModuleShim" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="problem" data-has-score="True" data-graded="True" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Problem"}
</script>
<div id="problem_M1L1-cq-qop" class="problems-wrapper" role="group"
aria-labelledby="M1L1-cq-qop-problem-title"
data-problem-id="block-v1:MITx+8.371.1x+2T2018+type@problem+block@M1L1-cq-qop" data-url="/courses/course-v1:MITx+8.371.1x+2T2018/xblock/block-v1:MITx+8.371.1x+2T2018+type@problem+block@M1L1-cq-qop/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="M1L1-cq-qop-problem-title" aria-describedby="block-v1:MITx+8.371.1x+2T2018+type@problem+block@M1L1-cq-qop-problem-progress" tabindex="-1">
Quantum operations
</h3>
<div class="problem-progress" id="block-v1:MITx+8.371.1x+2T2018+type@problem+block@M1L1-cq-qop-problem-progress"></div>
<div class="problem">
<div>
<p>
This is a concept question, provided to check your understanding of the previous video clip. </p>
<p>
Check all the following which are true, regarding quantum operations: </p>
<p>
<div class="wrapper-problem-response" tabindex="-1" aria-label="Question 1" role="group"><div class="choicegroup capa_inputtype" id="inputtype_M1L1-cq-qop_2_1">
<fieldset aria-describedby="status_M1L1-cq-qop_2_1">
<div class="field">
<input type="checkbox" name="input_M1L1-cq-qop_2_1[]" id="input_M1L1-cq-qop_2_1_choice_0" class="field-input input-checkbox" value="choice_0"/><label id="M1L1-cq-qop_2_1-choice_0-label" for="input_M1L1-cq-qop_2_1_choice_0" class="response-label field-label label-inline" aria-describedby="status_M1L1-cq-qop_2_1">
<text>Unitary operations are an example of quantum operations.</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_M1L1-cq-qop_2_1[]" id="input_M1L1-cq-qop_2_1_choice_1" class="field-input input-checkbox" value="choice_1"/><label id="M1L1-cq-qop_2_1-choice_1-label" for="input_M1L1-cq-qop_2_1_choice_1" class="response-label field-label label-inline" aria-describedby="status_M1L1-cq-qop_2_1">
<text>Random substitution of a qubit by [mathjaxinline]|0\rangle \langle 0|[/mathjaxinline] can be described by a quantum operation.</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_M1L1-cq-qop_2_1[]" id="input_M1L1-cq-qop_2_1_choice_2" class="field-input input-checkbox" value="choice_2"/><label id="M1L1-cq-qop_2_1-choice_2-label" for="input_M1L1-cq-qop_2_1_choice_2" class="response-label field-label label-inline" aria-describedby="status_M1L1-cq-qop_2_1">
<text>Projective measurement of a quantum state can be represented by a quantum operation.</text>
</label>
</div>
<div class="field">
<input type="checkbox" name="input_M1L1-cq-qop_2_1[]" id="input_M1L1-cq-qop_2_1_choice_3" class="field-input input-checkbox" value="choice_3"/><label id="M1L1-cq-qop_2_1-choice_3-label" for="input_M1L1-cq-qop_2_1_choice_3" class="response-label field-label label-inline" aria-describedby="status_M1L1-cq-qop_2_1">
<text>Measurement of two of the three qubits in a three-qubit state, can be represented by a quantum operation.</text>
</label>
</div>
<span id="answer_M1L1-cq-qop_2_1"/>
</fieldset>
<div class="indicator-container">
<span class="status unanswered" id="status_M1L1-cq-qop_2_1" data-tooltip="Not yet answered.">
<span class="sr">unanswered</span><span class="status-icon" aria-hidden="true"/>
</span>
</div>
</div></div>
</p>
</div>
<div class="action">
<input type="hidden" name="problem_id" value="Quantum operations" />
<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_M1L1-cq-qop" >
<span class="submit-label">Submit</span>
</button>
<div class="submission-feedback" id="submission_feedback_M1L1-cq-qop">
<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="M1L1-cq-qop-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="M1L1-cq-qop-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="M1L1-cq-qop-problem-title">Answers are displayed within the problem
</span>
<div class="notification-btn-wrapper">
<button type="button" class="btn btn-default btn-small notification-btn review-btn sr">Review</button>
</div>
</div>
</div>
"
data-graded="True">
<p class="loading-spinner">
<i class="fa fa-spinner fa-pulse fa-2x fa-fw"></i>
<span class="sr">Loading…</span>
</p>
</div>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_site_search_box3">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-runtime-class="LmsRuntime" data-usage-id="block-v1:MITx+8.371.1x+2T2018+type@html+block@html_site_search_box3" data-init="XBlockToXModuleShim" data-runtime-version="1" data-course-id="course-v1:MITx+8.371.1x+2T2018" data-block-type="html" data-has-score="False" data-graded="True" data-request-token="3d46e4d4fe4c11ee9b8b16fff75c5923">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+8.371.1x+2T2018+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+8.371.1x+2T2018/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = function(){
course_static_url = $('#dummy_course_static_link').attr('href').replace('/NONE', '');
jump_to_url = $('#dummy_jump_link').attr('href').replace('/NONE', '');
if (typeof String.prototype.startsWith != 'function') {
// see below for better implementation!
String.prototype.startsWith = function (str){
return this.indexOf(str) === 0;
};
}
if(typeof(String.prototype.trim) === "undefined")
{
String.prototype.trim = function()
{
return String(this).replace(/^\s+|\s+$/g, '');
};
}
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var amp = String.fromCharCode(38);
var rlb = rb + lb;
var mke = function(x){ return lb + x + rb; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+8.371.1x+2T2018/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('div.course-index').find('nav').find('a').each(function(){
if ($(this).text().trim().startsWith("Search this course")){
search_module_url = $(this).attr('href');
console.log("search_module_url = ", search_module_url);
}
});
}
var go_to_search = function(){
get_search_module();
var sterm = $('#site-search-box').val();
// new_url = jump_to_url + "/Search_this_module/?q=" + sterm;
new_url = search_module_url + "?q=" + sterm;
console.log("sterm = ", sterm, " ; going to ", new_url);
window.location.href = new_url;
}
if (!$('#site-search-box').length){
$("nav.courseware").find("ol").append(lb + "section style='float:right'" + rlb + "input size='20'"
+ " id='site-search-box'"
+ rlb + "img src='" + course_static_url
+ "/images_search_glass.png'/" + rlb + "/input" + rlb + "/section" + rb);
}
$("#site-search-box").keypress(function(event) {
if (event.which == 13) {
event.preventDefault();
go_to_search();
}
});
// $('#site-search-box').bind("enterKey", go_to_search);
var get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
var the_site_search = add_site_search();
var add_fix_transcript = function(){
if ($('div.wrap-instructor-info').length==0){
return;
}
$('div.xblock-student_view-video').each(function(key, vblock_e){
var vblock = $(vblock_e);
var vuid = vblock.data('usage-id').split('@');
var vid;
if (vuid.length==1){
vuid = vblock.data('usage-id').split(';_')
vid = vuid[5];
}else{
vid = vuid[2];
}
var mfnpre = vid.split("_video",1)[0];
var mfnid = mfnpre; // no periods
mfnpre = mfnpre.replace('8_370', '8.370'); // periods in gh filename
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var mke = function(x){ return lb + x + rb; }
var ftid = "fix_transcript_" + mfnid;
if (!$('#' + ftid).length){
var html = lb + "span id='" + ftid + "' style='float:right'" + rb + lb + "a href='#'" + rb;
html += "contribute transcript fix" + mke("/a") + mke("/span");
console.log("html = ", html);
vblock.after(html)
}
$('#' + ftid).click(function(){
var cst = $('ol.subtitles').find('li.current');
var cindex = Number(cst.data('index'));
var gurl;
if (mfnpre.endsWith('_cq_sol')){
gurl = "https://github.com/mitocw/content-mit-8370x-cq-sol-subtitles/blob/master/";
}else{
gurl = "https://github.com/mitocw/content-mit-8370x-subtitles/blob/master/";
}
gurl += mfnpre + ".txt#L" + String(cindex + 10 + 1);
console.log("going to ", gurl);
window.open(gurl, "MITx 8.370x subtitle source");
});
});
}
try{
add_fix_transcript();
}
catch(err){
console.log(err);
}
try{
var rb = String.fromCharCode(62);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 3000);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 8000);
}
catch(err){
console.log(err);
}
</script></span>
</div>
</div>
</div>
</div>
© All Rights Reserved