Skip to content
Snippets Groups Projects
Commit f50cb43a authored by Joseph Weston's avatar Joseph Weston
Browse files

correct magnetic field units

Magnetic fields are now expressed in units of magnetic flux quantum
per unit area.
parent d82f04db
No related branches found
No related tags found
No related merge requests found
......@@ -787,7 +787,7 @@ def calculate_phases(loops, pos, previous_phase, flux):
for loop in loops:
tail, head = loop[-1], loop[0]
integral = flux([pos(p) for p in loop])
phase = np.exp(2j * np.pi * integral)
phase = np.exp(1j * np.pi * integral)
phases[tail, head] = phase / previous_phase(phases, loop)
return phases
......@@ -1001,6 +1001,9 @@ class magnetic_gauge:
If callable, takes a position and returns the
magnetic field at that position. Can be a scalar if
the system is 1D or 2D, otherwise must be a vector.
Magnetic field is expressed in units :math:`φ₀ / l²`,
where :math:`φ₀` is the magnetic flux quantum and
:math:`l` is the unit of length.
*lead_fields : scalar, vector or callable
The magnetic fields to apply to each of the leads, in
the same format as 'syst_field'. In addition, if a callable
......
......@@ -211,7 +211,7 @@ def _test_phase_loops(syst, phases, loops):
for loop_kind, loop_flux in loops:
for loop in available_loops(syst, loop_kind):
loop_phase = np.prod([phases(a, b) for a, b in loop_to_links(loop)])
expected_loop_phase = np.exp(2j * np.pi * loop_flux)
expected_loop_phase = np.exp(1j * np.pi * loop_flux)
assert np.isclose(loop_phase, expected_loop_phase)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment