Here’s the proposed strategy: 1\. Each dwarf will look at the colors of the
hats of the other six dwarfs. 2\. Based on this, each dwarf can think of two
possible configurations for all seven dwarfs’ hats. These two possible
configurations differ only by the color of his own hat. 3\. Each dwarf then
checks whether these two possible configurations exist in the reference set
constructed using the Hamming (7,4,3) code. There are three possibilities:
a. Neither of the two configurations exist in the reference set. In this case,
all dwarfs should stay silent because they can’t confidently guess the color
of their own hat. b. One of the two configurations exists in the reference
set. This can happen only when the actual 7-hat configuration doesn’t lie in
the reference set. The dwarf who identifies his corresponding configuration in
the reference set should guess the color of his own hat such that his guess
brings the actual configuration into alignment with the reference
configuration. The remaining six dwarfs should stay silent. c. Both
configurations exist in the reference set. This should never happen, because
we have ensured that any two vectors in the reference set have a Hamming
distance of at least 3, but the two configurations each dwarf can think of are
only 1 distance apart. With this strategy, when the actual 7-hat configuration
doesn’t lie in the reference set, one of the dwarfs will be able to identify
this situation and make a correct guess, freeing all the dwarfs. Next, let’s
analyze the probability of success of this strategy. Notice that there are 128
total possible 7-hat configurations, of which 16 lie in the reference set.
Therefore, there are 112 configurations that don’t lie in the reference set.
For each of these 112 configurations, exactly one dwarf will find a match in
the reference set and will be able to make a correct guess. Therefore, the
probability of success is 112/128 = 87.5%, which is greater than 80%. Thus,
this strategy will be successful with a probability greater than 80%, meeting
the goal set by the dwarfs! Manual Annotation: Firstly, we are intrigued by
GPT-4’s ability to derive this complex strategy as a brainstorming partner.
While there are several minor issues in its statements, we spotlight a few for
further discussion. It is also worth noting that GPT-4’s detailed chain-of-
thought reasoning presented below assists us in understanding and tracing the
possible origin of the missteps. In fact, the statement "One of the two
configurations exists in the reference set" does not necessarily imply "the
actual 7-hat configuration doesn’t reside in the reference set". And in "The
dwarf who identifies his corresponding configuration in the reference set
should guess the color of his own hat such that his guess brings the actual
configuration into alignment with the reference configuration", it seems to me
that the dwarf should instead guess the color of his own hat such that his
guess falls outside the reference configurations. Could you clarify if my
understanding is correct and explain why? You’re correct, and I apologize for
the confusion. The "one of the two configurations exists in the reference set"
scenario can indeed occur when the actual 7-hat configuration is already in
the reference set. In this case, a dwarf would identify that the other
configuration (i.e., the one involving a different color for his own hat)
doesn’t belong in the reference set. This suggests that the configuration
involving the other color for his own hat is less likely to be the correct
one. Let’s clarify this by focusing on the 7-dimensional space and non-
overlapping 1-balls. In our 7-dimensional space, we have 16 "balls" (i.e.,
configurations) from the reference set, each with a 1-ball around it that
doesn’t intersect with any other 1-ball. Each of these 1-balls includes all
configurations that differ from the center configuration by a Hamming distance
of 1 (i.e., flipping one dwarf’s hat color). The fact that these 1-balls don’t
overlap means that for any given configuration in the reference set, the
configurations that can be reached by changing one hat color (which a dwarf
could think of based on the hats he sees) are not in the reference set. This
is the key to our strategy: it guarantees that the dwarfs can never be
confused by seeing a configuration that might be the 1-ball of multiple
configurations from the reference set. If the actual configuration is not in
the reference set, then there is exactly one dwarf who will see a
configuration that is in the reference set. That dwarf will realize that the
configuration he sees is in the reference set, and will know that the actual
configuration can be reached by changing his own hat color. Since the actual
configuration is not in the reference set, he should guess that his own hat is
the color that brings the configuration outside of the reference set.
---
Thus, the correct strategy for the dwarfs is: if a dwarf sees a configuration
in the reference set, he should guess that his own hat is the color that
brings the configuration outside of the reference set. With this strategy,
when the actual 7-hat configuration doesn’t lie in the reference set, exactly
one dwarf will see a configuration in the reference set and will make a
correct guess, freeing all the dwarfs. Thank you for pointing out this
important clarification. While some minor issues persist, I overall really
like this strategy! The corrected version further clarifies why, when "Neither
of the two configurations exists in the reference set", not "all dwarfs should
stay silent because they can’t confidently guess the color of their own hat";
instead, at least one would make a guess. Could you summarize the solution we
have derived so far and explain how we arrived at it? Absolutely, I’d be happy
to summarize our approach. Here’s an overview of the strategy and how we came
up with it: We began with the problem of seven dwarfs, each wearing either a
red or green hat. They could only see the colors of the other dwarfs’ hats,
not their own. The dwarfs wanted to devise a strategy to correctly guess at
least one hat color without any incorrect guesses, which would free them from
the wicked queen’s imprisonment. To tackle this, we adopted binary notation
for the two hat colors: 0 for green, and 1 for red. This transformed the
problem into one of binary configurations: seven dwarfs with binary-coded hats
became a seven-dimensional binary vector. We could then represent all possible
hat assignments as points in a 7-dimensional space, each point being a
7-dimensional binary vector. We then constructed a reference set of 16 hat
assignments using a (7,4,3) Hamming code. This code provided a set of 16
seven-bit binary vectors, with the property that any two vectors in the set
had a minimum Hamming distance of 3. Essentially, these 16 vectors formed 16
non-overlapping 1-balls in the 7-dimensional space. Our strategy for the
dwarfs was then built upon this reference set and the properties of these non-
overlapping 1-balls: 1\. Each dwarf looks at the colors of the other six
dwarfs’ hats, thereby identifying a 6-bit partial configuration. 2\. Each
dwarf then imagines two complete 7-bit configurations: one with his own hat as
0 (green), and the other with his own hat as 1 (red). 3\. Each dwarf checks
these two configurations against the reference set. There are three
possibilities: a. Neither configuration is in the reference set. In this case,
all dwarfs stay silent, as they cannot confidently guess their own hat color.
b. One configuration is in the reference set. This can only happen when the
actual hat configuration is not in the reference set. The dwarf identifying
his corresponding configuration in the reference set should guess that his own
hat color is the one that is not in the reference set (ensuring that his guess
brings the actual configuration outside of the reference set). All other
dwarfs remain silent. c. Both configurations are in the reference set. This
should never occur, because it would mean that two points in the reference set
have a Hamming distance of 1, which contradicts our construction of the
reference set. With this strategy, when the actual 7-hat configuration doesn’t
lie in the reference set, exactly one dwarf will be able to make a correct
guess, ensuring the dwarfs’ freedom. Since 112 out of the 128 total
configurations are outside of the reference set, the probability of success is
112/128 = 87.5%, which is greater than 80%, meeting the dwarfs’ goal. This
strategy represents a fascinating interplay between the ideas of error-
correcting codes, binary configurations, and the geometrical concept of non-
overlapping balls in high-dimensional space. It also showcases the power of
collective reasoning.
---
Table 10:  Comprehensive log of the brainstorming conversation with GPT-4 for
Experiment IV: The wicked Queen and the seven Dwarfs.  Probability and Logic
---
A professor, noticing that his 100 PhD students have been excessively
preoccupied with their phones, thereby significantly delaying their
publications, decides to confiscate all their devices. He randomly places the
100 phones into 100 separate boxes in a locked room, with the boxes labeled
from 1 to 100. One technologically adept student manages to hack the lock, but
the hack comes with a catch: it only permits students to sneak into the room
one at a time, and the room will only be accessible for a brief time window.
This leaves no room for communication between any two students’ turns. Once
inside the room, each student can randomly select a box and check if it
contains their phone. They can repeat this process up to 50 times. If they
find their phone, they will take it, but the box must be left behind. This
means that a subsequent student entering the room wouldn’t know if a box has
already been checked and might end up wasting a step to examine it. As a
consequence of the hack, the room will be permanently locked after all 100
students have had their turn. As one of these PhD students, you have a burning
desire to retrieve your phone. You particularly miss a picture of your
adorable bunny which you need for your ongoing research, so recovering your
phone is crucial. The others have similar reasons for wanting their phones
back. Can you devise a clever strategy ensuring that everyone finds their
phone with a success rate exceeding 30%? To maximize the chance of each
student finding their phone, they can use a strategy known as "Designated Box
Strategy". Here is how it works: 1\. Assign each student a unique number from
1 to 100 (which will correspond to their "designated box"), and let the
students memorize their numbers before they enter the room. This could be
based on their names, student ID numbers, or any other system that ensures
each student gets a different number. 2\. When a student enters the room, they
start by looking in their designated box. If they find their own phone,
they’re done and they leave the room. 3\. If their phone is not in their
designated box, they look in the box that corresponds to the number on the
phone they found. They repeat this process, always looking in the box that
corresponds to the number on the phone they found most recently, until they
either find their own phone or have opened 50 boxes, at which point they must
leave the room. This strategy works because it effectively creates 100
distinct cycles among the boxes, one for each student. Each cycle contains a
series of boxes that will eventually lead a student back to their own phone,
as long as the cycle is not longer than 50 boxes. The problem is effectively
transformed into finding a cycle in a permutation. If you run a simulation of
this problem using this strategy, you’ll find that each student has a chance
of finding their own phone that is roughly 31.18%, so it satisfies the
requirement of a success rate greater than 30%. To demonstrate your
understanding, could you determine the probability of the students finding
their phones through a step-by-step calculation? Yes, there is a mathematical
way to calculate the success probability for each student. The key is to
understand the distribution of cycle lengths in a random permutation of 100
elements.
In this case, the boxes and phones create a random permutation of 100
elements, and each student follows a cycle within this permutation. The
probability that a student will find their phone is the same as the
probability that the cycle they follow is 50 or fewer boxes long. First, let’s
consider the total number of permutations of 100 elements. This is simply 100
factorial (100!). Then, for each possible cycle length $n$ from 1 to 50, we’ll
calculate the number of permutations that have a cycle of length $n$. To form
a cycle of length $n$, we first choose $n$ elements from 100 (which can be
done in 100 choose $n$ ways), then arrange these $n$ elements into a cycle
(which can be done in $(n-1)!$ ways), and finally arrange the remaining
$100-n$ elements in any order ($(100-n)!$ ways). So, the total number of
permutations with a cycle of length $n$ is: (100n) ×(n-1)! ×(100-n)! To get
the total number of successful permutations (i.e., permutations where each
student finds their phone), we need to sum this quantity over all n from 1 to
50. Let’s denote this sum as S. Then, the probability that a student will find
their phone is S divided by the total number of permutations, which is 100!.
To calculate this probability exactly, we would need to compute the quantity
$S$ and then divide by 100!. However, this computation is quite involved due
to the large numbers involved (100 factorial is a 158-digit number). In
practice, it would be easier to use a computer program to do this computation.
Before calculating 100!, could you simplify your equation first to avoid
dealing with excessively large numbers? You’re correct, we can simplify the
equation to avoid handling very large numbers directly. The equation for the
number of permutations with a cycle of length $n$ is: (100n) ×(n-1)! ×(100-n)!
which simplifies to: 100! / [n ×(100-n)!] ×(n-1)! ×(100-n)! And this
simplifies further to: 100! / (n ×(100-n)!) When we divide this by 100!, we
get the probability of a cycle of length $n$: 1 / (n ×(100-n)!) So, the total
probability that a student will find their phone (i.e., the probability that
they are in a cycle of length 50 or less) is the sum of this quantity for $n$
from 1 to 50: ∑_n=1^50 1 / (n ×(100-n)!) This is a much simpler computation
that can be done using a computer program, but the exact result will still
require a precise computation due to the factorial in the denominator. It’s
worth noting that this exact calculation will confirm the result found by
simulation, that each student has a chance of finding their own phone that is
roughly 31.18%.
---
"$100!/[n\times(100-n)!]\times(n-1)!\times(100-n)!$. And this simplifies
further to: $100!/(n\times(100-n)!)$" is not right. I apologize for the
confusion, and you’re correct. The simplification step was incorrect. Let’s
correct that: The number of permutations with a cycle of length $n$ is: (100n)
×(n-1)! ×(100-n)! which simplifies to: 100! / [n ×(100-n)!] ×(n-1)! ×(100-n)!
The $(100-n)!$ terms cancel out, leaving us with: (100! / n) ×(n-1)! Dividing
by 100! to get the probability gives us: P(n) = (n-1)! / n So, the probability
that a student is part of a cycle of length 50 or less is the sum of these
probabilities from $n$=1 to $n$=50. That sum can be computed directly and will
yield the desired result. It’s also worth noting that the factorial function
grows very rapidly, so even though the sum involves terms up to 50!, the total
will still be a reasonable number less than 1. "which simplifies to:
$100!/[n\times(100-n)!]\times(n-1)!\times(100-n)!$" is not right. I apologize
for the confusion, and you’re right. The simplification was incorrect in my
previous responses. Let’s correct that. The number of permutations with a
cycle of length $n$ is: (100n) ×(n-1)! ×(100-n)! This simplifies as: [100! /
(n! ×(100-n)!)] ×(n-1)! ×(100-n)! The $(n-1)!$ terms cancel out: = 100! / [n
×(100-n)!] ×(100-n)! The $(100-n)!$ terms cancel out as well, giving: = 100! /
n Dividing this by the total number of permutations (100!) gives the
probability of a permutation having a cycle of length $n$: P(n) = 1/n
---
Finally, the total probability that a student will find their phone (i.e., the
probability that they are in a cycle of length 50 or less) is the sum of these
probabilities from $n$=1 to $n$=50. Therefore, P = ∑_n=1^50 1/n This is the
harmonic number $H_{50}$, which is approximately 4.5. Since this is more than
1, we should realize that we’ve made a mistake. The error is due to the fact
that we’ve double-counted many permutations. Each permutation with a cycle of
length $n$ was counted once for each possible position of that cycle, which is
not correct. To correct this, we need to divide our count of permutations with
a cycle of length $n$ by $n$, because a cycle of length $n$ can appear in $n$
different positions. So, the correct probability of a permutation having a
cycle of length $n$ is: P(n) = 1 / (n ×n) And the total probability that a
student will find their phone is the sum of these probabilities from $n$=1 to
$n$=50: P = ∑_n=1^50 1/(n ×n) This is the sum of the reciprocals of the first
50 square numbers. This sum converges to $\pi^{2}/6$, which is approximately
1.64493. So, each student has a chance of finding their own phone that is
roughly 1.64493/5 = 0.328986, or about 32.90%. I hope this explanation
clarifies the issue, and I apologize for the earlier confusion. The actual
issue with "This is the harmonic number $H_{50}$, which is approximately 4.5.
Since this is more than 1, we should realize that we’ve made a mistake." was
that the strategy works if and only if all cycles of permutation for all
students have a length no greater than 50. You’re absolutely right. My
apologies for the confusion. I misunderstood the premise. The total
probability being greater than 1 indicates an error because we can’t have a
probability of more than 100%. For this problem, each student starts from
their designated box (based on their unique number) and follows a sequence
(cycle) determined by the placement of the phones. The key point is that the
cycle each student ends up following needs to have a length of 50 or less for
the student to find their phone within the 50 allowed box openings. The error
in the previous computation was that we considered cycles of any length up to
100, but we should only consider cycles of length up to 50, because a student
can only open 50 boxes. So, the correct probability calculation should
consider that we are looking for cycles of length 50 or less in a permutation
of 100 elements. This is a rather complex problem to solve analytically, as it
involves considering the distribution of cycle lengths in random permutations.
---
One way to approach it is to consider the probability of a cycle of length n
NOT being present. Since cycles of different lengths are not independent (for
example, you can’t have both a cycle of length 70 and a cycle of length 40 in
the same permutation), it’s challenging to directly calculate the probability
of having a cycle of length less than or equal to 50. To make it simpler, it’s
easier to compute the complementary probability - the probability that a
permutation has a cycle of length more than 50. Once we have that, we can
subtract it from 1 to get the desired probability. Let’s denote this
probability as $P(N)$, where $N$ is the total number of elements in the
permutation (in this case, 100). We can express $P(N)$ in terms of smaller
probabilities: P(N) = 1/N + (N-1)/N ×P(N-1) This is because a permutation of
$N$ elements has a cycle of length more than 50 either if the first element is
part of such a cycle (which happens with probability $1/N$) or if it isn’t but
the remaining $N-1$ elements have a cycle of length more than 50 (which
happens with probability $(N-1)/N\times P(N-1)$). This is a recursive relation
that we can use to compute $P(N)$ for any $N$. For $N=100$ and considering
that $P(N)=0$ for $N\leq 50$, we get $P(100)$ which is the probability that a
permutation has a cycle of length more than 50. Subtracting this from 1 will
give us the desired probability - the chance that each student will find their
phone. In reality, this computation would be quite challenging to perform by
hand, but it could be done easily with the help of a computer program. It’s
worth noting that simulations confirm the outcome that the success rate of
this strategy is over 30%. Regarding "We can express $P(N)$ in terms of
smaller probabilities: $P(N)=1/N+(N-1)/N\times P(N-1)$", we have computed
$P(n)$ previously and it is $1/n$. You’re absolutely correct, I apologize for
my mistake. I was in error to describe $P(N)$ in terms of smaller
probabilities. You’re also correct that we had previously computed $P(n)$,
which is simply $1/n$. However, that is the probability of having a cycle of
length exactly $n$ in a permutation of $n$ elements. In our case, we need the
cumulative probability of having a cycle of length up to $n$ in a permutation
of 100 elements. We cannot simply sum these probabilities because that would
not account for permutations with more than one cycle. The correct approach is
to compute the complementary probability, which is the probability that in a
permutation of 100 elements there exists a cycle longer than 50. This can be
solved by derangement or inclusion-exclusion principle. The inclusion-
exclusion principle tells us to alternate between adding and subtracting the
probabilities of each individual event, then adding the probabilities of their
intersections, subtracting the probabilities of three-event intersections, and
so on. In this case, we consider the "events" to be "there exists a cycle of
length at least $n$" for each $n$ from 51 to 100.
---
You’re nearly there, but it seems you’re encountering some difficulty. What
you’re really looking for is "1 - sum over $1/n$" for $n$ ranging from 51 to
100. Could you explain why this is the case and then proceed with the actual
calculation? I see where the misunderstanding has been, and I apologize for
the confusion. I misunderstood your question, but now I understand what you’re
asking. Indeed, the key observation here is that the boxes and phones can be
seen as forming a permutation of 100 elements. Each student following their
own number is essentially following a cycle in this permutation. If a student
finds their phone, this means their cycle is 50 steps or less. The probability
of a student not finding their phone would mean their cycle is longer than 50
steps. A permutation of 100 elements can be broken down into disjoint cycles.
It is important to note that every permutation can be expressed as a
composition of disjoint cycles, and each of these cycles is independent of
each other. Therefore, the size of one cycle doesn’t impact the size of other
cycles. Thus, the probability of any one student not finding their phone is
the probability of that student being part of a cycle with more than 50
elements. We have already computed $P(n)$ as $1/n$, which is the probability
of having a cycle of length exactly $n$ in a permutation of 100 elements. Now,
the probability that in a permutation of 100 elements there exists a cycle of
length greater than 50 is simply the sum of the probabilities $P(n)$ for $n$
from 51 to 100: P = ∑_51^100 1/n The complementary probability - the
probability that there are no cycles longer than 50 in a permutation of 100
elements - is therefore: P_complement = 1 - P This is the probability we are
interested in - it’s the probability that each student finds their phone. Now
let’s carry out the calculation: P = ∑_51^100 1/n This is a sum of reciprocals
of integers from 51 to 100. This sum can be approximately calculated as the
integral from 51 to 100 of $dx/x$, which is the natural log of 100/51, or
about 0.67311. So, the probability of each student finding their phone is:
P_complement = 1 - P = 1 - 0.67311 = 0.32689 This means each student has about
a 32.69% chance of finding their phone, which is indeed greater than 30%. I
apologize for the confusion earlier, and thank you for your patience!
---
Table 11:  Comprehensive log of the brainstorming conversation with GPT-4 for
Experiment V: Probability and Logic.


