This is a TE wave, so the electric field is transverse to the plane of incidence. In this case we chose to let point into the page, which then determines the direction of the magnetic field since form a right-handed coordinate system.
The total wavevector is made up of a component in the -direction and in the direction.
The field on each side is made up of a forward-propagating wave () and a backward propagating wave (). On the left we have
and similarly for the right.
We want to represent the electric field in the first medium, but do we want them to represent or ? To decide, let’s take a look at the boundary conditions:
The electric field is perpendicular to the boundary, so . On the other hand since is perpendicular to , you can convince yourself that the other boundary condition for the electric field gives . Thus the electric field is continuous across the boundary, so we want to represent the electric field. In this case if are the fields just before the boundary and the fields just after, we have
Note that we have chosen coordinates such that the exponentials in Eq. (1) are one right at the boundary.
Aside: If we had a TM wave we would choose to represent rather than , since is what would be continuous across the boundary and we would again have . Note that this is just a convenience; you could use if you really wanted to, and using the boundary condition would then become .
We need one more relation between the , and we have two two boundary conditions we haven’t used so far:
These are in terms of the magnetic field, which we want to relate to the electric field. This comes from Maxwell’s equation:
What would happen if we took the equation? Since is being dotted with , we see that the -component of is continuous across the boundary. This tells us that is continuous, which is:
since only is nonzero. Meanwhile the equation gives us a relation for the -component of , and
The wave is propagating in the direction, so this is what we want.
The key thing to remember was: if you see a divergence draw a three-dimensional volume and use the divergence theorem, while if you see a curl draw a two-dimensional surface and use Stokes’ theorem. We are going to use this to derive the electromagnetic boundary conditions. Hopefully by the end of this they should seem pretty intuitive, and you will be able to quickly guess the boundary conditions just by looking at Maxwell’s equations.
Now things are complicated by the fact that if we are not in a vacuum, the electric and magnetic fields can induce extra charges and currents in the surface, which induce new fields, which induce even more charges and currents, and so on. For this reason it is convenient to write some of the equations in terms of and , because then only the `free’ charges and currents , the ones that are put in at the start rather than induced by the fields, show up:
2. Deriving the boundary conditions
Let’s suppose we have a boundary between two media, and some sort of electromagnetic wave propagates between the two. We want to know how the fields on one side relate to the fields on the other.
We will look at the conditions imposed on the fields by each of Maxwell’s laws.
2.1. Gauss’ Law for the Magnetic Field
For our first candidate we will look at
There is a divergence, so that means we want to draw a three-dimensional box on both sides of the boundary, and use the divergence theorem to convert the left hand side to an integral of over the surface.
We have a solid rectangular box. The blue face lies inside the left region, the green face inside the right region, while the black faces cross both regions. Integrating both sides of Gauss’ Law gives that the integral of over all six faces is equal to zero:
Let’s suppose the blue and green faces have some area . Note that the unit normal has opposite sign on each side of the box, so it is pointing against but with . On the blue and green faces, taking the dot product with the unit normal selects the components of the magnetic field which are perpendicular to the boundary. We then have:
The integral over the black faces is annoying because each face has contributions from both and , so it doesn’t have a nice answer. We can get rid of these parts though by making the box extremely thin. We bring the blue and green face closer together, shrinking the black faces to zero area while keeping the areas of the blue and green faces at . With this we will have
Dividing through by area then gives
In other words, the perpendicular component of the magnetic field is unchanged across the boundary. Since the perpendicular component of the magnetic field is , another way of writing this boundary condition is
2.2. Gauss’ Law for the Electric Field
Now we will analyse
The analysis for the left hand side is identical to what we had for the magnetic field, and we end up with
On the right hand side however the volume integral of over the box will be equal to the enclosed free charge. Let’s assume there is a charge density per unit area on the boundary, then the right hand side will be , and we will have
As before we may re-write this as
Let’s consider a special case. Suppose there is no free charge on the boundary (), and we are in linear media, so and . In this case the boundary condition becomes:
and we see that the normal component of the electric field is discontinuous across the boundary. The intuition for this is that the electric fields induce a bound charge density on the boundary, which causes the normal component of the electric fields to be discontinuous.
2.3. Faraday’s Law
We’re done with the divergences, so let’s move onto the simpler one of the curl equations:
Since we have a curl, this time we will draw a two-dimensional surface and then use Stokes’ theorem.
Now the blue line lies inside the left material, the green line inside the right material, and the black lines cross the boundary and lie in both materials. We integrate both sides of Faraday’s law over this surface. For the left hand side Stokes’ theorem converts the integral of the curl over this surface to the line integral around the boundary:
Suppose the blue and green lines have length , then the line integrals over these become the parallel component of multiplied by , with again a sign difference because the line integral is pointing down on the blue side and up on the green side (as it goes anticlockwise around the rectangle)
Again the integrals over the black line are annoying, as each line crosses between the two regions. But again the cure is the same, to move the blue and green lines closer together (keeping them at length ), squeezing the rectangle thinner and thinner until the lengths of the black lines go to zero. In this case the integral over the black lines vanishes and we have
For the right hand side we want to integrate over the face of the rectangle. However we just squeezed the rectangle infinitely thin, so we will be integrating this over zero area, which will give us zero. The net result is
and then dividing by we find that the parallel component of the electric field is continuous across the boundary. Since the parallel component is the part perpendicular to the normal vector, we can also write this as
2.4. Ampére’s Law
This one is left as an exercise to the reader! Begin with
and show that you end up with
where is the surface current density. If there is no free current and we are in a linear material (), this becomes
There you have it! Once you understand the general principle, you can read off the boundary conditions very quickly by just looking at Maxwell’s laws:
The divergence laws will tell you about the perpendicular components, while the curl laws tell you about the parallel. The homogenous (source-free) laws give you continuity (the same fields on either side), while the inhomogeneous laws lead to discontinuity (factors of and on either side). After a bit of thinking you should be able to jump straight to
 The LaTeX was written using the excellent tool LaTeX to WordPress:
Let’s take a look at Maxwell’s equations (in differential form):
Let’s try and understand what these mean geometrically, and how you can go about using them.
2. Some Vector Calculus
Firstly we need some vector calculus. Let’s start off with some vector field . The divergence of is given by
What does the divergence mean intuitively? Imagine placing a tiny sphere at some point , and letting the surface of the sphere be pushed and pulled by the vector field . Depending on the vector field the surface of the sphere will be distorted, and its volume will change. The rate of change of volume is given by the divergence of at . If the divergence is positive, that means the volume of the sphere will increase. If the divergence is negative, then the volume of the sphere will decrease. If the divergence is zero then the shape of the sphere may be distorted, but in such a way that the volume remains constant.
The divergence is related to the divergence theorem. Let be some solid volume, its surface, and the normal vector. For if were the solid ball of radius , then would be the surface of that ball, namely the sphere of radius , and the unit normal vector on the sphere. The divergence theorem relates the integral of the divergence of over , with the integral of over the surface of :
Imagine an incompressible fluid in three dimensions, being pushed around by . If the divergence is positive at a point then fluid is being created and pushed outwards. If the divergence is negative then the fluid is being sucked away, while if the divergence is zero then the vector field is pushing the fluid around, without creating or destroying it. The left hand side of Eq. 3 is the sum over the entire volume of how much fluid is being created or sucked up. Now let’s look at the right hand side. The dot product asks how much fluid is being pushed through the boundary; if the dot product is positive then fluid is being pushed out of the surface, if the dot product is negative then fluid is being pushed into the surface, while if the dot product is zero then fluid is circulating around the surface, without going inwards or outwards.
In other words the divergence theorem says that the sum of all the fluid being created or sucked up at each point in the entire volume is equal to the net amount of fluid that gets pushed into or out of the surface.
Next we have the curl:
To interpret the curl, imagine placing a tiny sphere at some point , but fix it in place so that it cannot move. Let’s suppose this sphere is rigid, so that it’s surface cannot be stretched. You can imagine at each point on the surface of the sphere giving it a little push or pull. If we let all these pushes and pulls add up, the sphere will start to rotate. The magnitude of the curl tells you how fast the sphere will rotate due to its surface being pushed by , and the direction of the curl tells you the axis the sphere will rotate around.
The curl is related to Stokes’ theorem. Let be a two-dimensional solid region with normal vector , and the one-dimensional boundary of . Stokes’ theorem relates the integral of the curl over to the line integral of around the boundary:
The left hand side gives the integral over of the circulation of the vector field in the plane of . The right hand side gives the net circulation of around the boundary.
Stokes’ theorem says that the sum of circulation of fluid at every point of a two-dimensional surface is equal to the net circulation around the boundary of the surface.
3. The Meaning of Maxwell’s Equations
Armed with our knowledge of vector calculus, let’s take another look at Maxwell’s equations. We’ll begin with the divergence of the magnetic field:
This equation says that there are no `sources’ or `sinks’ of the magnetic field lines. The magnetic field is neither created nor destroyed, it just flows from one place to another. If you draw a solid region, there is just as much magnetic field coming into the region as coming out. Things are slightly different for the electric field however:
If there is no charge in a region of space, then electric field lines are also neither created nor destroyed. If you have positive charge however this acts as a source of electric field lines, and a region enclosing positive charge will on the whole have electric field being `produced’ inside and flowing outwards from the surface. Negative charge on the other hand acts as a sink, `sucking in’ the electric field. If you consider a region enclosing negative charge, the electric field will flow inwards through the boundary.
The moral of the story is every time you see a divergence in Maxwell’s equations, imagine drawing a three-dimensional volume and use the divergence theorem to convert this to an integral of over the surface.
Similarly every time you see a curl in Maxwell’s equations, draw a two-dimensional surface and use Stokes’ theorem to convert this to an integral of around the boundary.
Let’s see this with Faraday’s law:
Integrate both sides of this over a two-dimensional surface. The right hand side will be the rate of change of the flux of through the surface. If the flux is changing, this will induce an electric field circulating around the boundary of this surface. The case is similar for
only now we find that a current also induces a circulating magnetic field around the boundary.
 The LaTeX was written using the excellent tool LaTeX to WordPress:
Many people are familiar with the so-called `Feynman’s trick’ of differentiating under the integral. Buried in chapter 27-3 of the Feynman Lectures on Electromagnetism  though there lies another trick, one which can simplify problems in vector calculus by letting you treat the derivative operator as any other vector, without having to worry about commutativity . I don’t know if Feynman invented this himself, but I have never stumbled across it anywhere else.
What this trick will allow you to do is to treat the operator as if it were any other vector. This means that if you know a vector identity, you can immediately derive the corresponding vector calculus identity. Furthermore even if you do not have (or don’t want to look up) the identity, you can apply the usual rules of vectors assuming that everything is commutative, which is a nice simplification.
The trick appears during the derivation of the Poynting vector. We wish to simplify
where and are the magnetic and electric field respectively, though for our purposes they can just be any vector fields.
2. The trick
The problem we want to solve is that we cannot apply the usual rules of vectors to the derivative operator. For example, we have
but it is certainly not true that
This means that when you want to break up an expression like , you can’t immediately reach for a vector identity and expect the result to hold. Even if you aren’t using a table of identities, it would certainly make your life easier if you could find a way to treat like any other vector and bash out algebra like (3).
Let’s first restrict ourselves to two scalar functions and , we introduce the notation
to mean a derivative operator which only acts on , not . Moreover, it doesn’t matter where in the expression the derivative is, it is always interpreted as acting on . In our notation the following are all equivalent:
Why did we do this? Well now the derivative behaves just like any other number! We can write our terms in any order we want, and still know what we mean.
Now let’s suppose we want to differentiate a product of terms:
We can see that whenever we have such a product, we can write:
We want to generalise this to thinks like . Remembering that the derivative operator is interpreted as , we define
Here is interpreted as acting on any of the components , , of .
With this notation, keeping in mind the commutativity (5) of the derivative operator, we can see that
Work out the components and see for yourself!
In the next section we will apply this trick to derive some common vector calculus identities. The idea is to take an expression such as , write it as , and then expand this using our normal vector rules until we end up with acting only on and on , in which case we can replace them with the original .
3. Some examples
Here we will see how various vector identities can be generalised to include using the ideas from the previous section. All the identities I am using come from the Wikipedia page .
You may want to try and do each of these yourself before reading the solution. Have a look at the title of the section, check the Wikipedia page  for the corresponding vector identity, and have a play. If you get stuck read just enough of the solution until you find out what concept you were missing, and then go back to it. As they say, mathematics is not a spectator sport!.
The corresponding vector identity is
We can look at this as saying that the product is invariant under cyclic permutations, i.e. if you shift . If we look at as something with three slots: , this is saying that you can move everything one slot to the right (and the rightmost one `cycles’ to the left), or you can move everything one slot to the left (and the leftmost one `cycles’ to the right). This pattern comes up all the time in mathematics and physics, so it’s good to keep it in mind.
Let’s experiment and see where we go. Since every term will be a product of terms from and terms from , we may expand
We want to change this so that is acting on and on , then we can replace them with the original . So let’s cyclically permute the first term to the right, and the second to the left:
Finally, we use to re-write the last term:
We have thus derived
Better yet, now we have an idea of where that strange minus sign came from. The first two terms have the same cyclic order in their slots , and breaking this in the third term comes at the expense of a minus sign.
The corresponding vector identity is
We thus have
Let’s look at the first term, the second will be analogous.
Note that the product is not zero, as is a derivative operator which still acts on anywhere in the equation (see (5)). We rearrange the above using the commutativity of the dot product to write
Swapping we obtain
Putting the two together finally gives
Here is just an ordinary scalar function, and a vector. The difference makes this one a little bit tricky, but on the plus side we won’t have to look up any identities. Let’s begin by expanding as usual (since everything will be a product of and terms from ):
For the second term we can pull the scalar through to get . Let’s have a think about what we mean by the first term. The derivative operator is a vector
and the quantity inside the brackets is a vector
where is the -component of , and so on. Taking the dot product of (24) and (25), we can see that this will give us
Putting all this together we arrive at
We’ve learned a neat trick to treat the derivative operator just like any other vector. This is a cool and useful idea, which I hadn’t seen anywhere before I came across it in chapter 27-3 of . Leave a comment or a tweet if you find other cool applications, or have ideas for further investigation. I notably did not touch on any of the second derivatives, such as or , and I’m sure that this trick would also simplify a lot of these. I also had a look at , and while you could use the trick there it turned out to be a bit complicated and involved some thinking to `guess’ terms which would fit what you wanted. Let me know if you find a nice simple way of doing this.
As a final application, u/Muphrid15 mentioned that this idea can be used to generalise the derivative operator to geometric algebra (also known as Clifford algebras). This is a sort of algebra for vector spaces, allowing you to do things like add one vector space to another or ajoin and subtract dimensions, and many calculations in vector algebra can be simplified immensely when put in this language.
 Leighton, R., & Sands, M. (1963). The Feynman Lectures on Physics, Volume II: Mainly Electromagnetism and Matter.
 Wikipedia contributors. (2019, February 20). Vector calculus identities. In Wikipedia, The Free Encyclopedia: Retrieved 23:01, February 22, 2019 https://en.wikipedia.org/wiki/Vector\_calculus\_identities
In this article we will introduce superdense coding, a scheme which lets Alice send two bits of (classical) information to Bob by transmitting a single entangled qubit. This article will be mathematically rigorous, while hopefully also providing an intuitive explanation of what is really going on. We will assume an undergraduate understanding of quantum mechanics, including familiarity with Dirac notation and entanglement.
Suppose Alice has a qubit, whose state may be written as
where and are complex numbers such that . It would seem from (1) that if Alice wished to encode some information in her state and then send it to Bob, she has a lot of freedom in her choice of and . In comparison to a classical bit, which can only take discrete values of or , it seems like a qubit is infinitely more powerful! However, there’s a big catch.
To access this information Bob needs to measure the qubit, and (assuming he measures in the basis) his result will be either or , with probability and respectively. Once he does this the state is lost, and he can gain no more information. Thus the only way that Alice can deterministically transfer information is to send either the state or the state, in which case Bob can measure it to receive one bit of information. If Alice sends anything else, Bob won’t be able to draw a conclusion from a single measurement, after which the original state will be lost. Despite all the extra freedom we have in a qubit, the probabilistic nature of quantum measurement seems to imply we can’t do any better than with a classical bit.
It turns out however that if Alice and Bob start off by sharing an entangled state, Alice can deterministically transfer two bits of information with a single qubit, by using a scheme called ‘superdense coding’. We can think of this as them sharing one bit of entanglement, which together with the transfer of one qubit leads to two bits of information. This idea was introduced in 1992 by Charles Bennet and Stephen Wiesner (see References below for the paper link).
2. Some quantum gates
We will begin by defining four operators which Alice and Bob will use. Firstly there is the Pauli , which flips a qubit:
Next there is the Pauli operator, which flips the phase of the bit:
The Hadamard operator sends the qubits to two orthogonal superpositions:
We can see that this also reverses itself:
Finally there is the only two-qubit gate we will need, the controlled not (CNOT) gate. This takes two qubits; if the first (the control) is , it leaves the whole state unchanged:
If the control qubit is however then CNOT flips the target:
3. The superdense coding protocol
Let’s see how we can encode two bits of information in a single qubit. This time, Alice and Bob start off with a pair of entangled qubits:
In the equation above, represents Alice’s qubit being . Because this system is entangled, Alice’s and Bob’s states are intrinsically linked. This is best thought of as a single bipartite system rather than two individual qubits, and so local operations on Alice’s state will affect the state of the system as a whole.
Suppose Alice has two classical bits to encode, and , each of which takes value either or . She encodes the first bit in the parity of her’s and Bob’s states, i.e. whether they are the same or different. If is she does nothing, and so from (14) Alice’s and Bob’s qubits will be the same. If is she applies a gate to her state, flipping it and resulting in the state
Thus her’s and Bob’s qubits will always be measured to be opposite.
Alice encodes her second bit in the phase between the two states in the superposition. If is she again does nothing, however if is she applies the gate to her state, which will result in a minus sign between the two states.
As we mentioned belfore, even though Alice is applying these operators locally to her state, the system is an entangled bipartite state, and so we can think of her as applying global operators , Pauli operators tensored with the identity, to the whole system. After Alice’s operations, if the global state will be
and if the global state will be
where in both cases the sign is positive if , and negative if . Again we note that is encoded in the parity, whether Alice or Bob’s quibts are the same or different, and in the phase between the two superpositions. This phase is the new degree of freedom which we get from entanglement.
Alice then sends her single qubit to Bob, who now possess both states of the bipartite system. Even though Alice has only transmitted a single qubit, because their states were entangled Bob may recover both of the operations that Alice performed. To do this Bob performs the following steps:
To measure the parity Bob applies the CNOT gate on the system, using Alice’s bit as the control. If , this will send (16) to
Bob could now deterministically read out the value of simply by performing a measurement on his qubit!
To measure the phase, Bob applies the Hadamard gate to Alice’s qubit. Looking at the two equations above, we see that regardless of Bob’s qubit, Alice’s is in the superposition
where the sign is positive if and negative if . In the former case the Hadamard gate will send this to , and in the latter to .
We can see then that after this protocol, Bob has the state:
He may therefore perform a single measurement on the two qubits he possess, and in doing so learn the value of both bits and ! Alice thus used one qubit, and one bit of entanglement, to transmit two bits of information to Bob.
u/RRumpleTeazzer pointed out that this protocol still involves the transmission of two qubits. We could imagine this as Alice first prepares the entangled state superposition , sends one of the qubits to Bob, and then performs the superdense coding protocol on her remaining qubit before sending this to him as well. So really, this is Alice sending two classical bits via two qubits.
What I think still makes this process surprising from a classical point of view is that all of Alice’s encoding happens after Bob already has the first qubit. They begin by sharing the resource of an entangled state, Alice encodes two classical bits on her qubit, and then sends this to Bob who can decode them both. Of course from the quantum point of view this is perfectly natural; since this is a bipartite entangled state, it is better to think of Alice performing operations on the global state , rather than on ‘her qubit’. As u/RRumpleTeazzer’s says, ‘delayed choice coding’ is perhaps an equally good name.
u/NidStyles and u/gabeff asked about experimental implementations of superdense coding. The first implementation was in 1996 (see References) and used photons as qubits, where and were the Horizontal and Vertical polarisation states and . The initial superposition was created using a process called ‘spontaneous parameteric downconversion’, where a nonlinear crystal creates pairs of photons whose polarisations are entangled with each other:
The problem with this experiment however was that Bob could only measure three of Alice’s four possible messages. These four messages were:
The experimenters interfered these in such a way that you could distinguish states which were symmetric in interchanging the photons from states which were anti-symemtric. We can see above that is the only anti-symmetric state (if you swap the two photons this is the only one which picks up a minus sign), and so this one could be immediately read out. For the other three, they passed them through a scheme which could determine if the photons had the same or different polarisations. If they were different, this corresponded to . If they were the same however it could be either of or , with no way of distinguishing them further.
These difficulties were resolved in a later experiment in 2008 (again see References). In this, each qubit was composed two photons rather than one, with the first of each pair entangled in polarisation, and the second in angular momentum. This extra degree of freedom allowed the experimenters to distinguish the four possible messages.
Because of the intricacies of the setups, both of these should be seen as more ‘proof of principle’ than scalable methods for quantum communication.
Also check out the original paper: Bennett, C. H., & Wiesner, S. J. (1992). Communication via one- and two-particle operators on Einstein-Podolsky- Rosen states. Physical Review Letters, 69(20), 2881–2884. http://doi.org/10.1103/PhysRevLett.69.2881
The first experimental implementation was in 1996 using photons as qubits, however in this one Bob could only recover three out of the four possible messages: Mattle, K., Weinfurter, H., Kwiat, P. G., & Zeilinger, A. (1996). Dense coding in experimental quantum communication. Physical Review Letters, 76(25), 4656–4659. http://doi.org/10.1103/PhysRevLett.76.4656
A newer implementation in 2008 allowed Bob to decode all four messages. This was done by composing each qubit of two photons, rather than one: Barreiro, J. T., Wei, T. C., & Kwiat, P. G. (2008). Beating the channel capacity limit for linear photonic superdense coding. Nature Physics, 4(4), 282–286. http://doi.org/10.1038/nphys919