精华内容
下载资源
问答
  • 本文转自...This tutorial conveys the basic ideas behind continuous-variable quantum key distribution (QKD). It is targeted at phys...

    本文转自http://infiniquant.com/tutorial-continuous-variable-quantum-communication/

    This tutorial conveys the basic ideas behind continuous-variable quantum key distribution (QKD). It is targeted at physicists or engineers, preferably with a basic understanding of optics. Please share your thoughts if you have any comments or questions!

    Terminology of continuous- and discrete-variable QKD

    First, let us understand where the term “continuous-variable” comes from. It is the distinction to what is called “discrete-variable” quantum key distribution. Technically this can be understood as the difference between a single photon detector and a homodyne detector:

    single photon detector detects a click when a photon has hit the detector, or no click otherwise. Mathematically, this can be explained as the set of outcomes {click, no click}. The number of outcomes is discrete – therefore the term discrete-variable quantum key distribution, abbreviated DV-QKD.

    homodyne detector on the other hand measures the quadratures of the electric field of the incident light. The measurement outcomes of such a measurement are a projection of phase and amplitude of the electric field of light onto the quadrature axes. This projection yields a continuous value as a measurement result, therefore justifying the name continuous-variable quantum key distribution, or CV-QKD.

    The classical phase space

    A good tool to depict states of light is the optical phase space. To illustrate this basic concept of quantum mechanics, let us first make an analogy to classical mechanics and talk about the classical phase space instead: A pendulum has two major observable physical quantities: the position x of the pendulum, and its momentum p. If the motion of the pendulum is visualized in a 2D coordinate system with x and p along the two axes, then four interesting points can be identified along the pendulum’s path of evolution in this 2D phase space:

    1. The pendulum is on the right side and stops, corresponding to maximal positive displacement and zero momentum
    2. The pendulum is in the center on its way from right to left, has a position of 0 and has maximum velocity and thus momentum
    3. The pendulum is on the left side and stops, corresponding to maximal negative displacement and zero momentum
    4. The pendulum is in the center on its way from left to right, has a position of 0 and has maximum momentum

    Connecting these points by letting the pendulum oscillate, will result in an ellipse as shown in the above figure on the right.

    The optical phase space

    States of light can also be depicted in such a phase space, only this time it is called the optical phase space. Light can be described as an electromagnetic wave. Its electric field component can be written as a function of sine and cosine. This makes it very similar to the periodic oscillation of the pendulum we just discussed.

    In fact, even the same letters as for momentum and position are used to describe the electric field of light in the optical phase space. These variables are called the electric field quadratures X and P. Measuring these quantities, yields their marginal distributions. Combining these marginal distributions into one plot yields the optical phase space in analogy to the classical phase space composed of position and momentum for the example of the pendulum. The figure below shows a typical state of light, emitted by a laser. This state of light is called the coherent state and is parametrized by its amplitude and phase.

    Why does the coherent state have a Gaussian distribution instead of a single point in the optical phase space diagram? The reason is Heisenberg’s uncertainty relation, which causes the exact position and momentum of classical mechanics to be a fuzzy probability distribution in quantum mechanics. Heisenberg’s uncertainty relation states that the simultaneous determination of certain physical properties is not possible with arbitrary precision. And these physical properties are called non-commuting observables. The most prominent pair of non-commuting observables is given by position x and momentum p. The optical analogue of this are the electrical field quadratures X and P. The result of this fact is that the expected measurement distribution of those observables is not a single point anymore, but instead a fuzzy version of that. For a coherent state, a two-dimensional Gaussian distribution in optical phase space.

    Transmitting information using coherent states of light

    It is long known that lasers can be used for communication. A simple definition of a good communication protocol is that it transmits information with minimal errors. As an example, one can turn a flash light on and off to transmit Morse code to someone else. An analogue in telecommunication is what is called “on-off-keying”, basically turning a laser on and off and encoding a 1 as on and a 0 as off to transmit information. Depicting this in the optical phase space, will yield a diagram with two coherent states, where one is centered in the coordinate system, corresponding to the laser being off and the other one with a certain amplitude and phase when the laser is on.

    Communication only makes sense, if the information is transmitted over a certain distance. A typical way to cover the distance is transmission through glass fiber. Light propagation through such a fiber comes at the cost of a loss of intensity, exponentially tied to the distance. In logarithmic units, a typical value is 0.2 dB of loss per km of fiber. The effect on the original states prepared will bring the on-state closer to the center, since its amplitude is diminished by loss.

    As we originally defined communication, it was our goal to achieve minimal errors when discriminating our measured states to recover the 0s and 1s from our measurement signal. This is achieved, when the loss of amplitude is kept such that the measurement distributions of the on-state and the off-state do not overlap significantly. In other words, discriminating the two states that transmit information, depends on the initial amplitude and the loss after propagation.

    Eavesdropping the communication

    An adversarial eavesdropper “Eve” is tapping in on the on-off-keying communication protocol we are running. Eve is tapping off the full amount of the transmitted light and is using a homodyne detector to establish measurement distributions constituting the optical phase space. The result of the measurement is two Gaussian distributions that can be well discriminated.

    Eve does not want to get caught while performing the eavesdropping. As such, she has her own transmitter system and modulates coherent states with the amplitude and phase she detected. The receiver “Bob” will therefore think that no one was in the line, since the on-off-states arrive unchanged with respect to normal operation.

    So what can we do against this situation?

    Forcing Eve to leave a signature

    Opposed to the communication goal of transmitting information with minimal errors, let us change the goal towards transmitting information with a fixed and non-negligible amount of errors. This can be achieved by lowering the amplitude of the on-state such that the two Gaussian distributions have a good overlap. The result for an eavesdropper will be that Eve cannot discriminate the two states without significant errors, unless she knew in the first place, which state was sent when. Note that this is not an argument about technical noise, but can be proven using quantum mechanics.

    If Eve now wants to remain undetected, she has – again – to intercept and resend the states of light using her own detector and transmitter. However, this time, the states she prepared will not correspond to the original ones a certain fraction of the time, since she made errors discriminating them in the first place. This will leave Eve’s signature in the measurement distribution that Bob will later measure.

    Detecting Eve’s signature

    Since Bob is bound to the same state discrimination laws of quantum physics as Eve is, he also does not know, which of his measurements to assign to which state. However, Bob has help from Alice. Bob can disclose a random fraction of his measurements and Alice can tell him which state she sent for that random fraction. This allows Bob to properly assign his measurement values to the right state. He can then plot the distribution and calculate the variance of the distribution. If this variance is above the expected variance of a quantum noise-limited coherent state, he knows that something went wrong in the transmission and has to assume that Eve tampered with the quantum states along the way. The increased variance is indicated by the dotted red line in the picture below. This step is known as parameter estimation.

     

    Handling the measurement data to generate a secret key

    In case Alice and Bob do not detect an eavesdropper, they can continue to execute the protocol and move towards distilling a secret key from the measured data. Of course the publicly disclosed values in the previous step have to be thrown away, since they are no longer secret and can therefore not be used for a secret key.

    The undisclosed part of the key may be used to generate a secret key. Bob’s measurement data can be seen as a version of Alice’s modulation but with added noise. He therefore does not have a perfect copy of Alice’s data, which he would need to have the same key as Alice. Speaking in terms of classical communication, a solution to this problem, would be to apply an error correction protocol. This is not possible for QKD, since Bob does not want to disclose any information that could compromise the secrecy of the key we are trying to generate.

    The trick is now to only publicly disclose information, that does not tell Eve anything about the key, while still allowing Alice to correct Bob’s noise. We will not go into detail here on how this is done, but state that this can be done without leaking too much information. “Too much” means that the difference between the information leaked and the information gained through the quantum state exchange and the subsequent post-processing is still positive, allowing for a generation of a secret key rate greater than 0.

    Finishing the protocol to get the final key

    A few finishing touches are necessary to provide both parties with a final key. A confirmation step is necessary to ensure that the error correction worked correctly. After that, privacy amplification is performed to decrease the length of the error corrected key to a final key by reducing it by an amount that corresponds to the information leaked to Eve during the whole protocol. Finally, Alice and Bob authenticate themselves using a classical authentication method in order to ensure that they have established the secret key with the right person.

    Here is a summary of the steps required to establish a key by performing a QKD protocol:

    1. Quantum optical state exchange
      1. Send a random sequence of overlapping (non-orthogonal) quantum states from Alice to Bob to establish a raw key
    2. Classical post-processing
      1. Parameter estimation to detect Eve and abort the protocol if an eavesdropper was detected
      2. Error correction to get an error corrected key
      3. Privacy amplification to reduce the information leaked to Eve to a negligible amount
      4. Authenticate the communication

    After these steps, a final secret key can be established between Alice and Bob, which is secret to Eve. This final key can now be used for encryption with encryption methods like the one-time pad or if no information-theoretic security level is required, AES.

    展开全文
  • 我之前有转载过一篇讲tf.variable_scope和tf.name_scope的文章,今天一看,觉得还是没介绍太清楚,没讲到点子上,毕竟英文什么的看起来还是挺麻烦的。故而,今天来细细梳理下tf.Variable、tf.get_variable、tf....

    我之前有转载过一篇讲tf.variable_scope和tf.name_scope的文章,今天一看,觉得还是没介绍太清楚,没讲到点子上,毕竟英文什么的看起来还是挺麻烦的。故而,今天来细细梳理下tf.Variable、tf.get_variable、tf.variable_scope以及tf.name_scope四者之间的区别与联系。

    1. tf.Variable与tf.get_variable

    tensorflow提供了通过变量名称来创建或者获取一个变量的机制。通过这个机制,在不同的函数中可以直接通过变量的名字来使用变量,而不需要将变量通过参数的形式到处传递。
    TensorFlow中通过变量名获取变量的机制主要是通过tf.get_variable和tf.variable_scope实现的。
    当然,变量也可以通过tf.Varivale来创建。当tf.get_variable用于变量创建时,和tf.Variable的功能基本等价

    #以下两个定义是等价的
    v = tf.get_variable('v', shape=[1], initializer=tf.constant_initializer(1.0))
    v = tf.Variable(tf.constant(1.0, shape=[1], name='v')
    • 1
    • 2
    • 3

    tf.get_varialbe和tf.Variable最大的区别在于:tf.Variable的变量名是一个可选项,通过name=’v’的形式给出。但是tf.get_variable必须指定变量名

    2. tf.get_variable与tf.variable_scope

    上面已经提到过了:TensorFlow中通过变量名获取变量的机制主要是通过tf.get_variable和tf.variable_scope实现的。在这里,我主要解释下大家深恶痛绝的reuse问题
    其实只要记住一件事情就ok了:当reuse为False或者None时(这也是默认值),同一个tf.variable_scope下面的变量名不能相同;当reuse为True时,tf.variable_scope只能获取已经创建过的变量。
    下面我们通过代码来看下:

    #reuse=False时会报错的情况:
    with tf.variable_scope('foo'):
        v = tf.get_variable('v',[1],initializer=tf.constant_initializer(1.0))
    
    with tf.variable_scope('foo'):
        v1 = tf.get_variable('v',[1])
    •  

    在这种情况下会报错:Variable foo/v already exists, disallowed.Did you mean to set reuse=True in Varscope?
    其原因就是在命名空间foo中创建了相同的变量。如果我要在foo下创建一个变量v1,其name=‘v’,只需要将reuse设置为Ture就ok了。将上面第二部分代码修改为:

    with tf.variable_scope('foo', reuse=True):
        v1 = tf.get_variable('v',[1])
        print(v1.name)      #结果为foo/v
    •  

    当reuse已经设置为True时,tf.variable_scope只能获取已经创建过的变量。这个时候,在命名空间bar中创建name=‘v’的变量v3,将会报错:Variable bar/v dose not exists, diallowed. Did you mean to set reuse=None in VarScope?

    with tf.variable_scope('bar', reuse=True):
        v3 = tf.get_variable('v',[1])
    •  

    简而言之,reuse=False时,tf.variable_scope创建变量;reuse=True时,tf.variable_scope获取变量

    3. tf.variable_scope与tf.name_scope

    除了tf.variable_scope,tf.name_scope函数也提供了命名空间管理的功能。这两个函数在大部分情况下是等价的,唯一的区别是在使用tf.get_variable函数时。
    tf.get_variable函数不受tf.name_scope的影响
    我们从代码看下这句话的具体意思。
    首先是tf.variable_scope:

    with tf.variable_scope('foo'):
        a = tf.get_variable('bar',[1])
        print(a.name)#结果为foo/bar:0
    •  

    再看tf.name_scope:

    with tf.name_scope('a'):
        a=tf.Variable([1])
        print(a.name)#结果为a/Variable:0
    
        b=tf.get_variable('b',[1])
        print(b.name)#结果为b:0
    •  

    从这个结果中,我们能很清晰地看到,tf.get_variable创建的变量并不是a/b:0,而是b:0。这就表示了在tf.name_scope函数下,tf.get_variable不受其约束

    转载:https://blog.csdn.net/qq_22522663/article/details/78729029

    展开全文
  • 我之前有转载过一篇讲tf.variable_scope和tf.name_scope的文章,今天一看,觉得还是没介绍太清楚,没讲到点子上,毕竟英文什么的看起来还是挺麻烦的。故而,今天来细细梳理下tf.Variable、tf.get_variable、tf....

    我之前有转载过一篇讲tf.variable_scope和tf.name_scope的文章,今天一看,觉得还是没介绍太清楚,没讲到点子上,毕竟英文什么的看起来还是挺麻烦的。故而,今天来细细梳理下tf.Variable、tf.get_variable、tf.variable_scope以及tf.name_scope四者之间的区别与联系。

    1. tf.Variable与tf.get_variable

    tensorflow提供了通过变量名称来创建或者获取一个变量的机制。通过这个机制,在不同的函数中可以直接通过变量的名字来使用变量,而不需要将变量通过参数的形式到处传递。
    TensorFlow中通过变量名获取变量的机制主要是通过tf.get_variable和tf.variable_scope实现的。
    当然,变量也可以通过tf.Varivale来创建。当tf.get_variable用于变量创建时,和tf.Variable的功能基本等价

    #以下两个定义是等价的
    v = tf.get_variable('v', shape=[1], initializer=tf.constant_initializer(1.0))
    v = tf.Variable(tf.constant(1.0, shape=[1], name='v')

    tf.get_varialbe和tf.Variable最大的区别在于:tf.Variable的变量名是一个可选项,通过name=’v’的形式给出。但是tf.get_variable必须指定变量名

    2. tf.get_variable与tf.variable_scope

    上面已经提到过了:TensorFlow中通过变量名获取变量的机制主要是通过tf.get_variable和tf.variable_scope实现的。在这里,我主要解释下大家深恶痛绝的reuse问题
    其实只要记住一件事情就ok了:当reuse为False或者None时(这也是默认值),同一个tf.variable_scope下面的变量名不能相同;当reuse为True时,tf.variable_scope只能获取已经创建过的变量。
    下面我们通过代码来看下:

    #reuse=False时会报错的情况:
    with tf.variable_scope('foo'):
        v = tf.get_variable('v',[1],initializer=tf.constant_initializer(1.0))
    
    with tf.variable_scope('foo'):
        v1 = tf.get_variable('v',[1])

    在这种情况下会报错:Variable foo/v already exists, disallowed.Did you mean to set reuse=True in Varscope?
    其原因就是在命名空间foo中创建了相同的变量。如果我要在foo下创建一个变量v1,其name=‘v’,只需要将reuse设置为Ture就ok了。将上面第二部分代码修改为:

    with tf.variable_scope('foo', reuse=True):
        v1 = tf.get_variable('v',[1])
        print(v1.name)      #结果为foo/v

    当reuse已经设置为True时,tf.variable_scope只能获取已经创建过的变量。这个时候,在命名空间bar中创建name=‘v’的变量v3,将会报错:Variable bar/v dose not exists, diallowed. Did you mean to set reuse=None in VarScope?

    with tf.variable_scope('bar', reuse=True):
        v3 = tf.get_variable('v',[1])

    简而言之,reuse=False时,tf.variable_scope创建变量;reuse=True时,tf.variable_scope获取变量

    3. tf.variable_scope与tf.name_scope

    除了tf.variable_scope,tf.name_scope函数也提供了命名空间管理的功能。这两个函数在大部分情况下是等价的,唯一的区别是在使用tf.get_variable函数时。
    tf.get_variable函数不受tf.name_scope的影响
    我们从代码看下这句话的具体意思。
    首先是tf.variable_scope:

    with tf.variable_scope('foo'):
        a = tf.get_variable('bar',[1])
        print(a.name)#结果为foo/bar:0

    再看tf.name_scope:

    with tf.name_scope('a'):
        a=tf.Variable([1])
        print(a.name)#结果为a/Variable:0
    
        b=tf.get_variable('b',[1])
        print(b.name)#结果为b:0

    从这个结果中,我们能很清晰地看到,tf.get_variable创建的变量并不是a/b:0,而是b:0。这就表示了在tf.name_scope函数下,tf.get_variable不受其约束

    展开全文
  • 什么是free variable

    千次阅读 2019-09-27 14:19:28
    其实很多英文名词对应的中文名词我们很好理解,也很容易理解他的用处。但是有很多名词恰恰就是英文的,而我们因为英语水平的局限,很难将这些英文名词翻译到位,也就导致很容易理解的名词经常困扰着我们。 那今天的...

    其实很多英文名词对应的中文名词我们很好理解,也很容易理解他的用处。但是有很多名词恰恰就是英文的,而我们因为英语水平的局限,很难将这些英文名词翻译到位,也就导致很容易理解的名词经常困扰着我们。

    那今天的主角是free variable。

    我把他叫为自由变量。

    用英文可以这么解释它:

    If a name is bound in a block, it is a local variable of that block. If a name is bound at the module level, it is a global variable. (The variables of the module code block are local and global.) If a variable is used in a code block but not defined there, it is a free variable.

    最主要我觉得是最后一句,如果一个变量在一个代码块中使用,而没有在那里定义它,那它就是一个自由变量。

    比如:

    define(function(require, exports, module) {
      // The module code goes here
    
    });

    这里的require,exports,module就是free variable.

     

    又比如:

    Gol.prototype._ensureInit = function() {
        ...
        var _this = this;
        var setDim = function() {
            _this.w = _this.canvas.clientWidth;
            _this.h = _this.canvas.clientHeight;
            _this.canvas.width = _this.w;
            _this.canvas.height = _this.h;
            _this.dimChanged = true;
            _this.draw();
        };
        setDim();
        window.addEventListener('resize', setDim);
        ...
    };

    变量-this没有在setDim中声明,也没有传递。它是一个“自由变量”。

    展开全文
  • 「译」LINQ: Building an IQueryable Provider - Part III - Local variable references 发表于 2016-02-01 | 标签 C♯ , 翻译 , LINQ | 作者 刘文俊 英文原文是Matt Warren发表在MSDN Blogs的系列文章之一,...
  • Latent Variable Modeling with R 英文无水印原版pdf pdf所有页面使用FoxitReader、PDF-XChangeViewer、SumatraPDF和Firefox测试都可以打开 本资源转载自网络,如有侵权,请联系上传者或csdn删除 查看此书详细...
  • Missing variable or function matlab错误

    千次阅读 2015-05-30 20:40:57
    这个错误如果没有找对解决办法还是会很浪费时间的,这个错误其实就是检查一下代码中的所有的标点符号,尤其是引号是不是英文格式的,可以把输入法切换成英文的 然后再把所有的引号重新输入一遍就会解决。
  • 哈哈哈哈,膨胀了,允许我用英文装个逼,variable 全局变量 局部变量 1.全局变量和局部变量同时存在且同名(你说巧不巧吧),调用函数的时候,会优先调用局部变量 举个栗子 a=10(这是全局变量) def p(b): a=...
  • 先贴一个condition_variable的讲解:https://en.cppreference.com/w/cpp/thread/condition_variable,很详细也很全面,但是是英文的,劝退了一部分英语不好的人(也包括我),但是借助翻译还是大概可以看下来的,而且...
  • Pytorch官方文档(英文) PyTorch是使用GPU和CPU优化的深度学习张量库。     Variable  在 Torch 中的 Variable 就是一个存放会变化的值的地理位置. 里面的值会不停的变化. 就像一个裝鸡蛋的篮子, 鸡蛋数会...
  • 单变量,多变量微积分 第七版 含答案 真正原版英文PDF 共四本全套齐 Single.Variable.Calculus Multivariable Calculus 7ed,including solution truePDF by James Stewart
  • 英文 |http://dmitrysoshnikov.com/ecmascript/chapter-2-variable-object/介绍JavaScript编程的时候总避免不了声明...
  • Soshnikov 发布时间:2009-06-27 俄文地址:http://dmitrysoshnikov.com/ecmascript/ru-chapter-2-variable-object/ 英文翻译:Dmitry A. Soshnikov 发布时间:2010-03-15 英文地址:...
  • 实际上在外网上搜索”Golang anonymous variable“是找不到文章的,”_“只是一个语法告诉编译器忽略掉对应的函数返回值不要报错,英文是”skipping return values“。这是在编译阶段完成的事情,并不会在运行时去...
  • 在写完程序运行的时候,报了个错误,missing variable or function,原因其实很简单,就是因为你的标点符号有个别的是中文下的标点符号,只要改回来就好了。 中文的标点符号和英文的标点符号差别还比较大,所以应该...
  • SyntaxError: missing variable name

    千次阅读 2018-10-24 15:27:33
    今天遇到的错误,原因是 var in=document.getElementsByTagName("input"); ——in好像是保留字,改成inp 就好了 网上查到还有的原因是英文分号写成了中文分号。
  • 常见情况下,我们通过限制输入参数的个数和类型、返回数据类型和抛出的异常来定义方法签名来与方法的调用者实现契约。使用动态参数特性,我们可以部分的克服该限制,使得签名变得动态化。你可能会说动态签名并不...
  • 条件变量的用法:CONDITION_VARIABLE

    千次阅读 2014-12-03 18:03:09
    条件变量的用法:CONDITION_VARIABLE  2011-07-01 16:32:12| 分类: 默认分类 |举报 |字号 订阅 摘自:http://www.cnblogs.com/panda_lin/articles/1449139.html 多线程不仅仅是背...
  • 英文的解释上就可以看到:变量空间, 命名空间with tf.name_scope("a_name_scope"): #为了更好的管理变量的命名空间而提出的,变量是该命名空间的变量 initializer2 = tf.constant_initializer(value=2...
  • 1 问题 调用retrofit的时候提示错误如下 Method return type must not include a type variable or wildcard: io.reactivex.Observable<...我们知道英文单词variable是多变的,易变的意思,然后...
  • shell 2:变量(variable)

    2021-04-04 17:50:41
    2、命名只能使用英文字母,数字和下划线,首个字符不能以数字开头。 3、中间不能有空格,可以使用下划线(_)。 4、不能使用标点符号。 5、不能使用bash里的关键字(可用help命令查看保留关键字)。 6、 定义...
  • java英文面试笔试题Java是一门面向对象编程语言,不仅吸收了C++语言的各种优点,还摒弃了C++里难以理解的多继承、指针等概念,小编收集了java英文面试笔试题,欢迎阅读。Question: What is transient variable?...
  • 本资料为纯英文版,是美国大学一元微积分入门教材 When the first edition of this book appeared twelve years ago, a heated debate about calculus reform was taking place. Such issues as the use of ...
  • 资源描述:英文Java面试题 Question What is transient variable Answer Transient variable can t be serialize. For example if a variable is declared as transient in a Serializable class and the class is ...
  • 在做减法的过程中大小键盘上的减号打不出来,通过切换成英文输入解决 &gt;&gt;&gt; 1-1 0 幂函数** &gt;&gt;&gt; 2**3 8 ##不是2^3 求余,取整 &gt;&gt;&gt; 8%3 2 &...
  • 可变码率(英语:Variable bitrate,简称VBR)这是一个用来形容通信服务质量(QoSfor Quality of Service)的术语。和该词相对应的词是固定码率或固定比特率,英文constant bit rate,缩写CBR。 例如,使用MP3格式...
  • 有关数据压缩中的变长编码算法。很好的英文原版书籍,下来看看吧。
  • 在很多情况下,如jsp、hibernate中会出现The left-hand side of an assignment must be a variable这个错误,很多情况下,这个错误是由于句末的分号是在中文输入状态下的分号,所以检查一下输入法,改掉中文输入法...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 613
精华内容 245
关键字:

variable英文