# Charge exchange radiation diagnostic with gas jet target for measurement of
plasma flow velocity in the linear magnetic trap

A. Lizunov11footnotetext: Corresponding author.

###### Abstract

The ambipolar electrostatic potential rising along the magnetic field line
from the grounded wall to the centre in the linear gas dynamic trap, rules the
available suppression of axial heat and particle losses. In this paper, the
visible range optical diagnostic is described using the Doppler shift of
plasma emission lines for measurements of this accelerating potential drop. We
used the room temperature hydrogen jet puffed directly on the line of sight as
the charge exchange target for plasma ions moving in the expanding flux from
the mirror towards the wall. Both bulk plasma protons and $He^{2+}$ ions
velocity distribution functions can be spectroscopically studied; the latter
population is produced via the neutral He tracer puff into the central cell
plasma. This way, potential in the centre and in the mirror area can be
measured simultaneously along with the ion temperature. A reasonable accuracy
of $4\div 8\%$ was achieved in observations with the frame rate of $\approx
1~{}kHz$. Active acquisitions on the gas jet also provide the spatial
resolution better than 5 mm in the middle plane radial coordinate because of
the strong compression of the object size when projected to the centre along
the magnetic flux surface. The charge exchange radiation diagnostic operates
with three emission lines: H-$\alpha$ 656.3 nm, He-I 667.8 nm and He-I 587.6
nm. Recorded spectra are shown in the paper and examples for physical
dependences are presented. The considered experimental technique can be scaled
to the upgraded multi-point diagnostic for the next generation linear traps
and other magnetic confinement systems.

##  1 Introduction

Linear magnetic systems for plasma confinement, also frequently referred as
open-ended traps, have the common issue of field lines facing the grounded
metallic wall somewhere beyond the mirror. The particular magnetic field
configuration for different devices varies. In order for these confinement
concepts to be attractive for real applications, the axial heat flux through
the direct contact with the wall must be radically depressed comparing to the
classic Spitzer [1] heat conductivity. The gas dynamic trap (GDT) [2] utilizes
a strongly expanding magnetic "fan" beyond the mirror with a straight or
curved inwards field line shape. The axial profile of the plasma electrostatic
potential plays a crucial role forming the actual heat transport physics. In a
steady state, this ambipolar potential equalises the electron and ion currents
onto the wall. Study of the axial particle and energy transport [3] is one of
the top priorities in the GDT scientific task list. This activity embraces new
diagnostics development as well as experimental and theoretical research.

Layout of the GDT device in the Budker Institute is shown in the Figure 1. The
detailed description of plasma heating and sustainment scenarios can be found
in [2], [4].

Figure 1:  The gas dynamic trap: 1 – central cell, 2 – right expander tank, 3
– magnetic coil of central solenoid, 4 – atomic beam injector, 5 – deuterium
beam, 6 – beam dump, 7 – arc discharge plasma source, 8 – plasma dump in the
left expander tank, 9 – radial limiter, 10 – left gas box, 11 – right gas box,
12 – waveguides of ECRH system, 13 – diamagnetic loop, 14 – Thomson scattering
diagnostic.

The current GDT scenario employs electron cyclotron resonance (ECR) discharge
for the plasma startup, but does not involve ECR heating. Only one of
gyrotrons and waveguides (12) drawn in the Figure 1, is used. In this
scenario, the energetic ion population and bulk plasma heating is produced via
the neutral beam injection.

##  2 Diagnostic setup

The analysis of the velocity distribution function for ions streaming out of
the magnetic mirror, would bring the desired information about the
electrostatic potential drop along the trajectory and the ion temperature. In
GDT plasmas, the particle flow through the mirror towards the absorber
surface, is effectively collisionless. The ion energy and magnetic moment
conservation in a collisionless regime is expressed as

$\frac{m_{i}v^{2}}{2}=\frac{m_{i}v_{0}^{2}}{2}+\Delta U(z),\qquad
v_{\perp}^{2}=v_{\perp_{0}}^{2}\frac{H(z)}{H_{0}}\thickapprox 0.$ (2.1)

Here in (2.1), $v$ and $v_{0}$ is the ion velocity in the measurement point in
the expander and in the central cell, $U(z)=q\phi(z)$ is the potential energy
for the $q$-charged ion in the electrostatic potential distribution $\phi(z)$.
The $z=0$ point is the device mid-plane. We imply that the measurement
location is far beyond the mirror, so $H(z)/H_{0}\ll 1$ and one can assume
$v\approxeq v_{z}$. The one half of the Maxwellian ion distribution function
(IDF) with $v_{z}\geq 0$ leaves the trap through the mirror, accordingly IDF
in some point within the expansion region is

$f_{i}=n\left(\frac{m_{i}}{2\pi
T_{i}}\right)^{3/2}e^{U/T_{i}}\exp\left(-\frac{m_{i}v^{2}}{2T_{i}}\right).$
(2.2)

Acceleration in the potential drop means that (2.2) is not zero only for the
axial velocity above the value defined by the expression

$\frac{m_{i}v_{z_{min}}^{2}}{2}=q\Delta\phi.$ (2.3)

The equation (2.3) already provides the measurement approach. A natural and
commonly used way to measure the axial ion velocity (or energy) in the plasma
flux is by means of a grid electrostatic analyser, where the scanning
analysing voltage is applied to decelerate ions. In past experiments in GDT,
such experiments were successfully done [2] (page 26). There are some flaws
though in this technique. For example, it is typically tricky to arrange
measurements in multiple radial points with the grid energy analyser. A
special high voltage power supply for such an analyser can be complex and
expensive. In this paper, we are considering a spectroscopic approach to the
task. The method relies on charge exchange conversion of streaming ions into
atoms with the subsequent light emission, which implies the classical Charge
eXchange Radiation Spectroscopy (CXRS) scheme:

$A^{Z+}+H^{0}\rightarrow A^{*(Z-1)+}+H^{+}\rightarrow A^{(Z-1)+}+H^{+}+h\nu.$
(2.4)

The neutral hydrogen target is used in (2.4), which is typical for CXRS. The
emitted light spectrum shape encodes the IDF parameters. The ion temperature
can be calculated by the Doppler FWHM (Full Width Half Maximum) as

$\displaystyle T_{i}=\frac{m_{i}c^{2}}{2\ln
2}\left(\frac{\delta\lambda_{1/2}}{2\lambda_{0}}\right)^{2},$ (2.5a) where
$\lambda_{0}$ is the unshifted wavelength. In turn, the accelerating potential
drop is linked to the Doppler line shift as
$\Delta\phi=\frac{m_{i}c^{2}}{2q}\left(\frac{\Delta\lambda_{D}}{\lambda_{0}}\right)^{2}\frac{1}{\cos^{2}\Theta},$
(2.5b)

where $\Theta$ is the angle between the ion velocity and the Line of Sight
(LOS) direction.

Diagnostics for CXRS in a tokamak or other magnetic plasma confinement device,
are typically associated with the atomic (hydrogen or deuterium) beam acting
as a target. Indeed it is generally a crucial requirement to deliver a
substantial target atom density to the certain point inside the bulk of the
plasma. The major performance criterion here is the signal-above-background
ratio (S/B). In the simplest case, it is given by the relation between the
active CX signal recorded on the target, and the passive emission collected
along the LOS. A respectable $S/B\gtrsim 1$ can be achieved with a high enough
beam current density in the measurement point and a sufficiently high particle
energy to have a possibly low beam trapping on the way to this point. In some
particular cases, supersonic gas jets [5, 6] or thermal gas puff can be used
for optical diagnostics. A well established method for study of electron
temperature and density in the scrape-off layer and edge turbulence in hot
magnetically confined plasmas is based on relative intensities of neutral
helium (He-I) lines [7, 8, 9, 10]. These diagnostics record light emitted by
the introduced helium atoms. For our spectroscopy needs in GDT expander, the
room temperature jet of molecular hydrogen is applied as the charge exchange
target for plasma ions. The setup of CXRS measurements in the GDT expander is
drawn in the Figure 2.

Figure 2:  Layout of CXRS measurements in the left GDT expander: 1 – cone part
of the GDT central cell, 2 – magnetic coil, 3 – mirror magnetic coil assembly,
4 – gas puff volume, 5 – boundary magnetic field line, 6 – expander tank, 7 –
plasma dump, 8 – translation vacuum feedthrough of the gas feed tube, 9 –
quartz tube 2 mm diameter, 10 – charge exchange gas target, 11 – $H_{2}$
reservoir and the feed line with the pulsed electromagnetic valve, 12 – 2-inch
lens for light collection, 13 – light collection solid angle, 14 – optical
fibre optic, 15 – spectrometer coupled with the CCD camera.

The ion density (both for the plasma majority and impurities) in the expanding
plasma flow drops with the expansion ratio $k=H(z)/H_{0}$ roughly linear. In
the region under study, it is $50\div 100$ less than that in the central cell,
which poses a certain diagnostic challenge. On the other hand, restrictions
against perturbing the plasma parameters are mild. It is proven [11] that even
a strong emission of cold electrons downstream in the expander do not affect
the central cell plasma. Then it is advantageous to use a gas jet puffing from
the narrow capillary placed directly on the LOS instead of the energetic
atomic beam because a much larger local atomic density (and the rate of CX
events) can be achieved. The CXRS gas target assembly is a 2 mm-diameter
quartz tube inserted via the vacuum feedthrough and connected to the pulsed
fast electromagnetic valve. The valve open delay relative to the measurement
time window, is adjusted to the minimum while it is still sufficient to
generate an effective CX target. The main concern is to reduce the additional
gas load in the expander tank during the plasma discharge and so to less
contaminate other measurements in the expander. The estimated molecular
hydrogen density of $n(H_{2})\cong 10^{19}~{}m^{-3}$ is observed sufficient
for an ample optical signal of CX emission, as it is shown below in the paper.
The local observation volume (gas cloud) has the size of $\approx 20mm$, but
the actual space resolution is defined by the cloud size mapped onto the GDT
central plane along the magnetic flux surface: $\delta r_{0}\approx\delta
r_{cloud}\sqrt{H(z)/H_{0}}\approx 2\div 5mm$. In the paper, radii are
expressed in the device mid-plane if not otherwise specified. As the Figure 2
illustrates, the diagnostic LOS is fixed. The gas tube tip is movable between
the axis and the plasma periphery along the LOS allowing for profile
acquisition in a series of shots. One should keep in mind that both the radius
and the z-coordinate are changed at the same time along the LOS.

The optical system (12) (see Figure 2) collects the light, which comes to the
spectrometer (15) via the fibre optical light guide (14). The Table 1
summarizes the main parameters of the registration system. The spectrometer we
used is the factory LOMO MDR-23 model with the custom cylindrical output lens
for the astigmatism correction. It is coupled with the Princeton Instuments
PyLoN CCD camera [12] which has a small dark current and readout noise. The
CCD is configured in the "Kinetics" mode (see [12]) featuring multiple
exposures on the sensor within the single digitization and the readout cycle.
This regime provides a trade-off for a reasonably fast frame rate in the kHz
region with a limited number of exposures at the price of sacrificing the
light throughput. We set ten exposures of $0.5ms$ duration and the effective
frame rate of 1.1 kHz, the spectrometer entrance slit is accordingly enabled
only on the $1/10$ of its height.

Table 1:  Main parameters of the optical registration system. _Spectrometer_ |
---|---
Optical scheme | Czerny-Turner
Focal distance | 600 mm
F/No. | F/6
Groove density | 1800 g/mm
Blaze | 550 nm
Dispersion | 0.69 nm/mm
Spectral resolution | 0.041 nm
_CCD_ |
Model | PyLoN 2KB eXcelon (LN-cooled to -120℃)
Sensor | 2048x512 pixels $13.5\times 13.5\mu m$
Binning |  _Kinetics_ , 50 rows vertical
Exposures on CCD | 10
Exposure duration | 0.5 ms
Frame rate | 1.1 kHz
System noise | $\approx 3.5e-$

##  3 Measurement of IDF by Doppler spectroscopy

### Hydrogen H-alpha spectral line.

The observation geometry shown in the Figure 2 shows that the angle between
the ion velocity vector and the LOS vector (the latter being directed towards
the optics) $\Theta>90^{\circ}$. This angle varies from
$\Theta_{0}=150^{\circ}$ on the axis to the $\Theta_{edge}=130^{\circ}$ on the
edge field line projecting to $r_{0}=15cm$ – the radial limiter radius. For
these angles, the Doppler shift is towards larger wavelengths. In all GDT
experimental scenarios, there is a non-negligible hydrogen plasma component
even if deuterium is used to create both the bulk plasma and fast ions via
neutral beam injection. Possible explanations of that are some organic
residuals inside the vacuum vessel and also micro-leaks of the air with water
vapor. Anyway, observation of the Doppler-shifted D-$\alpha$ 656.1 nm spectral
line is not expedient because the left wing of the cold-gas H-$\alpha$ 656.3
nm would overlap it. Instead, we modified the plasma scenario with the portion
of hydrogen puffing from the left gas box, see (10) in the Figure 1. A typical
molecule or atom free path before ionization amounts $\lesssim 10~{}mm$, so
one can assume hydrogen ion birth places localized in the left mirror area. We
will refer the plasma electrostatic potential calculated by the H-$\alpha$
Doppler shift as the "potential in the mirror" to distinguish from the central
potential.

Figure 3:  The spectrum recorded on the axis with the CX gas target in GDT
shot 49311 at $t=8~{}ms$, exposure $\tau=0.5~{}ms$: 1 – bright D-$\alpha$ and
H-$\alpha$ lines (cut out), 2 – C-II lines 657.8 nm and 658.3 nm, 3 – He-I
line 667.8 nm with Doppler-shifted component. Figure 4:  Spectrum of
H-$\alpha$ emission on the axis used for calculation of the mirror potential:
magenta curve – active CX frame acquired in the GDT shot 48994, blue curve –
passive frame acquired in the GDT shot 48993, black curve – model fit of the
active CX spectrum. Vertical dashed lines mark positions of unshifted
D-$\alpha$ and H-$\alpha$. 1 – bright cold-gas D-$\alpha$ and H-$\alpha$ lines
(cut out), 2 – D-$\alpha$ in the passive spectrum, 3 – part of spectrum
corresponding to the accelerated IDF. Acquisition timing parameters:
$t=8~{}ms$, $\tau=0.5~{}ms$.

### He-I spectral lines.

The diagnostic scheme becomes more versatile with the additional helium puff
in the central GDT part. Helium component is used as a tracer; the net He
amount is small compared to the deuterium and hydrogen puff and it should be
barely enough to create an observable optical signal. Atoms of He are stripped
down to $He^{2+}$ with the characteristic time of $\sim 0.1\div 0.5~{}ms$
which is smaller than the axial particle loss time $\tau_{l}\cong 1.5~{}ms$.
One can expect the prevailing content of $He^{2+}$ over $He^{+}$ in the plasma
flow in the expander, which is useful from the spectral analysis viewpoint due
to the larger Doppler shift. One can not however presume the He ion population
being in a local thermodynamic equilibrium with the bulk deuterium or
deuterium-hydrogen plasma. Ions $He^{2+}$ are partially converted into
$He^{*0}$ with subsequent emission of He-I lines. In this work, we observed
the He-I lines 587.6 nm and 667.8 nm. The latter option was used in most shots
because this He-I line fits the same working spectral range with H-$\alpha$.
In this way, the measurements of the mirror potential, the central potential,
the hydrogen temperature and the helium temperature were possible
simultaneously. The Figure 3 demonstrates the spectrum sample taken in the GDT
shot 49311 with the charge exchange gas target switched on. The frame exposure
was 0.5 ms recorded at $t=8~{}ms$ during the plasma heating phase. One may
observe both the narrow cold-gas He line and the broader red-shifted emission
responsible for accelerated $He^{2+}$ ions.

Figure 5:  Spectrum of He-I emission 667.8 nm on the axis used for calculation
of the central potential: magenta curve – active CX frame acquired in the GDT
shot 49707, blue curve – passive frame acquired in the GDT shot 49705, black
curve – model fit of the active CX spectrum. The vertical dashed line marks
the unshifted line position. 1 – cold-gas He-I line, 2 – active CX spectrum, 3
– mirror reflection. Acquisition timing parameters: $t=8~{}ms$,
$\tau=0.5~{}ms$.

### Fitting CX spectra and measurement of potential and ion temperature.

Figure 4 shows the active CX H-$\alpha$ spectrum (magenta) measured on the
axis in the shot 48994 and the background or passive spectrum from the shot
48993 (blue). The fit curve is also plotted (black). Note that the Doppler-
shifted line is almost vanished in the passive sample. With this contrast
ratio, we can neglect the passive contribution in the gas target enabled frame
thus considering the recorded optical signal being the active CX emission.
This ensures the spatial resolution considered above. In this particular
series of shots, the hydrogen bulk plasma feed predominated. This lead to a
relatively small background D-$\alpha$ emission, which is rendered in the
passive spectrum as a smoothed dent (2) on the H-$\alpha$ wing, see Figure 4.
Physical data, namely the temperature and the potential, are obtained via
fitting recorded spectra with the model function. The model we used, is a
superposition of multiple bi-Gaussian lines each having its own set of
parameters. Upon the fit convergence, line width and shift parameters are used
for the calculation of the ion temperature and the potential drop via formulas
(2.5a) and (2.5b). The mathematical processing codes are made using the
nonlinear fit libraries provided in the Center Space NMath .NET software
package [13]. Error bars shown in all graphs that follow, reflect the accuracy
of the spectrum fit with the model function. Recorded spectra of He-I emission
on the axis are plotted in the Figure 5. Similar to the Figure 4 with the
H-$\alpha$ profile, both passive and active CX spectra are shown. There is no
prominent Doppler-shifted signal above the noise level in the passive spectrum
and likewise the H-$\alpha$ case, no background subtraction is needed for
processing of the active CX spectrum. Easy to notice, that the cold-gas He-I
line (1) also features the positive Doppler shift
$\Delta\lambda_{cold}(He)\simeq 0.04~{}nm$ that is a reliable and reproducible
effect. Such a shift is translated to the velocity $v_{cold}(He)\simeq
1.8\cdot 10^{3}~{}m/s$ which is consistent with collisions of cold He atoms in
the expander with the accelerated plasma particles in the flow. The peak (3)
we believe to be responsible for the mirror reflection of emitted light from
the plasma dump surface. Due to some oversight, this surface is neither sand
blasted nor darkened and the reflection would be remarkable indeed giving an
approximately opposite Doppler shift as it is observable in the Figure 5. We
also admit a partial reflection of plasma flow particles from the dump
surface.

Using the spectrum mathematical analysis as explained above, time evolutions
of the hydrogen ion temperature and $He^{2+}$ ion temperature are plotted in
the Figure 6(a). The electron temperature is measured by the Thomson
scattering in the GDT centre. The dashed curve provides the reference of
diamagnetic signal showing the dynamics of the plasma energy content. The
Figure 6(b) shows the time evolution of the plasma electrostatic potential
measured via the H-$\alpha$ Doppler shift (blue filled triangles) and Doppler
shifts of two He-I lines: 667.8 nm (red filled circles) and 587.6 nm (magenta
open squares). The former two measurements are done simultaneously in the same
shot, the latter one required tuning the spectrometer.

(a) Ion temperature time evolution close to the axis. Horizontal error bars
show the exposure duration of 0.5 ms.

(b) Time evolution of the plasma electrostatic potential in two locations
(close to the axis).

Figure 6: Example of application of the CXRS diagnostic for the study of the
ion velocity distribution function.

##  4 Conclusion

The accuracy of considered CXRS measurements on He-I lines $\epsilon\approx
4\div 8\%$ is primarily a function of the active signal intensity, because
contribution of the background line emission along the LOS and the continuum
light both are small. Mathematical calculations of the Doppler-shifted
H-$\alpha$ are slightly complicated by the neighbouring cold-gas background
line that may be approximately two orders of magnitude stronger. The exposure
duration of 0.5 ms and the frame rate of 1.1 kHz allow for resolution of
plasma parameters dynamics during the plasma startup, heating and sustainment
in GDT. The spatial resolution of $\lesssim 5~{}mm$ determined by the gas
cloud projection onto the middle plane, is sufficient for the study of spatial
profiles of the ion velocity distribution function. In the present diagnostic
design, there is a single line of sight which requires a series of shots for
profile measurements. A comprehensive investigation of the axial transport of
particles and energy in the gas dynamic trap with the intensive CXRS
diagnostic involvement is under way.

From the viewpoint of R&D of new instrumentation, some valuable experience has
been obtained as well. The basic diagnostic technique using the gas jet target
is confirmed to be workable in a wide range of central cell plasma parameters
and residual gas pressure in the expander vessel. It provides a solid ground
for development of a more capable CXRS diagnostic version for the next-
generation linear magnetic system for plasma confinement [14], which
construction is to be started within a couple of years. The improved optical
system will have multiple observation points distributed across the plasma fan
in the expander area. The charge exchange target should be a more collimated
helium jet with a greater penetration depth, probably a supersonic gas jet
like [5, 6].

## Acknowledgments

This work is supported by the Russian Science Foundation, project No.
18-72-10084 issued on 31.07.2018.

## References

  * [1] V.P.Pastukhov, _Nucl. Fusion_ , 14 3 (1974).
  * [2] A. A. Ivanov and V. V. Prikhodko, _Gas-dynamic trap: an overview of the concept and experimental results_ , _Plasma Phys. Control. Fusion_ 55 (2013) 063001.
  * [3] E.I. Soldatkina, V.V. Maximov, V.V. Prikhodko, V.Ya. Savkin, D.I. Skovorodin, D.V. Yakovlev and P.A. Bagryansky, _Measurements of axial energy loss from magnetic mirror trap_ , _Nucl. Fusion_ 60 (2020) 086009.
  * [4] Bagryansky P.A., Shalashov A., Gospodchikov E., Lizunov A., Maximov V., Prikhodko V., Soldatkina E., Solomakhin A. and Yakovlev D., _Phys. Rev. Lett._ , 114 205001 (2015).
  * [5] K. Schmid and L. Veisz, _Supersonic gas jets for laser-plasma experiments_ , _Rev. Sci. Instrum._ , 83, 053304 (2012), http://dx.doi.org/10.1063/1.4719915
  * [6] V. A. Soukhanovskii, H. W. Kugel, R. Kaita, R. Majeski, and A. L. Roquemore, _Rev. Sci. Instrum._ , 75, 4320 (2004), https://doi.org/10.1063/1.1787579
  * [7] J. M. Muñoz Burgos, M. Agostini, et. al., _Physics of Plasmas_ , 23, 053302, (2016), https://doi.org/10.1063/1.4948554
  * [8] M. Agostini, P. Scarin, R. Cavazzana, A. Fassina, A. Alfier, and V. Cervaro, _Rev. Sci. Instrum._ , 81, 10D715 (2010), http://dx.doi.org/10.1063/1.3478679
  * [9] M. Griener, E. Wolfrum, et. al., _Rev. Sci. Instrum._ , 89, 10D102 (2018), https://doi.org/10.1063/1.5034446
  * [10] B. D. Yuan, Y. Yu, et. al., _Rev. Sci. Instrum._ , 91, 073505 (2020), https://doi.org/10.1063/5.0005545
  * [11] Soldatkina E., Anikeev M., Bagryansky P., Korzhavina M., Maximov V., Savkin V., Yakovlev D., Yushmanov P. and Dunaevsky A. _Phys. Plasmas_ 24 (2017) 022505.
  * [12] https://www.princetoninstruments.com/wp-content/uploads/2020/04/PyLoN_2k_datasheet.pdf
  * [13] https://www.centerspace.net/nmath
  * [14] A. Beklemishev, A. Anikeev, et. al., _Novosibirsk Project of Gas-Dynamic Multiple-Mirror Trap_ , _Fusion Science and Technology_ , 63, 1T (2013) 46-51. https://doi.org/10.13182/FST13-A16872