]National Council of Research – CNPq

# Contributions of Talent, Perspective, Context and Luck to Success

Bernardo Alves Furtado  [<EMAIL_ADDRESS>Institute for Applied
Economic Research – Ipea
Brasília, Brazil

###### Abstract

We propose a controlled simulation within a competitive sum-zero environment
as a proxy for disaggregating components of success. Given a simulation of the
Risk board game, we consider (a) Talent to be one of three rule-based
strategies used by players; (b) Context as the setting of each run of the game
with opponents’ strategies, goals and luck; and (c) Perspective as the
objective of each player. Success is attained when a first player conquers its
goal. We simulate 100,000 runs of an agent-based model and analyze the
results. The simulation results strongly suggest that luck, talent and context
are all relevant to determine success. Perspective – as the description of the
goal that defines success – is not. As such, we present a quantitative,
reproducible environment in which we are able to significantly separate the
concepts, reproducing previous results of the literature and adding arguments
for context and perspective. Finally, we also find that the simulation offers
insights on the relevance of resilience and opportunity.

Talent, Luck, Agent-based models, Competition, Game simulation

††preprint: arxiv.org/abs/2001.00034

##  I Introduction

Western culture has come to believe that success is mostly a consequence of
talent and skills, basically derived from meritocratic efforts. A number of
papers have shown quite the opposite. In most cases, luck is dominant or the
sole effect. Personal characteristics seem to be marginal and restricted to a
few cases. We suggest that one of the reasons why the issue is still
controversial lies in the difficulty to separate the effects of each one of
the components of success. We propose a controlled simulation that enables the
distinction among context, talent, perspective, and luck. We do so simulating
100,000 runs of a version of the Risk board game that enables accounting for
each element influence towards success.

Risk is a competitive sum-zero game in which players wage war to conquer
opponents’ countries towards specific goals. Goals are designed so that its
completion demands conquering at least eleven new countries or entirely
destroying an opponent. Every player starts with seven countries. Players take
turns deploying a rule-based number of armies, attacking (and defending) and
rearranging troops.

Different environments for each run promotes the environment in which the
mixture of talent, luck and perspective contributes to success. We apply the
following definitions:

  1. 1.

Talent is a rule-based technique. The ability or skill that each one of the
individual strategies within the simulation has to lead to a successful
winner. As the results will demonstrate, there is a clear performance
distinction among the strategies. Such configuration provides that each
different strategy has a clearly defined, permanent, quantifiable talent.

  2. 2.

Perspective is defined as the goal that each player has to achieve. Once more
the analysis of the simulation will show that there are easier and more
difficult objectives in the game. That indicates that a given effort, or luck
in a given run may be sufficient to determine a winner under a given goal, but
insufficient on another one.

  3. 3.

Context considers that each game run may vary in difficulty as the other five
players have ever-changing luck, strategies and goals. Basically, results are
not independent Albert and Bennett (2007). That means that players with
exactly the same strategy and the same amount of luck would perform
differently, conditionally on each game sets of other players’ strategies,
goals and luck. Further, because Risk is a competitive, single-winner game,
success only comes when the other players are unable to achieve their goals
within a shorter number of runs. Finally, context may also include various
kinds of cooperation. One player with a destroy goal may be helped by an
opponent. Or two players may independently and without communication or
collusion help each other against a third power.

  4. 4.

Luck is a chance occurrence Mauboussin (2012). It derives from rolling dice in
the form of a numpy python pseudo-random generator. Luckily, however, given
the fact that we are running a simulation, we are able to record each time a
die is rolled, and save the results considering the opponent’s die. For
example, getting a two when the defender gets a one may be just lucky enough.
However, having a six when the defender also draws a six is bad luck, as rules
determine that ties always favor the defender.

We follow Ioannidis Ioannidis (2005) precepts of an evidence-based analysis.
We use definitions with a clear design and implementation whilst having no
interest in the results. We also are able to run games with long trajectories,
incorporating sample size within the discussion.

Pluchino et al. Pluchino  _et al._ (2018) make a comprehensive review on
talent and luck. They apply a simple agent-based model (ABM) to test the
assumption that success is a talented-weighted multiplicative result. In their
own words ”…building on a minimal number of assumptions, i.e., a Gaussian
distribution of talent and a multiplicative dynamics for both successes and
failures, we present a simple model…” (Pluchino  _et al._ , 2018, p.1850014-4)
As such, talented people happen to be more successful, but just marginally so,
with non-talented people also reaching stardom quite often.

Moreover, Pluchino et al. Pluchino  _et al._ (2018) show that luck and
randomness have proven to be decisive to determine success in many areas, such
as scientists citation Ruocco  _et al._ (2017), innovative ideas Iacopini  _et
al._ (2018), music Salganik  _et al._ (2006) and finance Robert H Frank
(2016); or failure, such as a disease interrupting trajectories Tomasetti  _et
al._ (2017). Others Liechti  _et al._ (2014) defend the view that luck is
relevant on some occasions, but that even believing in luck, or perception of
being luck, might alter ones behavior.

Chamorro-Premuzic Chamorro-Premuzic (2016) conducted a survey to explore how
much luck is important. He argues that luck is relevant, but talent and effort
also play significant roles. That is in line with the findings of Duckworth
(2016), who conceptualized effort as grit.

This perception that luck may play a lesser role is in accordance with the
general view of surveyed CEOs Liechti  _et al._ (2014). When asked what
affects workers performance, talent was found to be more relevant. Thus, a
belief in talent and meritocracy remains. Still about perception of luck,
Liechti Liechti  _et al._ (2014) argues that the simple belief in luck changes
people’s behavior and those who believe tend to be consistently less
entrepreneurial.

This view of unimportance of luck is counterbalanced by Taleb, for instance,
who says that ”life is the cumulative effect of a handful of significant
shocks” (Taleb, 2010, p. xix) and supported by Pluchino et al. Pluchino  _et
al._ (2018), for whom luck is determinant and talent is just marginal.

In finance, the literature is interested in decomposing talent and luck so
that choices and rewards can be better distributed. Deciding on the correct
timing and sector to launch new businesses has been said to be a skill Gompers
_et al._ (2006) that can predict future success Gompers  _et al._ (2010).
Whereas when fund performance is concerned, talent is large enough to overcome
the costs of paying analysts for just a few number of firms Fama and French
(2010). Follow-up on Fama and French’s paper Korteweg and Sorensen (2017)
confirms small influence of managers of Equity Mutual Funds on performance and
success.

In the labor market, however, luck is found to be not important, relatively to
managerial skill, firm size and market competition Brookman and Thistle
(2013). Campbell and Thompson Campbell and Thompson (2015) investigates pay
asymmetry for CEOs finding that most difference does not come from luck or
skill, but from a number of entangled factors, being executive retention a
relevant one. Moreover, Korteweg and Sorensen Korteweg and Sorensen (2017)
find that one can only explain firms’ performance based on skill alone when
having a large sample – including at least 50 lags – and details at the level
of individual members of the firm in order to predict correct performance.

In terms of different methodologies applied to disaggregating luck and talent,
we could mention survey techniques Liechti  _et al._ (2014), simulation and
bootstrapping Yang and Liu (2017) and variance decomposition Korteweg and
Sorensen (2017).

Besides the discussion of contributions of skill to performance in finance, a
legal question – whether poker is a game of chance or a game of skill – has
been discussed for some time Cabot and Hannum (2005); Meyer  _et al._ (2013);
Levitt and Miles (2014).

Levitt Liechti  _et al._ (2014) states that luck is the ”dominant factor”,
although skill may have marginal influence. Meyer Meyer  _et al._ (2013) opted
for a controlled experiment to confirm that experts failed to financially
outperform average players.

Simulation of board game Risk has been present in the literature before with
emphasis on the learning environment Wolf (2005) and as a field in which
Artificial Intelligence (AI) players could be tested and enhanced Bence Szabo
_et al._ (2015). The game has also been used as a means of testing Monte Carlo
Tree Search methods Brand and Kroon (2014) and collaborative systems Badeig
_et al._ (2016). However, to the best of our knowledge there has not been a
study to focus on the concept of luck and randomness applied to Risk, except
to that of winning the game itself Honary (2007).

This brief read of the literature suggests that luck is the relevant factors
in a number of occasions, although there is a recognition that individual
talent and skill may play a marginal role in some specific cases. As such,
talent would be just a marginally weighting pendulum, however insufficient to
counter-balance chance.

We believe that the difficult in making a distinction of the causal relevance
for either luck or talent derives from the complexity of quantitatively
measuring them. Hence, a controlled simulation in which both: talent and luck
are measured, along with a given context and a number of declared goals is a
reasonable way to disaggregate this influencing force.

The contribution of this paper is to design and control a competitive, complex
simulation with accountable doses of luck and, thus, be able to distinctly
separate the influence of each component of success attainment. Further, we
help conceptualize talent as a strategy, context as a simulation environment
and perspective as a goal and apply those on a rule-based, reproducible, data-
rich environment.

The literature suggests that the decomposition of each of the influences on
success may be useful and applied to areas as diverse as finance, political
forecasting or wage determination.

Our results confirm previous literature towards the relevance of luck and
randomness on success. However, we point further to the changing power of
talent and context to achieve success.

Besides this introduction, we present a description of the simulation, the
rules, the strategies and the goals. Then we elaborate some hypothesis on the
probabilities of the results, present them and discuss the results relative to
the conceptualization made. We sum up with final remarks.

##  II Methods

The procedures of the game follow a general version of the board game Risk,
without distributing cards at the end of each turn. Basically, there are
always six autonomous players that dispute 42 countries available in the
world. Countries have a fixed set of neighbors and are organized within six
continents. Although the simulation reasonably replicates the unfolding of a
typical game with human players, the sole objective of the simulation is the
capacity to significantly separate the characteristics of talent, context and
perspective from luck.

Before the first turn, the 42 countries are randomly assigned to each player
so that each one has 7 countries before the game starts. Players also choose a
random goal and strategy. Players then deploy their allotted amount of armies
at once, and each, in turn, attacks. Whenever a country owner is attacked, he
or she defends itself. After the first turn, army deployment happens before
each players turn. Whenever there is a winner, the game is over.

###  II.1 Procedures, rules, and a few details

We implemented the simulation in python. You can find the code repository at
GitHub.com/BAFurtado/Talent_vs_Luck. We set countries as a class of their own
listing their current owner, list of neighbors and continent affiliation.
World is also set up as a class that controls the unfolding of the game. As
such, it contains, players, countries, current turn, whether there is a
winner, as well as the network structure of the countries.

The other relevant class is that of players. It contains needed methods, such
as add and remove countries, calculate army size, deploy them according to
their strategies, keeping a record of owned countries and their armies.

At each turn, players need to (i) define their priorities, (ii) allocate
armies accordingly, (iii) decide where to attack and (iv) for how long. When
they are done attacking, they need to (v) decide whether and how to rearrange
possible remaining armies before letting the next player go.

#### Battle.

A battle to take over a country is defined on luck – rolling dice. Attackers
can only attack when they have more than a single army in any given country.
Attacks happen exclusively on neighboring countries. The size of the army
exceeding one is the number of dice the attacker rolls, always with an upper
bound of three. Defenders use the number of dice equivalent to the number of
armies in their country, also limited to three. Applying these rules means
that the number of dice rolling can be different for attackers and defenders.

Dice on both sides – attacking and defending – are sorted and compared in
pairs. Ties favor the defender. Losses are the result of each pair comparison.
Thus, the highest value of the attack is compared to the highest value in the
defense. Each loss, resulting from each pair comparison, reflects in one army
either from attacker or defender withdrawn from the board.

Note that armies are withdrawn only on pair comparisons. Thus, if the attacker
has 4 armies and the defender has 3 armies, the attacker will play three
against three. In this case, the sum of losses has to be three divided among
the attacker and defender depending on who wins each sorted pair of
comparison. However, when the attacker attacks with three and the defender
defends with one and wins, for example, only one pair was compared and then
just one army is subtracted from the attacker.

Every pair on every attack is recorded for both players with $+1$ for the
winner and $-1$ for the loser.

Once an attack decision has been made, battles go on as long as the attacker
has a number of armies above one or the defender has at least one army
standing. If successful the attacker, he or she occupies the newly conquered
country with up to three armies.

Each player at the beginning of each turn (except for turn 0) acquires a rule-
based number of armies that can be allocated in any of the player’s countries.
Armies are equal to the number of owned countries (floor) divided by 2, or the
scalar 3, whichever is larger.

Additionally, players who owns all countries for a given continent acquires
armies to deploy within that continent, following the proportion: 7 armies for
Asia, 5 armies for North America and Europe, 3 for Africa and 2 for South
America and Australia.

###  II.2 Talent and Perspective

#### Priorities.

The rationale that pushes forward each autonomous player reflects what human
players usually do: seek continent completion, whatever their goal, so that
the surplus of armies can propel them towards their objective. Typically,
becoming a strong player is the only pathway towards achieving a goal.

In the simulation, priority refers to a tuple of owned country–country to
attack that are neighbors. Each player at each turn first calculates the
proportion of each continent they own. Then, they will seek to conquer the
continents starting at the one where they own the highest proportion.

There are three alternative strategies randomly drawn to each player at each
game start. They represent the inherent talent of which player. The strategies
differ only on two moments. The first on (i) deciding how many armies to
allocate on priority countries and the second on (ii) rearranging armies at
the end of each turn.

#### Strategies.

Sensible: is a strategy in which – at allocating armies – a maximum of three
armies are allocated at each priority country. Further, armies are not
rearranged, they simply remain at their location at the end of the turn when
there are no more neighbors to attack.

Minimalist: is a strategy in which a single victory is aimed at on each turn.
Once a new country is conquered, the player will stop. Also, when rearranging
armies around countries, minimalist strategy will opt for overall protection
maintaining a minimum of two armies at each country.

Blitz: is a strategy in which the player will concentrate its armies on the
first priority country. Also, when rearranging, blitz will gather all armies
above one and distribute them on the priorities, enforcing protection on hubs.

#### Goals.

The goals provide the individual perspective on deciding when there is a
winner. At every end of turn, players check whether the goal has been achieved
or not. There are four different goals, drawn randomly in the beginning of the
game.

Territory24 is a flexible goal in which possession of any 24 countries is
sufficient to make a winner and – in the context of the simulation – determine
success.

Territory18 determines that the player needs to have possession of any 18
different countries with a further restriction of having at least 2 armies in
each one of them.

Continent establishes the possession of all countries in four different
combinations of continents which are drawn at the beginning of the game. They
player may have to conquer all countries in Asia and South America or Asia and
Africa or North America and Africa or North America, Asia and Australia.

Destroy is to eliminate one of the other opponents so that the enemy’s
countries are zero. Although others may weaken the opponent, if the goal
holder is not the one to take the last country of the enemy, its goal
automatically changes to Territory24.

#### Simulation, ties and reproducibility.

The user may run the simulation for a single game or thousands of times
cloning the repository (link at section II.1). On a terminal, type python
game_on.py to run a single game. The simulation outputs: the evolution of each
turn; players leaving the game – due to having no countries left –; the name
of the winner; its number of armies, strategy, goal and enemy; if any.
Additionally, a gif animation of the evolution of the graph of countries’
possessions is saved.

Most games will finish within the first tens of turns. We impose an ad hoc
limit of 200 turns when we stop the simulation and register a tie. In such
cases, we collect information on the player with most countries at the time as
the winner.

The user can run thousands of simulations 111Default is 10,000 times, but
100,000 will take less than two hours to run. typing python simulation.py. In
this case, the output is a CSV file containing the details of all runs.

The file records (i) the number of wins for each strategy-and-goal pair and
whether there was a tie or not. Hence, for each triple combination the table
shows: (ii) the number of countries the winner possessed, (iii) the average
number of wins on each pair of dice rolling for the winner and (iv) for the
average of the other players; (v) the number of pair comparisons for the
winner and (vi) for the average of other players, along with additional
supporting data for the second best player.

##  III Hypothesis

In this section we build some general hypothesis of expected results that will
function as a null model in the results and analysis discussion that follow.

Were the strategies considered to be independent and irrelevant to success,
that is, if the game winner were dependent on luck alone; then we would expect
an even distribution of winning strategies. Thus, each strategy would have an
estimated probability of success of $1/3$.

The probabilities for the goals are trickier. First, a player cannot have a
goal of destroying itself. Thus, there is a $1/6$ chance that a player who
gets ’Destroy’ gets himself or herself as an enemy. In such cases, the goal is
reassigned equally either to ’Territory24’ or ’Territory18’. Thus, we deduce
$1/24$ from ’Destroy’ and add $1/48$ to both ’Territory’ goals.

Second, the list of possible ’Continent’ assignment contains only four
combinations of continents. Thus, on the odd case that the $5^{th}$ or
$6^{th}$ game goal pick is ’Continent’, repeating at least the four previous
picks as ’Continent’, there are no more available combinations. When that
happens, the goal is also randomly reassigned to either ’Territory18’ or
’Territory24’. Therefore, we deduce $1/1024$ for each chance that there are no
more continents to pick, and add $1/1024$ to each of the ’Territory’ goals.

Third, dynamically along the game, most of the players with the goal ’Destroy’
may still become a ’Territory24’ when they are not the ones to conquer the
last country of their enemy. That is, when another player destroy the player’s
enemy, his or her goal is automatically changed. That further favors the goal
’Territory24’. For this case, we assumed that, on average, two out of the
other four players will get to destroy your enemy before you, further deducing
$1/40$ from the ’Destroy’ goal, and adding it to ’Territory24’.

Starting from equal shares of $1/4$ goals, and adding and deducing the amounts
above, we get a rough estimated probability that each goal amounts to the
following percentage of the total runs: ’Territory24’: 0.297, ’Territory18’:
0.272, ’Continent’: 0.248, ’Destroy’: 0.183.

Further, goals cannot be considered of the same degree of difficulty, nor
independent. First, if we consider difficulty to be the number of countries to
conquer, than ’Continent’ can have lists of sizes: 15, 16, 18 and 25. That is,
’Continent’ alone can vary among these numbers with an average of 18.5
countries.

Moreover, there is first the issue of conquering a specific ’localized’
country against ’any’ country – how to balance this difference in difficulty?
Then, there is the point of accounting for providing one extra army on each
country such as the goal of ’Territory18’. A third question would be how to
quantify the fact that others may help you along the way, conquering your
enemy’s countries, however, simultaneously hindering you from winning when you
are not the player to conquer the last standing country?

The issue of trying to differentiate goals’ difficulties contributes to our
concept of ’Context’. Success is given by circumstances and may be easier or
harder to accomplish.

In this section we were able only to roughly estimate a probability of
distribution of assigned goals and confirm their heterogeneity in difficulty.
In the next section we will get the number of goals at the end of the game
numerically for the 100,000 runs.

##  IV Results

Results refer to a simulation of 100,000 games played. The statistics
presented here come from running simulation.py with the option of generating
new data to False. The reproducible data of the 100,000 runs is available at
the GitHub repository.

###  IV.1 Talent

Strategies are clearly relevant to success with results departing strongly
from a hypothetical equal distribution of $1/3$.

The ’Blitz’ strategy dominates the results with 52,563 wins overall (see table
1). That is 19 percentage points above the expected results. Strategy
’Sensible’ comes next with 25,346 and ’Minimalist’ is the least competitive
with only 22,091 wins, which is nearly 11 percentage points below expected.
Results suggest that performance is not marginally, but significantly
different from average expected results.

Hence, for the remainder of the results, we implicitly consider ’Blitz’ to be
the most talented strategy, followed by ’Sensible’ as a somewhat neutral
strategy, and then ’Minimalist’ as a less efficient strategy.

Table 1:  Number of wins by strategy out of 100,000 simulations and percentage points difference from hypothetical expected value of $1/3$. Strategy | Wins | Perc. pts diff.
---|---|---
Blitz | 52,563 | 19 p.p.
Sensible | 25,346 | -8 p.p.
Minimalist | 22,091 | -11 p.p.

###  IV.2 Context: talent + luck + perspective

Out of 100,000 runs only 9,973 did not end before the $200^{th}$ turn and were
defined as ’Ties’ (see table 2 and figure 1). Nearly $2/3$ of the wins when
there was a tie, 6,214, were achieved with the ’Minimalist’ strategy for the
player with most countries at the end.

Table 2:  Number of wins by strategy and whether there was a tie. Tie | Strategy | Wins
---|---|---
False | Blitz | 51,556
| Minimalist | 15,877
| Sensible | 22,594
Total |  | 90,027
True | Blitz | 1,007
| Minimalist | 6,214
| Sensible | 2,752
Total |  | 9,973

The numbers on table 2 suggest that there may be a strategy best suited for
winning (’Blitz’) and one for defending (’Minimalist’). However, when luck is
added to the figure, it is clear that ’Minimalist’ is good in keeping the game
going only when luck is in its favor. Figure 1 shows the 9,973 simulations in
which the game ended with a tie and the average dice for winners and the
runner-ups. ’Blitz’ and ’Sensible’ in turn are strategies able to score wins
in the long run even when their overall average is negative.

Figure 1: Separation of luck, context and strategy for best and second-best
players in games ending with a tie. Strategy ’Minimalist’ has the most
countries when the dice are mostly positive on average. The few times ’Blitz’
and ’Sensible’ are the winners, they do so even against luck.

Indeed, ’Blitz’ seem to be much more aggressive than the other two strategies
with a higher mean number of countries in the end of the game, compared to a
much smaller number for strategies ’Minimalist’, and ’Sensible’ (see figure
2). Moreover ’Minimalist’ strategists seem to be more dependent to goal,
scoring nearly half of its few wins at the mark of 18 conquered (and
protected) countries.

Conversely, ’Blitz’ strategy seems incompatible with goal ’Territory18’,
winning only with dominance of the total number of countries in the game (see
figure 2). Only after having conquered everything, the player can build up its
defense and have two or more armies in each one of 18 countries. Moreover,
this aggressiveness is also shown on the average number of players still alive
at the end of the game when the winner has strategy ’Blitz’, compared to
’Minimalist’ and ’Sensible’.

Figure 2: Number of countries at end of simulation for each strategy

###  IV.3 Perspective

Relative to the results obtained for goals, ’Territory24’ was the winner goal
in 30,846 runs, which is very close to the estimated number of 0.2968% of
expected players holding such goal (Table 3). ’Territory18’, ’Destroy’ and
’Continent’ also perform close to their expected null results with
respectively 26,716, 19,353 and 23,085 wins.

Table 3:  Actual results, percentage and hypothetical number of wins for each goal. Goals | Wins | Percentage | Hypothetical Expected
---|---|---|---
Continent | 23,085 | 0.231 | 0.248
Destroy | 19,353 | 0.194 | 0.183
Territory18 | 26,716 | 0.267 | 0.272
Territory24 | 30,846 | 0.309 | 0.297

Another way to grasp the difficulty of the goals is to observe the number of
countries at the end of the simulation for each one (see figure 3). Note, for
example, that ’Destroy’ is a goal that is more evenly distribute. This
indicates that the strength of the winner (number of its countries) is less
important relatively to its goal. ’Territory18’ and ’Continent’ in turn seem
to suggest that the goal is only achieved when shear dominance is conquered.
’Territory24’ is the only goal that seem to lead to the abrupt conclusion of
the game.

Figure 3:  Histogram of the number of countries at end of simulation for each
goal

###  IV.4 Luck

Despite the relevance of players’ strategies, luck is determinant for the
winner. The median average dice for winners over all runs is 0.071 (Table 4).
This compares with a median average of all the other players’ of -0.058. The
runner-up – that player that comes in second – gets a nearly neutral result at
-0.013. In short, that means the winner is the luckiest one, on average.

Table 4:  Median of Average Dice by Success. Average Dice | Median | No Tie | Tie
---|---|---|---
Winner | 0.071 | 0.070 | 0.084
Runner-up | -0.013 | -0.013 | -0.014
Others | -0.058 | -0.055 | -0.102

What differs, however, is the dependency on luck across different talent
categories. In other words, although luck is fundamental, talent allows each
player to be more or less dependent on it (see figure 4 and also figure 1).
For example, whereas the player with the ’Minimalist’ strategy wins when its
dice reaches a median value as high as 0.202, winning with ’Blitz’ requires a
value of only 0.048, which is just above a neutral value. ’Sensible’ strategy,
although winning much less often, does so with just a slightly positive luck
of 0.015.

Alternatively, one may consider the median average luck of the players who
lost for a given strategy. The inverted logic prevails. When a ’Minimalist’
strategy wins, the other players’ median average dice is very unlucky at
-0.11. Such bad luck is a bit less pronounced for the other players when the
winner plays ’Blitz’, at -0.052 or ’Sensible’, at -0.044. All in all, for a
’Minimalist’ strategy win to happen a combination of winner’s luck and
opponents’ bad luck also has to occur.

(a) Histogram of Winners’ Average Dice by Strategy.

(b) Histogram of Other Players’ Average Dice, given Winner’s Strategy.

Figure 4: Distribution of Winners’ and Other Players’ average Dice relative to
Winners’ Strategy.

Talent seems to be relevant even to maintain a stalemate when luck is not
favoring you. Table 5 shows that the only time winners have a negative median
average happens when there is a ’Tie’, which means they have been playing for
up to 200 turns. At that point, winner is the player who owns more countries.

Such negative value happens only for the two ’strongest’ strategies: ’Blitz’
and ’Sensible’. Surprisingly enough, the runner-up – the contestant
maintaining balance – is on average much luckier (Table 5) than the actual
winner.

Table 5:  Luck of Winners, Runner-ups and Other Players by Strategy of the Winner and whether it was a Tie or not. |  | Winners | Runner-ups | Other Players
---|---|---|---|---
Tie | Strategy |  |  |
False | Blitz | 0.054 | -0.011 | -0.050
| Minimalist | 0.236 | -0.114 | -0.098
| Sensible | 0.029 | 0.039 | -0.040
True | Blitz | -0.280 | 0.289 | -0.036
| Minimalist | 0.189 | -0.159 | -0.130
| Sensible | -0.157 | 0.185 | -0.055

#### Resilience and Opportunity.

Finally, it is noteworthy to point out that each players’ talent may interfere
with the number of times they engage in luck-dependent contexts. Table 6 shows
that winners roll the dice about double the time of the other players.
Further, more talented players are able to keep successful even when suffering
bad luck for a very long period. For example, ’Blitz’ players, when ’Tie’ is
true, have a very high number of dice-rolling (5,511 – compared to an overall
median of 242), which result in negative results (-0.281), and yet, they are
able to finish the game with the highest number of countries. That also
happens with the ’Sensible’ strategy. Conversely, the ’Minimalist’ player –
the least successful or talented of the strategies – needs to maintain a
positive luck streak in order to grasp success.

Table 6:  Number of Winners and Other Players’ Dice Rolls and Dice Results by Strategy for the Occurrence or Absence of Ties. The data suggests that when ’Tie’ is True for both strategies ’Blitz’ and ’Sensible’ success comes after a high number of Dice rolling and even with negative luck. |  | Wins | W.Rolls | O.Rolls | W.Dice | O.Dice
---|---|---|---|---|---|---
Strategy | Tie |  |  |  |  |
Blitz | False | 51,556 | 211 | 90 | 0.054 | -0.050
Blitz | True | 1,007 | 5,511 | 1,620 | -0.281 | -0.036
Minimalist | False | 15,877 | 399 | 222 | 0.236 | -0.098
Minimalist | True | 6,214 | 3,961 | 1,258 | 0.189 | -0.130
Sensible | False | 22,594 | 189 | 110 | 0.029 | -0.040
Sensible | True | 2,752 | 3,461 | 1,576 | -0.157 | -0.055

##  V Discussion

Given the conceptualization we gave at the introduction (section I) and the
results presented, we make a case for the following disaggregation, given the
context of a competitive sum-zero game with the rules and procedures
described.

#### Talent

– taken as different mind-setting or different set of choices within the rule-
based alternatives – is relevant. Talent makes all the difference in the game.
Which strategy the player chooses is likely to make a difference on the
results. This difference, conditional to the rules of this simulation, may be
as large as 19 percentage points, for the case of ’Blitz’, for example, or at
least minus 8 p.p. for the other two available choice.

#### Context

– taken as the environment of which game, that is, other players’ luck, goals
and strategies – is relevant. Figure 5 clearly shows that luck and strategy
are correlated. A simple ANOVA between the strategies and winner’s dice gets
an F score of 15,896.529 with a p-value of 0.0. That means that a strategy may
be the winning one, depending on how the context evolves, the right setting.
Anecdotally, suppose you know to be running on a lucky streak, ’Minimalist’
may be enough. A rainy day may only bring you success when playing ’Blitz’,
though. Wanting to play safe? Go for ’Sensible’ even though with a larger
chance of not getting your fair value.

Figure 5:  Separation of luck, context and strategy. Clearly, different talent
yields winners on distinct levels of luck, context and perspective.

#### Perspective

– taken as the hardship and definition of attaining success – is irrelevant.
Despite the difficulty to elaborate hypothesis on the distinction among the
available goals and how hard they may be to accomplish, yet, they seemed to
matter very little. The expected number of wins was divided among the goals
closely to how they had been constructed and distributed in the first place.
Moreover, the explicit difference in number of countries to conquer – between
an average of ’Continent’ of 18.5 to 24 from ’Territory24’ seemed to be
unimportant, relative to the power of the strategy. That was clearly
demonstrated by the fact that a strong player, that is, with the talented
strategy, led to wins independently of the number of countries needed for a
given goal. 222Were the strategies and goals totally random, we would expect
any combination of strategy and goal to win $1/12$ or 0.083% of the times.

#### Luck

is central! Despite the possibility of having disaggregated all the previous
concepts with a reasonable differentiation, there is no doubt that luck is of
the essence. Nearly 96% of all wins have winners average dice as positive and
above the value of the other players’ dice values. The only exception are the
4,062 cases in which there is a tie, and the winner has much worse luck when
compared to the runner-up or the other players.

In addition to the concepts designed to be investigated, two other ideas
appear in the simulation as the analysis unfold. Investigating the number of
rolls of each player, their strategy (talent) and their luck, we see that
strategy determines Opportunity. That is in the sense that a talented player
may hold bad luck for longer periods and still have a shot at being
successful. ’Minimalist’ players, on the contrary, would maintain
competitiveness only when being extremely lucky.

A somewhat loose narrative might just be that the strategy allows for the
player to wait out as much as needed, until luck strikes. That implies that a
given strategy is more correlated to Resilience than others (see the dominance
of nearly $2/3$ of ’Minimalist’ when considering ties).

##  VI Final remarks

We design a controlled, ruled-oriented, open and reproducible simulation based
on the Risk board game in order to examine different contributions from luck,
context and perspective on success. We found the results to be informative
even considered the limitations of this specific design.

We argue that luck, talent and context are relevant to success, whereas
perspective – or the description of success – is not. In fact, the results
suggest that luck is central in the simulation. Even though luck is key, the
talent the player has also seems to be determinant. More so within different
contexts. Further, we learned that talent may even offer more opportunities
for luck to strike. In doing so, talent has also proved to be more resilient
and able to remain competitive for much longer periods. Finally, the highest
the talent, less dependent on luck the player is.

In sum, this paper contributes to current literature as a way of quantifying
an explicit disaggregation of the proposed concepts. We also confirm previous
findings and extend the exercise to include context and perspective, with also
some hinting into resilience and opportunity.

Additionally, If one considers a financial perspective and associate the
’Blitz’ strategy to an agent who is risk-taking, the ’Sensible’ strategy as a
risk-neutral agent and ’Minimalist’ as a risk-averse agent; then we also
replicate stylized-facts of finance. That is, you need to take more risks to
win in the long-run.

For future work, we are considering two extensions. One is to add ’cards’ to
the game. Simply, they add an extra layer of luck to the game, making it more
complex, closer to actual played games and one more chance to associate card
playing with strategy. We may also consider using the known results of
different strategies as an a priori construction of talent and make a
distribution of strategy more likely to the ones observed in reality. That is,
fewer players would have higher strategy, with the majority of them having an
average-quality strategy.

###### Acknowledgements.

We wish to acknowledge the support of grant number [306954/2016-8] from the
National Council of Research (CNPq), Brazil.

## References

  * Albert and Bennett (2007) J. Albert and J. Bennett,  _Curve ball: Baseball, statistics, and the role of chance in the game_ (Springer Science & Business Media, 2007).
  * Mauboussin (2012) M. J. Mauboussin,  _The success equation: Untangling skill and luck in business, sports, and investing_ (Harvard Business Review Press, 2012).
  * Ioannidis (2005) J. P. A. Ioannidis, PLOS Medicine 2, e124 (2005).
  * Pluchino  _et al._ (2018) A. Pluchino, A. E. Biondo, and A. Rapisarda, Advances in Complex Systems 21, 1850014 (2018).
  * Ruocco  _et al._ (2017) G. Ruocco, C. Daraio, V. Folli, and M. Leonetti, Palgrave Communications 3, 1 (2017).
  * Iacopini  _et al._ (2018) I. Iacopini, S. Milojević, and V. Latora, Physical Review Letters 120, 048301 (2018).
  * Salganik  _et al._ (2006) M. J. Salganik, P. S. Dodds, and D. J. Watts, Science 311, 854 (2006).
  * Robert H Frank (2016) Robert H Frank,  _Success and Luck: Good Fortune and the Myth of Meritocracy_ (Princeton University Press, Princeton and Oxford, 2016).
  * Tomasetti  _et al._ (2017) C. Tomasetti, L. Li, and B. Vogelstein, Science 355, 1330 (2017).
  * Liechti  _et al._ (2014) D. Liechti, C. F. Loderer, and U. Peyer, Swiss Finance Institute Research Paper (2014).
  * Chamorro-Premuzic (2016) T. Chamorro-Premuzic,  _Talent Matters Even More than People Think_ (Harvard Business Review, 2016).
  * Duckworth (2016) A. Duckworth,  _Grit: The power of passion and perseverance_ , Vol. 234 (Scribner New York, NY, 2016).
  * Taleb (2010) N. N. Taleb,  _The Black Swan: The Impact of the Highly Improbable_ , edição: 2nd ed. ed. (Random House Trade, New York, 2010).
  * Gompers  _et al._ (2006) P. Gompers, A. Kovner, J. Lerner, and D. Scharfstein,  _Skill vs. Luck in Entrepreneurship and Venture Capital: Evidence from Serial Entrepreneurs_, Working Paper 12592 (National Bureau of Economic Research, 2006).
  * Gompers  _et al._ (2010) P. Gompers, A. Kovner, J. Lerner, and D. Scharfstein, Journal of Financial Economics 96, 18 (2010).
  * Fama and French (2010) E. F. Fama and K. R. French, The Journal of Finance 65, 1915 (2010).
  * Korteweg and Sorensen (2017) A. Korteweg and M. Sorensen, Journal of Financial Economics 124, 535 (2017).
  * Brookman and Thistle (2013) J. T. Brookman and P. D. Thistle, Journal of Corporate Finance 21, 252 (2013).
  * Campbell and Thompson (2015) T. C. Campbell and M. E. Thompson, Journal of Corporate Finance 35, 247 (2015).
  * Yang and Liu (2017) L. Yang and W. Liu, Emerging Markets Finance and Trade 53, 629 (2017).
  * Cabot and Hannum (2005) A. Cabot and R. Hannum, Thomas M. Cooley Law Review 22, 443 (2005).
  * Meyer  _et al._ (2013) G. Meyer, M. von Meduna, T. Brosowski, and T. Hayer, Journal of Gambling Studies 29, 535 (2013).
  * Levitt and Miles (2014) S. D. Levitt and T. J. Miles, Journal of Sports Economics 15, 31 (2014).
  * Wolf (2005) M. Wolf,  _An intelligent artificial player for the game of Risk_ , Ph.D. thesis, TU Darmstadt, Knowledge Engineering Group,, Darmstadt Germany (2005).
  * Bence Szabo  _et al._ (2015) Bence Szabo, Patrick Opgenoorth, Alex Wilton, and Ryo Yanagida,  _Risk - world domination game_ , Monograph, University of St. Andrews, Scotland, UK (2015).
  * Brand and Kroon (2014) D. Brand and S. Kroon, in  _Proceedings of the Southern African Institute for Computer Scientist and Information Technologists Annual Conference 2014 on SAICSIT 2014 Empowered by Technology_, SAICSIT ’14 (ACM, New York, NY, USA, 2014) pp. 314:314–314:322, event-place: Centurion, South Africa.
  * Badeig  _et al._ (2016) F. Badeig, E. Adam, R. Mandiau, and C. Garbay, Journal of Ambient Intelligence and Smart Environments 8, 325 (2016).
  * Honary (2007) E. Honary,  _Total Diplomacy: The Art of Winning RISK_ (BookSurge Publishing, UK, 2007).
  * Note (1) Default is 10,000 times, but 100,000 will take less than two hours to run.
  * Note (2) Were the strategies and goals totally random, we would expect any combination of strategy and goal to win $1/12$ or 0.083% of the times.


# Connecting physics to systems with modular spin-circuits

Kemal Selcuk  Department of Electrical and Computer Engineering, University of
California, Santa Barbara, CA, 93106, USA Saleh Bunaiyan  Department of
Electrical and Computer Engineering, University of California, Santa Barbara,
CA, 93106, USA Electrical Engineering Department, King Fahd University of
Petroleum $\&$ Minerals (KFUPM), Dhahran 31261, Saudi Arabia Nihal Sanjay
Singh  Department of Electrical and Computer Engineering, University of
California, Santa Barbara, CA, 93106, USA Shehrin Sayed  TDK Headway
Technologies, Inc., Milpitas, CA, 95035, USA Samiran Ganguly  Department of
Electrical and Computer Engineering, Virginia Commonwealth University,
Richmond, VA 23284, USA Giovanni Finocchio  Department of Mathematical and
Computer Sciences, Physical Sciences and Earth Sciences, University of
Messina, Messina, Italy Supriyo Datta  Elmore Family School of Electrical and
Computer Engineering, Purdue University, West Lafayette, Indiana, 47907, USA
Kerem Y. Camsari  Department of Electrical and Computer Engineering,
University of California, Santa Barbara, CA, 93106, USA

###### Abstract

An emerging paradigm in modern electronics is that of CMOS + $\sf X$ requiring
the integration of standard CMOS technology with novel materials and
technologies denoted by $\sf X$. In this context, a crucial challenge is to
develop accurate circuit models for $\sf X$ that are compatible with standard
models for CMOS-based circuits and systems. In this perspective we present
physics-based, experimentally benchmarked modular circuit models that can be
used to evaluate a class of CMOS + $\sf X$ systems, where $\sf X$ denotes
magnetic and spintronic materials and phenomena. This class of materials is
particularly challenging because they go beyond conventional charge-based
phenomena and involve the spin degree of freedom which involves non-trivial
quantum effects. Starting from density matrices $-$ the central quantity in
quantum transport $-$ using well-defined approximations, it is possible to
obtain spin-circuits that generalize ordinary circuit theory to 4-component
currents and voltages (1 for charge and 3 for spin). With step-by-step
examples that progressively go higher in the computing stack, we illustrate
how the spin-circuit approach can be used to start from the physics of
magnetism and spintronics to enable accurate system-level evaluations. We
believe the core approach can be extended to include other quantum degrees of
freedom like valley and pseudospins starting from corresponding density
matrices.

##  I Introduction

The rise of Artificial Intelligence with its skyrocketing computing needs
coincided with the stagnation of Moore’s Law. This clash has been driving the
development of domain-specific hardware Dally et al. (2020) and architectures
with a rich variety of heterogeneous systems for computing, memory and sensing
applications. In this new era, rapid and accurate tools for evaluating the
potential of emerging materials, physical phenomena, and device concepts has
become a crucial need. Such tools will have an impact not only in moving
forward well-established computational schemes but also in opening new
directions in unconventional computing paradigms Finocchio et al. (2023).

In this perspective, we describe a physics-based circuit approach that covers
a wide range of phenomena in spintronics and magnetism using a generalized
circuit theory. We show how circuit “modules” derived out of microscopic
theory and phenomenological models can accurately model spin transport while
accounting for magnetization dynamics.

Combining phenomenology and microscopic theory, the spin-circuit approach for
spintronics has been used to model non-local spin-valves, channels with high-
spin orbit coupling such as semiconductor channels with Rashba interactions,
heavy metals and topological insulators, transport in ferromagnetic
insulators, ferromagnet-normal metal interfaces, spin-pumping phenomena,
magnetic tunnel junctions, voltage controlled magnetic anisotropy, finite
temperature magnetization dynamics and others. A web page with open-source
models along with open-source SPICE codes catalogue these results nanohub.org
.

The key strength of the approach is not just about modeling phenomena, but
more about its ability to combine the modules to design new circuits and
structures. For example, given interface, bulk magnet, magnetization dynamics,
and spin-orbit channel modules, complicated new devices can be constructed and
studied (see, for example, Ref’s. Sayed et al. (2019, 2021a)). Real-time
simulation of nanomagnet dynamics coupled with transport modules allows
accurate transient simulations from which device characteristics can be
obtained. Powerful tools and analysis options of mature circuit simulators
greatly ease a wide range of measurements for AC, DC, transient and noise
analysis.

Another distinguishing aspect of spin-circuits compared to powerful
alternatives to model spintronic phenomena Vansteenkiste et al. (2014);
Mojsiejuk et al. (2023) is how new devices and phenomena can be seamlessly
integrated with state-of-the-art complementary metal oxide semiconductor
(CMOS) transistor models. This combination allows fast, accurate and
informative evaluation of CMOS + $\sf X$ platforms (where $\sf X$ can be any
emerging CMOS-compatible technology such as spintronics, ferroelectrics,
photonics, etc.) using efficient circuit simulators (e.g., SPICE and its
variants).

The spin-circuit approach evolved out of a 2-component model involving
collinear spins Valet and Fert (1993) which is relatively intuitive. It is as
if there are two species of electrons, up and down. The charge current is the
sum of up and down currents, while the spin current is given by their
difference.

Less intuitive is the 4-component model with noncollinear components, 1 for
charge and 3 for spin (see, for example, Brataas et al. (2006); Bauer et al.
(2003) and references therein). The 4-component model is not based on four
species of electrons. Rather, it is based on two components with complex
amplitudes $\\{u\ v\\}$ that embody subtle quantum physics. For example,
$\\{1\ 0\\}$ represents $+z\ spin$, $\\{0\ 1\\}$ represents $-z\ spin$, while
a superposition of the two $\\{1\ 1\\}$ represents $+x\ spin$. This can lead
to quite non-intuitive results, like a flux of $+x\ spins$ getting converted
into $+z\ spins$ by a shunt path that pulls out $-z\ spins$Camsari (2015).

Figure 1: Physics to systems perspective with modular spin-circuits (a)
Physics: Spin-circuits solve transport and magnetization dynamics self-
consistently. (b) Devices: example stochastic MTJs (with spin-orbit and spin-
transfer torque) using low-energy barrier magnets. (c) Circuits: stochastic
neurons (p-bits) built out of stochastic MTJs (d) Architectures: Probabilistic
architectures with interacting stochastic neurons (e) Networks: networks of
p-bits mapped to computationally hard optimization problems (f) Algorithms:
powerful algorithms that use replicas of probabilistic networks to help solve
these optimization problems.

Even such non-intuitive effects are accurately captured by the 4-component
model whose components represent measurable quantities given by bilinear
products of $u$ and $v$; the charge component is given by $uu^{*}+vv^{*}$
while the three components of spin are given by $uu^{*}-vv^{*}$,
$\sf{Re}(uv^{*})$ and $\sf{Im}(uv^{*})$. The 4-component spin-circuit
equations have later been converted into convenient and intuitive 4-component
circuits where currents and voltages carry 3-spin and 1-charge components that
are related by $4\times 4$ conductances matrices. Many examples of spin-
circuits to model existing and evaluate new device concepts have been
performed over the years, by the authors and othersSrinivasan et al. (2011,
2014); Manipatruni et al. (2014, 2012); Camsari et al. (2015, 2016); Li et al.
(2021); Camsari et al. (2014); Hong et al. (2016); Sayed et al. (2016a, 2017,
2018); Hu et al. (2018); Zand et al. (2017); Roy (2017); Iyengar et al.
(2016); Camsari et al. (2018); Roy (2021); Hung et al. (2019); Lim et al.
(2020); Li et al. (2022); Thirumala et al. (2020); Cho et al. (2021).

We first give a brief introduction to the spin-circuit approach discussing the
basics of the transport and magnetism modules and how they interact. To
illustrate how extensible and modular the approach is, we present several
original examples of the approach by constructing new spin-circuits. Some of
our examples are chosen in the context of a new and emerging computational
paradigm with probabilistic bits, covering physics, devices, circuits,
architectures, networks, reaching all the way up to the algorithms that run on
this stack (FIG. 1). The ideas related to probabilistic computing came long
after the spin-circuit approach but as we will show, spin-circuits have been
instrumental in helping uncover new physics and new potential applications due
to their modularity enabling a “plug and play” approach.

##  II Modular spin circuits

The two main ingredients in the spin-circuit approach are transport and
magnetism modules that need to be solved self-consistently. Transport
timescales are typically much faster than magnetization dynamics and this
allows a lumped circuit description of transport modules that are solved for
each new magnetization configuration in the circuit. We first start by
describing spin-transport modules.

###  II.1 Spin transport with 4-component circuits

Transport modules are naturally represented as circuits but they need to be
generalized to include spin transport. The principled way to do this is to
start from a quantum transport formulation of the density matrix $\rho$ and
turn it into a 4-component vector:

$\frac{1}{2}\begin{bmatrix}N+S_{z}&S_{x}-iS_{y}\\\
S_{x}+iS_{y}&N-S_{z}\end{bmatrix}\rightarrow\begin{bmatrix}N\\\ S_{z}\\\
S_{x}\\\ S_{y}\end{bmatrix}$

where $N$, $S_{z}$, $S_{x}$, $S_{y}$ represent the charge and spin densities
at a physical point in the channel material.

One can then obtain transport equations for these 4-component vectors for
coherent Camsari et al. (2019) or incoherent channels (see Chapter 24 in Datta
(2018)). After this $\rho\rightarrow V_{4\times 1}$ transformation, the key
quantity that emerges is a $4\times 4$ conductance matrix relating 4-component
currents to 4-component voltages. The non-conservative nature of spin-currents
is naturally handled by shunt conductances that are connected to grounds. The
resulting circuits fully satisfy Kirchhoff’s laws and can be handled by
powerful circuit simulators Srinivasan et al. (2016); Manipatruni et al.
(2012); Camsari (2015). A microscopic formulation of 4-component formulation
of spin-currents was first explored in Ref.’s Brataas et al. (2006); Bauer et
al. (2003), focusing on metallic and ferromagnetic channels. In our view
however the spin-circuit formalism is much broader and starting from
microscopic theory may not always be necessary or possible, yet,
phenomenological 4-component spin-circuit models can still be obtained.
Examples of these include spin-circuits for channels with spin-momentum
lockingSayed et al. (2021b) such as heavy metals with giant spin Hall effect
Hong et al. (2016), topological insulators Hong et al. (2016); Sayed et al.
(2018), magnonic transport magnetic insulators Sayed et al. (2016b) and
others.

Figure 2: Transport and magnetism (a) An example spin-valve built out of two
interfaces is shown. Numerical results obtained from spin-circuits are
compared with theory Brataas et al. (2006) where the charge conductance shows
magnetoresistance as a function of the relative angle between the
ferromagnets. (b) Spin-circuit model illustrating the interaction between the
magnetization dynamics (modeled by sLLG) and transport modules. The transport
model receives two magnetization vectors from the stochastic LLG and produces
4-component spin currents carrying charge and spin information. sLLG receives
spin currents and magnetic fields and produces a magnetization vector. (c)
sLLG results are benchmarked with the Fokker Planck equation (FPE). 1000 low-
barrier nanomagnets (with a very small perpendicular magnetic anisotropy) are
prepared in the $-$1 direction and left to relax. The average magnetization
$\left\langle m_{z}\right\rangle$ is measured over time and compared to FPE
and the analytical solution (see text).

For many spintronic devices, a key component is a ferromagnet-normal metal
interface (F||N) where the spin-transfer-torque effect occurs. A four-
component circuit formulation of the F||N interface can be obtained from
scattering theory or the non-equilibrium Green’s function formalism Srinivasan
et al. (2016); Brataas et al. (2006); Camsari et al. (2019). The F||N
interface consists of a series and a shunt component (FIG. 2a) that both
depend on the orientation of the ferromagnet. When the ferromagnet points in
the +z direction, these conductances are given by:

$\begin{aligned} G_{se}/G_{0}=\left[\begin{array}[]{c|cccc}&c&z&x&y\\\
\hline\cr c&1&P&0&0\\\ z&P&1&0&0\\\ x&0&0&0&0\\\
y&0&0&0&0\end{array}\right],G_{sh}/G_{0}=\left[\begin{array}[]{c|cccc}&c&z&x&y\\\
\hline\cr c&0&0&0&0\\\ z&0&0&0&0\\\ x&0&0&a&b\\\
y&0&0&-b&a\end{array}\right]\end{aligned}$

where $G_{0}$ is the interface conductance, $P$ is the interface polarization,
$a,b$ are the real and imaginary coefficients of the “spin-mixing
conductance”, respectively. The form of these conductances is intuitive: the
series conductance creates spin-polarized spin currents when subject to a
charge potential and shunt conductances are responsible for absorbing
transverse spin currents responsible for the spin-transfer-torque effect.

Naturally, in settings where transient behavior needs to be examined,
conductances need to be modified in conjunction with moving ferromagnetic
magnetization vectors. This can be carried out by a standard rotation matrix
that leaves the charge components (cc) unchanged but modifies spin components.
Expressing magnetization in spherical coordinates, an arbitrary magnet
direction ($\theta$,$\phi$) can be reached via
$G_{\\{sh,se\\}}=[U_{R}]^{T}\left[G_{\\{sh,se\\}}\right][U_{R}]$, where the
rotation matrix $[U_{R}]$ is given by Camsari (2015):

$\left[\begin{array}[]{c|cccc}&c&z&x&y\\\ \hline\cr c&1&0&0&0\\\
z&0&\cos\theta&\sin\theta\cos\phi&\sin\theta\sin\phi\\\
x&0&-\sin\theta\cos\phi&\cos\theta+\sin^{2}\phi(1-\cos\theta)&-\sin\phi\cos\phi(1-\cos\theta)\\\
y&0&-\sin\theta\sin\phi&\sin\phi\cos\phi(1-\cos\theta)&\cos\theta+\cos^{2}\phi(1-\cos\theta)\end{array}\right]$

In circuit simulators, we first obtain a fully paramaterized rotated
conductance that receives instantaneous magnetization directions for transient
simulations.

As a simple example that demonstrates the modularity of such spin-circuits,
FIG.2(a) shows a metallic spin-valve where the relative angle between the
ferromagnets is changed. In this case (and in many cases involving spin-
circuits) the charge conductance (or the c-c component) of the equivalent
conductance can be analytically calculated (see Eq. 124 in Brataas et al.
(2006) with $a=2\Re\left(G_{\uparrow\downarrow}/G_{0}\right)$, while the
imaginary part $b$ is set to 0, which is typical for metallic interfaces).
FIG. 2(a) shows the magnetoresistance effect on the charge conductance where
the analytical result is compared to a numerical one obtained from a circuit
simulator (HSPICE).

This example shows the magnetoresistive change in the charge conductance, but
the spin-circuit also captures important spin current information that can be
readily extracted. Technically, what we illustrate here is a metallic spin-
valve. Remarkably, multiplying two conductance matrices instead of adding them
in series seems to capture the non-trivial magnetic tunnel junction physics
Camsari et al. (2014). The intuition behind this is the exponential decay of
conductance across two tunneling interfaces in series $G_{eq}\propto
G_{1}G_{2}$ which seems to generalize to matrix conductances.

The spin-valve example we show in FIG. 2 may seem elementary however the
approach is more general. Recently, Ref. Selcuk et al. (2023) analyzed a
complicated magnetic tunnel junction design with two synthetic
antiferromagnetic layers (4 ferromagnets) using the same approach, obtaining
results in agreement with experimental features observed in similar systems
Sun et al. (2023a).

###  II.2 Magnetization dynamics via Landau-Lifshitz-Gilbert equation

The transport captured by spin-circuits needs to be solved self-consistently
with magnetization dynamics. Large ferromagnets in experiments typically
contain many domains and to get realistic dynamical behavior, sophisticated
“micromagnetics” tools need to be used Vansteenkiste et al. (2014). These
tools solve partial differential equations that are hard to combine with
circuit simulators. Our approach is to assume monodomain magnets and use the
stochastic Landau-Lifshitz-Gilbert (sLLG) equation to model magnetization
dynamics. This approximation gets better as magnets are scaled down to small
dimensions but more importantly, it allows magnetism and transport modules to
be readily coupled in circuit simulators. Moreover, as we show in Section III,
multiple monodomain LLG modules can be combined to describe multi-domain
physics of nanomagnets, in principle. The single sLLG model incorporates
finite temperature physics, dipolar and exchange coupling and spin-transfer
torques.

The sLLG equation is a non-linear 2-dimensional ordinary differential equation
where the magnetization evolves on the surface of the unit sphere Sun et al.
(2004); Sun (2000); Butler et al. (2012); Lopez-Diaz et al. (2002); Ament et
al. (2017):

$\displaystyle(1+\alpha^{2})\frac{d\mathbf{\hat{m}}}{dt}=$
$\displaystyle-|\gamma|\mathbf{\hat{m}}\times\vec{H}-\alpha|\gamma|\mathbf{\hat{m}}\times(\mathbf{\hat{m}}\times\vec{H})$
(1)
$\displaystyle+\frac{\alpha}{qN}(\mathbf{\hat{m}}\times\vec{I}_{s})+\frac{1}{qN}(\mathbf{\hat{m}}\times(\vec{I}_{s}\times\mathbf{\hat{m}}))$

where $\alpha$ is the damping coefficient, $q$ is the electron charge,
$\gamma$ is the electron gyromagnetic ratio, $\vec{I}_{s}$ is the received
spin current. $N$ is the total number of spins in the free layer,
$N=M_{s}\text{Vol.}/\mu_{B}$, where $M_{s}$ is the saturation magnetization,
$\mu_{B}$ being the Bohr magneton. In addition to all the fields (uniaxial,
demagnetization, external magnetic fields, strain-induced anisotropy fields,
etc.) that go into the effective field $\vec{H}$, the effect of thermal noise
also enters as a fluctuating magnetic field with the following properties:

$\mathsf{Var.}(H_{n}^{x,y,z})=\frac{2\alpha
k_{B}T}{|\gamma|\mu_{0}M_{s}\text{Vol.}},\quad\mathbb{E}[H_{n}^{x,y,z}]=0$ (2)

where $T$ is the temperature, $k_{B}$ is the Boltzmann’s constant and $mu_{0}$
is free space permeability. The noise is assumed to be independent in all
3-dimensions.

To solve the sLLG equation using powerful circuit simulators, we express the
LLG equation in a form of coupled capacitors: $C{dV}/{dt}=I$Panagopoulos et
al. (2013); Camsari et al. (2015) where the voltages map to magnetizations and
non-linear current sources map to the different terms in the LLG equation.
Note that our approach does not use linearization or make any approximation:
through the use of non-linear and state-dependent current sources, the full
LLG equation is solved in circuit simulators. The numerically challenging
transient noise simulations can be handled by reformulating existing noise
models that are used for resistor noise in HSPICE Torunbalci et al. (2018).

Solving the stochastic LLG requires care, especially if done in closed-source
circuit simulators. The time dependence of noise fields, the choice of
convention in integration (Itô vs Stratonovitch), and the way the variance of
the noise enters in HSPICE may not be obvious. Our approach to such
uncertainties is to rigorously benchmark the sLLG by its corresponding Fokker-
Planck equation (FPE) Li and Zhang (2004); Xie et al. (2016); Butler et al.
(2012). For a magnet with cylindrical symmetry, the time-dependent FPE
readsButler et al. (2012):

Figure 3: Antiferromagnetic resonance (AFMR) with spin-circuits (a) Sketch of
an antiferromagnet where two sublattices with opposing magnetizations. (b)
Spin circuit model of the AFM with two antiferromagnetic layers analyzed by
two LLGs coupled with exchange interactions. (c) Experimental results for AFMR
in $\sf{MnF_{2}}$ Hagiwara et al. (1999). (d) Numerical results obtained from
spin-circuits for AFMR, compared to known theory. (e) Easy-axis (z) component
of the magnetization vector analysis over an external magnetic field applied
in the +z direction. At a critical field, the sublattice spins enter the
“spin-flop” region where they both develop a small $m_{z}$ component in the
direction of the magnetic field. In all cases, spin-circuits provide excellent
agreement with known theory.

$\frac{\partial\rho(m_{z},t)}{\partial\tau}=\frac{\partial}{\partial
m_{z}}\left[(i-h-
m_{z})(1-m_{z}^{2})\rho+\frac{1-m_{z}^{2}}{2\Delta}\frac{\partial\rho}{\partial
m_{z}}\right]$

a long as the external fields $h$ and spin currents $i$ are defined to be in
the $\pm z$ direction. $\tau$ is the normalized time,
$\tau=(1+\alpha^{2})/(\alpha\gamma H_{k})/t$, where $\alpha$ is the damping
coefficient, $H_{k}$ is the uniaxial anisotropy constant, $\gamma$ is the
gyromagnetic ratio, and $t$ is the real time. $\Delta$ represents the energy
barrier of the magnet normalized with $k_{B}T$.

To benchmark our sLLG solver in HSPICE with FPE, we consider an ensemble of
low-barrier nanomagnets all prepared in the $m_{z}=-$1 direction, which are
then left to fluctuate on their own in the absence of any fields and currents.
We perform 1000 independent (with identical parameters) sLLG simulations and
numerically plot the average $m_{z}$ component as a function of time. The same
quantity can be obtained from a numerical solution of the FPE, which solves
for $\rho(\tau,m_{z})$. We then integrate $\rho$ to obtain $\left\langle
m_{z}(\tau)\right\rangle=\int\rho(m_{z},\tau)\,dm_{z}$. The FPE sLLG
comparison is shown in FIG. 2c with excellent agreement. Further, both
numerical methods can be understood by an analytical expression for the
average $m_{z}$ (following a similar approach in Hassan et al. (2019):

$C(t)=\exp\left(-2\alpha\gamma\frac{k_{B}T}{M_{s}Vol.}|t|\right)$ (3)

Eq. 3 is also shown as the analytical solution in FIG. 2 in agreement with FPE
and sLLG. These simple examples where sLLG is matched with an FPE approach
which in turn is matched with analytical expectations to ensure the validity
of our numerical solvers.

Figure 4: Non-local spin valve (NLSV) with low-barrier nanomagnets (LBM) (a)
Physical structure consisting of networks of LBMs. A charge current is
injected from LBMs going to a nearby local ground. Spin currents polarized in
the direction of fluctuating LBMs are routed to one another. Inset shows an
example of how magnetization dynamics $\hat{m}$ evolve over time for an LBM
with low perpendicular anisotropy. The bottom panel shows the spin-circuit
corresponding to the physical structure. (b) The average of the relative angle
between LBM 1 and LBM 2 is measured as a function of injected charge currents,
showing ferromagnetic (at positive $I_{c}$) and antiferromagnetic (at negative
$I_{c}$) coupling. The numerical results are compared with those obtained from
the Boltzmann law obtained from the Heisenberg Hamiltonian. This
correspondence between the unitless Heisenberg Hamiltonian and spin-circuit
requires a mapping factor $I_{M}$ with units of currents (see text and Ref.
Bunaiyan et al. (2023)). (c) A histogram of three LBMs at large negative
currents where for better illustration the magnetizations $\hat{m}$ are
binarized by thresholding at $\hat{m}_{z}=0$. The system shows frustration in
the antiferromagnetic configuration.

##  III Natural antiferromagnets with spin-circuits

As mentioned earlier, our approach with magnetization dynamics necessarily
assumes the monodomain approximation. Could spin-circuit models be built out
of coupled magnetizations? We answer this question in the context of natural
antiferromagnets (AFM) by matching the experimental antiferromagnetic
resonance behavior observed in MnF2Hagiwara et al. (1999). FIG. 3a-b shows the
two coupled atomic sublattices and the corresponding spin-circuit model. The
exchange fields between two magnets can be obtained from an energy model of
the form: Victora and Shen (2005)

$E_{ex}=-M_{s}(\text{Vol}_{1}+\text{Vol}_{2})({J}_{ex})(\hat{m_{1}}\cdot\hat{m_{2}})$
(4)

where the effective field that enters the LLG becomes:

$\left[H_{ex}\right]_{i}=-\frac{1}{\left(M_{s}\right)_{i}V_{i}}\nabla_{\hat{m}_{i}},\
E_{ex}=J_{ex}\frac{(\text{Vol}_{1}+\text{Vol}_{2})}{\text{Vol}_{i}}m_{j}$ (5)

In the spin-circuit, the exchange fields are assumed to change
“instantaneously” for the two coupled LLGs. The tools available to circuit
simulators make measuring the AFMR frequency highly convenient. We apply an
external DC magnetic field along the z-axis and sweep the frequency of an
external AC magnetic field (perpendicular to the z-axis) and measure the
transient response of the $m_{z}$ components of the constituent spins. The
frequency of the AC field at which this response is maximum is recorded as the
AFM resonance frequency at that DC field. Interestingly, this is not too
different from how the AFMR is measured experimentally.

By linearizing the coupled LLG equations, two sets of AFMR frequencies can be
obtainedKeffer and Kittel (1952); Rezende et al. (2019):

$\displaystyle f_{\text{res}}=\gamma\left(\sqrt{H_{K}\cdot(H_{K}+2\cdot
J_{\text{ex}})}\pm H_{\text{ext}}\right)$ (6) $\displaystyle f^{\sf
sf}_{\text{res}}=\gamma\sqrt{H_{\text{ext}}^{2}-(2\cdot J_{\text{ex}}\cdot
H_{K}+H_{K}^{2})}$ (7)

where $H_{K}$ is the uniaxial anistropy of individual sublattices, $H_{ext}$
is the external magnetic field and $\gamma$ is the gyromagnetic ratio for the
electron. In FIG. 3c-d, we observe that around 10 T, the coupled AFM spins
enter the interesting “spin-flop” region where they each develop a small
$m_{z}$ component and start precessing about this axis (FIG. 3e).

As FIG. 3 shows, all of this physics is captured by the spin-circuit formalism
quantitatively. The availability of AC/DC sources, transient and AC simulation
options offer a convenient platform to study magnetization physics in a
modular manner. The ability to combine such magnetic models with materials and
transistors makes the spin-circuit approach appealing.

Figure 5: Probabilistic bit with double-free-layer stochastic MTJs (a) Self-
consistent magnet and transport model combined with transistors to model a
probabilistic bit. (b) Time-dependent spin currents are produced from the
transport model that goes into the sLLG modules. We show the x-component of
spin-currents for magnets, 1 and 2. (c) Histogram and time fluctuations for
the $\cos(\theta)$ between $m_{z}$ components of magnet 1,2 for the double-
free-layer sMTJ. Slight anti-parallel tendency is due to the dipolar coupling
which is not completely overcome by thermal fields. (d) Resistance of the sMTJ
is measured while the voltage is swept from $-$0.5 to 0.5 V over 1 ms. The
discrete data points are average resistances over 500 ns showing the roughly
bias-independent characteristics of the device. (e) The drain node
($\sf{V_{D}}$) and the output of the inverter ($\sf{V_{OUT}}$) are measured
while the input ($\sf{V_{IN}}$) is swept from $-$0.3 V to 0.3 V over 1 ms. The
output of the inverter shows the binary stochastic neuron behavior. (f)
Digital output fluctuations over time for the probabilistic bit output at
different bias conditions for $\sf{V}_{IN}$.

##  IV engineered antiferromagnets with non-local spin valves

Next, we show an example non-local spin valve (NLSV) setup that couples low-
barrier nanomagnets (LBMs) to engineer a “Heisenberg machine” using spin-
circuit models. The setup we consider here has recently been proposed
theoretically Bunaiyan et al. (2023) and to the best of our knowledge no
experiments involving LBMs and NLSVs have yet been performed. Our main point
is that modular spin-circuits can be useful to motivate new experiments,
provide quantitative insights into new physics and estimate energy and delay
metrics before the physical realization of a proposed system.

In previous sections, we described how we can model magnets by coupling the
transport model (F||N) with the magnetism model (LLG). For channel materials
used in NLSVs, we also introduce the Normal Metal (NM) model, which we use to
describe the physical connection between the magnets. The NM model consist of
a $\pi$-network with two shunt conductance $G_{sh}$ separated by a series
conductance $G_{se}$ as shown in FIG. 4Srinivasan et al. (2014):

$G_{se}=\left[\begin{array}[]{c|cccc}&c&z&x&y\\\ \hline\cr c&G_{c}&0&0&0\\\
z&0&G_{s}&0&0\\\ x&0&0&G_{s}&0\\\ y&0&0&0&G_{s}\end{array}\right],\quad
G_{sh}=\left[\begin{array}[]{c|cccc}&c&z&x&y\\\ \hline\cr c&0&0&0&0\\\
z&0&G_{s}^{\prime}&0&0\\\ x&0&0&G_{s}^{\prime}&0\\\
y&0&0&0&G_{s}^{\prime}\end{array}\right]$

where $G_{c}=A_{NM}/(\rho_{NM}L)$,
$G_{s}=A_{NM}/(\rho_{NM}\lambda_{s})\operatorname{csch}(L/\lambda_{s})$, and
$G_{s}^{\prime}=A_{NM}/(\rho_{NM}\lambda_{s})\tanh(L/2\lambda_{s})$. $A_{NM}$
denotes the area, $\rho_{NM}$ is the NM resistivity, $L$ is the length, and
$\lambda_{s}$ is the spin-diffusion length. These matrices are obtained from
microscopic spin-diffusion equations, accounting for the non-conservative
nature of spin currents through the shunts.

In this example, we stick to spin-isotropic channels without any spin-momentum
locking, however, experiments with heavy metals that exhibit Giant Spin Hall
EffectNiimi et al. (2012) have been successfully modeled with spin circuits
Camsari (2015); Hong et al. (2016).

The basic idea of the coupled NLSVs in FIG. 4a is to engineer a system of LBMs
that interact via pure spin currents. To achieve this, a charge current passes
through each magnet with a nearby ground. Then, spin-currents polarized in the
instantaneous direction of the magnetization of the LBMs are sent toward
neighboring LBMs. The key point is to design a system that takes samples from
the classical Heisenberg model:

$E=-\frac{1}{2}\sum_{i,j}J_{ij}\,(\hat{m}_{i}\cdot\hat{m}_{j})$ (8)

where $J_{ij}$ are the interaction terms and $m_{i}$ are 3D-magnetization
vectors. Finding low-energy (or equilibrium states of the Heisenberg
Hamiltonian for probabilities $p_{i}$ ($\propto\exp(-E/kT)$) is
computationally challenging. As such, engineering a system of LBMs to sample
from the classical Heisenberg model can be useful for optimization and/or
sampling problems. The read-out mechanisms or practical applications of this
system is beyond the scope of our discussion here and can be found in Ref.
Bunaiyan et al. (2023).

From a modeling perspective, the system shown in FIG. 4a is quite challenging:
one needs to model the NLSV transport where charge and spin-currents are
modeled properly. Moreover, a self-consistent solution of stochastic LLG
equations with transport modules is needed. In the presence of incoming spin-
currents that are transport-dependent, the sLLG equations provide
magnetization vectors that control the interface conductances. The spin-
circuit approach allows a seamless implementation of this highly complicated
physical system. As shown in FIG. 4, the magnitude and the sign of the
injected charge current control the degree of correlation between two magnets
(1 and 2). When the injected charge currents are negative, the coupling
between the three LBMs exhibits antiferromagnetic coupling as shown in FIG.
4c, as would be expected from the engineered interactions obtained from a
Heisenberg model with negative couplings.

Figure 6: CMOS + X (stochastic MTJ) platforms (a) An sMTJ-based binary
stochastic neuron (p-bit) is interfaced with a digital CMOS-based circuit to
trigger a digital p-bit emulator. The bottom panel shows SPICE results for the
analog fluctuations at the drain ($\sf V_{sMTJ}$) of the NMOS transistor. (b)
Rail-to-rail stochastic fluctuations obtained after a buffer tree ($\sf
V_{INTER}$) is inserted between the single sMTJ-based p-bit and the large
digital CMOS block. CMOS block contains a low-quality and inexpensive pseudo-
random number generator (PRNG) along with a look-up table to obtain
tunability. This hybrid setup with the sMTJ circuit increases the quality of
randomness that can be obtained from the digital p-bit block alone (see Ref.
Singh et al. (2024)) (c) Tunability of the heterogeneous structure as a
probabilistic bit is shown with time-averaged $\sf V_{OUT}$ over 1000 ns in
SPICE. (d) In the future, millions of sMTJs can provide nearly-free true
randomness to CMOS underlayers for various probabilistic computing
applications.

##  V Functional spin-circuits with transistors

So far, the spin-circuit examples we considered have been based on spintronic
building blocks with increasing sophistication, albeit without the use of any
transistors. An emerging trend in the field in the beyond Moore era of
electronics is the notion of domain-specific computation where conventional
complementary metal-oxide semiconductor (CMOS) transistors are augmented with
emerging technologies ($\sf X$) to create CMOS+$\sf X$ systems, where $\sf X$
can stand for anything from spintronics, photonics, memristors,
superconducting circuits, and others.

FIG. 5 shows how a new type of stochastic magnetic tunnel junction can readily
be modeled and analyzed using the spin-circuit approach, in conjunction with
state-of-the-art transistor models. Typically, magnetic tunnel junctions
employ a fixed layer such that the resistance of the junction correlates with
the magnetization of a free layer. With the emergence of probabilistic
computing Chowdhury et al. (2023) and the need for fast, energy-efficient, and
scalable random number generators, a recent approach has been to design sMTJs
with no fixed layers Camsari et al. (2021); Sun et al. (2023b); Selcuk et al.
(2023).

Typically, physics-based device models cannot easily be interfaced with
transistor models, whereas the SPICE formulation of spin-circuits allows
seamless integration with CMOS. FIG. 5 shows such a combination where a spin-
valve made out of two LBMs is connected to an n-MOS transistor. Here, we use
FinFET models from the open-source predictive technology models (PTM)Zhao and
Cao (2007), in principle, however, any other FET model could be combined with
spin-circuits. When we combine spin-circuits that carry 4-component currents
and voltages with ordinary circuits that only carry charge currents, we only
attach the charge current terminals to each other, since any other spin
information can be ignored in extended charge circuits. The double-free layer
sMTJ exhibits an interesting voltage-independent resistance profile Ota et al.
. This behavior is reproduced by the spin-circuit model where the two
symmetric layers receive spin-currents with opposing signs (FIG. 5b), leading
to nearly uniform fluctuations (FIG. 5c) and weak voltage-bias dependence
(FIG. 5d). The slight asymmetry favoring an anti-parallel configuration stems
from the dipolar coupling between the easy-plane magnets which is included in
the spin-circuit simulation (following the methodology in Ref. Camsari et al.
(2021)).

Finally, FIG. 5e-f shows the full input-output characteristics of what has
been called a probabilistic or p-bit Camsari et al. (2017) that is obtained
from our full model. The combination of magnetization dynamics, dipolar and
thermal noise fields, 4-component interface conductances, and transistors in a
sound powerful circuit simulator shows the power and flexibility of the spin-
circuit approach.

##  VI From spin-circuits to systems

So far, the spin-circuit examples we illustrated are all at the device or the
circuit level. The combination of spin-circuits with transistors unlocks a
much larger space of possibilities. As a final example, we describe a hybrid
system where a true random number generator (TRNG) augments a low-quality
pseudo-random number generator (PRNG) (even though our modeling in SPICE will
use PRNGs for the sMTJ part of this circuit, the RNG quality used for this
purpose will be much higher than that of an LFSR without noticeable
differences between an actual MTJ, see Ref. Singh et al. (2024) for details).
FIG. 6 shows the p-bit circuit from FIG. 5 “clocking” a digital p-bit (FIG.
6a-b) to generate a tunably random behavior (whose average is shown in FIG.
6c).

The motivation is to increase the quality of randomness that is extracted from
inexpensive linear feedback shift register (LFSR)-based PRNG by clocking the
PRNG with random arrivals of sMTJ fluctuations. This setup was realized using
physical sMTJs in a recent experiment that established the concept Singh et
al. (2024). Considering the expensive nature of PRNGs, augmenting them with
the true randomness of millions of sMTJs in integrated CMOS + $\sf X$ systems
(FIG. 6d) seems desirable.

The CMOS block consists of a PRNG and a lookup table (LUT) for the hyperbolic
tangent function consisting of thousands of transistors. The CMOS design is
synthesized from the open-source ASAP7 Predictive PDK Clark et al. (2016) and
the details of how this synthesis is performed can be found in Ref. Singh et
al. (2024).

The bottom panels of FIG. 6 show simulations obtained from this hybrid circuit
where a single sMTJ-based circuit drives thousands of transistors. An
important detail, immediately captured by the spin-circuit approach is that of
loading. Without a “buffer tree” where several stages of inverters distribute
the capacitive load of the CMOS p-bit that is seen by the single sMTJ-based
circuit, the clocking does not work. These nontrivial loading effects at the
interfaces of physics-based and digital systems are naturally captured by the
powerful spin-circuit approach that is otherwise easy to miss. In addition to
loading, key circuit and system metrics such as energy-delay can be reliably
calculated for many types of exploratory systems.

##  VII Conclusion

We have described the spin-circuit approach connecting the microscopic physics
of spins and magnets all the way up to circuits and systems. We believe that
such a physics-based, modular, CMOS-compatible modeling approach will be
critical in evaluating and exploring new hardware systems in the beyond-Moore
era of electronics. Despite the wide focus of this paper, there are many other
spintronic phenomena that have been modeled by spin-circuits and we did not
get into these, e.g. full compute life-cycle modeling of skyrmions and domain
walls Sakib et al. (2021). Beyond spins, a similar circuit framework for new
and emerging phenomena can be constructed. Extensions may include pseudospins,
valley currentsHung et al. (2019), superconductivity, photonics, and qubit
systems Ganguly et al. (2023), all within the context of powerful, industry-
standard transistor-compatible circuit simulators. These extended spin-
circuits could enable a rapid and robust evaluation of CMOS+$\sf X$ systems of
the future.

## Code and Data Availability

All the codes used in this study are publicly available in the Github
repository [https://github.com/OPUSLab/Spin-Circuit-Designs].

###### Acknowledgements.

We acknowledge the U.S. National Science Foundation (NSF) support through CCF
2106260, through a CAREER award, SAMSUNG Global Research Outreach (GRO) grant.
We also acknowledge suppom ONR-MURI grant N000142312708, OptNet: Optimization
with p-Bit Networks. Use was made of computational facilities purchased with
funds from the National Science Foundation (CNS-1725797) and administered by
the Center for Scientific Computing (CSC). The CSC is supported by the
California NanoSystems Institute and the Materials Research Science and
Engineering Center (MRSEC; NSF DMR 2308708) at UC Santa Barbara.

## Author Contributions

KYC and SD wrote the initial draft of the manuscript. KS, SB, NSS have
designed the spin-circuits, obtained results, drew the figures and prepared
open-source models. All authors have provided feedback and helped improve the
manuscript.

## Competing Interests

All authors declare no financial or non-financial competing interests.

## References

  * Dally et al. [2020] William J Dally, Yatish Turakhia, and Song Han.  Domain-specific hardware accelerators.  _Communications of the ACM_ , 63(7):48–57, 2020\.
  * Finocchio et al. [2023] Giovanni Finocchio, Jean Anne Currivan Incorvia, Joseph S Friedman, Qu Yang, Anna Giordano, Julie Grollier, Hyunsoo Yang, Florin Ciubotaru, Andrii Chumak, Azad Naeemi, et al.  Roadmap for unconventional computing with nanotechnology.  _Nano Futures_ , 2023.
  * [3] nanohub.org.  Modular approach to spintronics.  https://nanohub.org/groups/spintronics.
  * Sayed et al. [2019] Shehrin Sayed, Kerem Y Camsari, Rafatul Faria, and Supriyo Datta.  Rectification in spin-orbit materials using low-energy-barrier magnets.  _Physical Review Applied_ , 11(5):054063, 2019\.
  * Sayed et al. [2021a] Shehrin Sayed, Sayeef Salahuddin, and Eli Yablonovitch.  Spin–orbit torque rectifier for weak rf energy harvesting.  _Applied Physics Letters_ , 118(5), 2021a.
  * Vansteenkiste et al. [2014] Arne Vansteenkiste, Jonathan Leliaert, Mykola Dvornik, Mathias Helsen, Felipe Garcia-Sanchez, and Bartel Van Waeyenberge.  The design and verification of mumax3.  _AIP advances_ , 4(10), 2014.
  * Mojsiejuk et al. [2023] Jakub Mojsiejuk, Sławomir Ziętek, Krzysztof Grochot, Witold Skowroński, and Tomasz Stobiecki.  cmtj: Simulation package for analysis of multilayer spintronic devices.  _npj Computational Materials_ , 9(1):54, 2023\.
  * Valet and Fert [1993] T Valet and AJPRB Fert.  Theory of the perpendicular magnetoresistance in magnetic multilayers.  _Physical Review B_ , 48(10):7099, 1993.
  * Brataas et al. [2006] Arne Brataas, Gerrit E.W. Bauer, and Paul J. Kelly.  Non-collinear magnetoelectronics.  _Physics Reports_ , 427(4):157–255, 2006.
  * Bauer et al. [2003] Gerrit E.W. Bauer, Yaroslav Tserkovnyak, Daniel Huertas-Hernando, and Arne Brataas.  _From Digital to Analogue Magnetoelectronics: Theory of Transport in Non-collinear Magnetic Nanostructures_ , pages 383–396.  Springer Berlin Heidelberg, Berlin, Heidelberg, 2003.  ISBN 978-3-540-44838-9.  doi: 10.1007/978-3-540-44838-9_27.  URL https://doi.org/10.1007/978-3-540-44838-9_27.
  * Camsari [2015] Kerem Yunus Camsari.  _Modular approach to spintronics_.  PhD thesis, Purdue University, 2015.
  * Srinivasan et al. [2011] Srikant Srinivasan, Angik Sarkar, Behtash Behin-Aein, and Supriyo Datta.  All-spin logic device with inbuilt nonreciprocity.  _IEEE Transactions on Magnetics_ , 47(10):4026–4032, 2011.
  * Srinivasan et al. [2014] Srikant Srinivasan, Vinh Diep, Behtash Behin-Aein, Angik Sarkar, and Supriyo Datta.  _Modeling Multi-Magnet Networks Interacting via Spin Currents_ , pages 1–49.  Springer Netherlands, Dordrecht, 2014.  ISBN 978-94-007-7604-3.
  * Manipatruni et al. [2014] Sasikanth Manipatruni, Dmitri E Nikonov, and Ian A Young.  Vector spin modeling for magnetic tunnel junctions with voltage dependent effects.  _Journal of Applied Physics_ , 115(17), 2014.
  * Manipatruni et al. [2012] Sasikanth Manipatruni, Dmitri E Nikonov, and Ian A Young.  Modeling and design of spintronic integrated circuits.  _IEEE Transactions on Circuits and Systems I: Regular Papers_ , 59(12):2801–2814, 2012.
  * Camsari et al. [2015] Kerem Yunus Camsari, Samiran Ganguly, and Supriyo Datta.  Modular approach to spintronics.  _Scientific reports_ , 5(1):10571, 2015.
  * Camsari et al. [2016] Kerem Y Camsari, Samiran Ganguly, and Deepanjan Datta.  A modular spin-circuit model for magnetic tunnel junction devices.  In _2016 74th Annual Device Research Conference (DRC)_ , pages 1–2. IEEE, 2016.
  * Li et al. [2021] Qiuyang Li, Penghe Zhang, Haotian Li, Lina Chen, Kaiyuan Zhou, Chunjie Yan, Liyuan Li, Yongbing Xu, Weixin Zhang, Bo Liu, et al.  Experiments and spice simulations of double mgo-based perpendicular magnetic tunnel junction.  _Chinese Physics B_ , 30(4):047504, 2021.
  * Camsari et al. [2014] Kerem Yunus Camsari, Samiran Ganguly, Deepanjan Datta, and Supriyo Datta.  Physics-based factorization of magnetic tunnel junctions for modeling and circuit simulation.  In _2014 IEEE International Electron Devices Meeting_ , pages 35–6. IEEE, 2014.
  * Hong et al. [2016] Seokmin Hong, Shehrin Sayed, and Supriyo Datta.  Spin circuit representation for the spin hall effect.  _IEEE Transactions on Nanotechnology_ , 15(2):225–236, 2016.
  * Sayed et al. [2016a] Shehrin Sayed, Seokmin Hong, and Supriyo Datta.  Multi-terminal spin valve on channels with spin-momentum locking.  _Scientific reports_ , 6(1):35658, 2016a.
  * Sayed et al. [2017] Shehrin Sayed, Seokmin Hong, Ernesto E Marinero, and Supriyo Datta.  Proposal of a single nano-magnet memory device.  _IEEE Electron Device Letters_ , 38(12):1665–1668, 2017.
  * Sayed et al. [2018] Shehrin Sayed, Seokmin Hong, and Supriyo Datta.  Transmission-line model for materials with spin-momentum locking.  _Physical Review Applied_ , 10(5):054044, 2018\.
  * Hu et al. [2018] Jiaxi Hu, David A Deen, and Steven J Koester.  Ac small-signal model for magnetoresistive lateral spin valves.  _IEEE Transactions on Magnetics_ , 55(3):1–8, 2018.
  * Zand et al. [2017] Ramtin Zand, Arman Roohi, and Ronald F DeMara.  Energy-efficient and process-variation-resilient write circuit schemes for spin hall effect mram device.  _IEEE Transactions on Very Large Scale Integration (VLSI) Systems_ , 25(9):2394–2401, 2017.
  * Roy [2017] Kuntal Roy.  Spin-circuit representation of spin pumping.  _Physical Review Applied_ , 8(1):011001, 2017\.
  * Iyengar et al. [2016] Anirudh Iyengar, Swaroop Ghosh, and Srikant Srinivasan.  Retention testing methodology for sttram.  _IEEE Design & Test_, 33(5):7–15, 2016.
  * Camsari et al. [2018] Kerem Y Camsari, Rafatul Faria, Orchi Hassan, Brian M Sutton, and Supriyo Datta.  Equivalent circuit for magnetoelectric read and write operations.  _Physical Review Applied_ , 9(4):044020, 2018\.
  * Roy [2021] Kuntal Roy.  Spin-circuit representation of spin-torque ferromagnetic resonance.  _IEEE Magnetics Letters_ , 12:1–5, 2021.
  * Hung et al. [2019] Terry YT Hung, Kerem Y Camsari, Shengjiao Zhang, Pramey Upadhyaya, and Zhihong Chen.  Direct observation of valley-coupled topological current in mos2.  _Science advances_ , 5(4):eaau6478, 2019.
  * Lim et al. [2020] Gerard Joseph Lim, Daniel Chua, Weiliang Gan, Chandrasekhar Murapaka, and Wen Siang Lew.  Programmable spin–orbit-torque logic device with integrated bipolar bias field for chirality control.  _Advanced Electronic Materials_ , 6(4):1901090, 2020.
  * Li et al. [2022] Hai Li, Dmitri E Nikonov, Chia-Ching Lin, Kerem Camsari, Yu-Ching Liao, Chia-Sheng Hsu, Azad Naeemi, and Ian A Young.  Physics-based models for magneto-electric spin-orbit logic circuits.  _IEEE Journal on Exploratory Solid-State Computational Devices and Circuits_ , 8(1):10–18, 2022.
  * Thirumala et al. [2020] Sandeep Krishna Thirumala, Yi-Tse Hung, Shubham Jain, Arnab Raha, Niharika Thakuria, Vijay Raghunathan, Anand Raghunathan, Zhihong Chen, and Sumeet Gupta.  Valley-coupled-spintronic non-volatile memories with compute-in-memory support.  _IEEE Transactions on Nanotechnology_ , 19:635–647, 2020\.
  * Cho et al. [2021] Karam Cho, Xiangkai Liu, Zhihong Chen, and Sumeet Kumar Gupta.  Utilizing valley–spin hall effect in monolayer wse 2 for designing low power nonvolatile spintronic devices and flip-flops.  _IEEE Transactions on Electron Devices_ , 69(4):1667–1676, 2021.
  * Camsari et al. [2019] Kerem Y Camsari, Samiran Ganguly, Deepanjan Datta, and Supriyo Datta.  Non-equilibrium green’s function based circuit models for coherent spin devices.  _IEEE Transactions on Nanotechnology_ , 18:858–865, 2019\.
  * Datta [2018] Supriyo Datta.  _Lessons from Nanoelectronics: A New Perspective on Transport—Part B: Quantum Transport_.  World Scientific, 2018.
  * Srinivasan et al. [2016] Gopalakrishnan Srinivasan, Abhronil Sengupta, and Kaushik Roy.  Magnetic tunnel junction based long-term short-term stochastic synapse for a spiking neural network with on-chip stdp learning.  _Scientific reports_ , 6:29545, 2016.
  * Sayed et al. [2021b] Shehrin Sayed, Seokmin Hong, Xiaoxi Huang, Lucas Caretta, Arnoud S Everhardt, Ramamoorthy Ramesh, Sayeef Salahuddin, and Supriyo Datta.  Unified framework for charge-spin interconversion in spin-orbit materials.  _Physical Review Applied_ , 15(5):054004, 2021b.
  * Sayed et al. [2016b] Shehrin Sayed, Vinh Q Diep, Kerem Yunus Camsari, and Supriyo Datta.  Spin funneling for enhanced spin injection into ferromagnets.  _Scientific reports_ , 6(1):28868, 2016b.
  * Selcuk et al. [2023] Kemal Selcuk, Shun Kanai, Rikuto Ota, Hideo Ohno, Shunsuke Fukami, and Kerem Y Camsari.  Double-free-layer stochastic magnetic tunnel junctions with synthetic antiferromagnets.  _arXiv preprint arXiv:2311.06642_ , 2023.
  * Sun et al. [2023a] Jonathan Z Sun, Christopher Safranski, Philip Trouilloud, Christopher D’Emic, Pouya Hashemi, and Guohan Hu.  Easy-plane dominant stochastic magnetic tunnel junction with synthetic antiferromagnetic layers.  _Physical Review B_ , 108(6):064418, 2023a.
  * Sun et al. [2004] Jonathan Z Sun, TS Kuan, JA Katine, and Roger H Koch.  Spin angular momentum transfer in a current-perpendicular spin-valve nanomagnet.  In _Quantum Sensing and Nanophotonic Devices_ , volume 5359, pages 445–456. International Society for Optics and Photonics, 2004.
  * Sun [2000] Jonathan Z Sun.  Spin-current interaction with a monodomain magnetic body: A model study.  _Physical Review B_ , 62(1):570, 2000.
  * Butler et al. [2012] William H Butler, Tim Mewes, Claudia KA Mewes, PB Visscher, William H Rippard, Stephen E Russek, and Ranko Heindl.  Switching distributions for perpendicular spin-torque devices within the macrospin approximation.  _IEEE Transactions on Magnetics_ , 48(12):4684–4700, 2012.
  * Lopez-Diaz et al. [2002] L Lopez-Diaz, L Torres, and E Moro.  Transition from ferromagnetism to superparamagnetism on the nanosecond time scale.  _Physical Review B_ , 65(22):224406, 2002.
  * Ament et al. [2017] Sebastian Ament, Nikhil Rangarajan, Arun Parthasarathy, and Shaloo Rakheja.  Solving the stochastic landau-lifshitz-gilbert-slonczewski equation for monodomain nanomagnets : A survey and analysis of numerical techniques, 2017\.
  * Panagopoulos et al. [2013] Georgios D Panagopoulos, Charles Augustine, and Kaushik Roy.  Physics-based spice-compatible compact model for simulating hybrid mtj/cmos circuits.  _IEEE Transactions on Electron Devices_ , 60(9):2808–2814, 2013.
  * Torunbalci et al. [2018] Mustafa Mert Torunbalci, Pramey Upadhyaya, Sunil A Bhave, and Kerem Y Camsari.  Modular compact modeling of mtj devices.  _IEEE Transactions on Electron Devices_ , 65(10):4628–4634, 2018.
  * Li and Zhang [2004] Z Li and Shufeng Zhang.  Thermally assisted magnetization reversal in the presence of a spin-transfer torque.  _Physical Review B_ , 69(13):134416, 2004.
  * Xie et al. [2016] Yunkun Xie, Behtash Behin-Aein, and Avik W Ghosh.  Fokker—planck study of parameter dependence on write error slope in spin-torque switching.  _IEEE Transactions on Electron Devices_ , 64(1):319–324, 2016.
  * Hagiwara et al. [1999] M. Hagiwara, K. Katsumata, H. Yamaguchi, M. Tokunaga, I. Yamada, M. Gross, and P. Goy.  A complete frequency-field chart for the antiferromagnetic resonance in mnf2.  _International Journal of Infrared and Millimeter Waves_ , 20(4):617–622, 4 1999.  ISSN 1572-9559.  doi: 10.1023/A:1022692506405.  URL https://doi.org/10.1023/A:1022692506405.
  * Hassan et al. [2019] Orchi Hassan, Rafatul Faria, Kerem Yunus Camsari, Jonathan Z Sun, and Supriyo Datta.  Low-barrier magnet design for efficient hardware binary stochastic neurons.  _IEEE Magnetics Letters_ , 10:1–5, 2019.
  * Bunaiyan et al. [2023] Saleh Bunaiyan, Supriyo Datta, and Kerem Y. Camsari.  Heisenberg machines with programmable spin-circuits, 2023.
  * Victora and Shen [2005] Randall H Victora and Xiao Shen.  Composite media for perpendicular magnetic recording.  _IEEE Transactions on Magnetics_ , 41(2):537–542, 2005.
  * Keffer and Kittel [1952] F. Keffer and C. Kittel.  Theory of antiferromagnetic resonance.  _Phys. Rev._ , 85:329–337, Jan 1952.  doi: 10.1103/PhysRev.85.329.  URL https://link.aps.org/doi/10.1103/PhysRev.85.329.
  * Rezende et al. [2019] Sergio M. Rezende, Antonio Azevedo, and Roberto L. Rodríguez-Suárez.  Introduction to antiferromagnetic magnons.  _Journal of Applied Physics_ , 126(15):151101, 10 2019.  ISSN 0021-8979.  doi: 10.1063/1.5109132.  URL https://doi.org/10.1063/1.5109132.
  * Niimi et al. [2012] Y Niimi, Y Kawanishi, DH Wei, C Deranlot, HX Yang, Mairbek Chshiev, T Valet, A Fert, and Y Otani.  Giant spin hall effect induced by skew scattering from bismuth impurities inside thin film cubi alloys.  _Physical review letters_ , 109(15):156602, 2012\.
  * Singh et al. [2024] Nihal Sanjay Singh, Keito Kobayashi, Qixuan Cao, Kemal Selcuk, Tianrui Hu, Shaila Niazi, Navid Anjum Aadit, Shun Kanai, Hideo Ohno, Shunsuke Fukami, and Kerem Y. Camsari.  Cmos plus stochastic nanomagnets enabling heterogeneous computers for probabilistic inference and learning.  _Nature Communications_ , 15(1), 2024.  ISSN 2041-1723.
  * Chowdhury et al. [2023] Shuvro Chowdhury, Andrea Grimaldi, Navid Anjum Aadit, Shaila Niazi, Masoud Mohseni, Shun Kanai, Hideo Ohno, Shunsuke Fukami, Luke Theogarajan, Giovanni Finocchio, Supriyo Datta, and Kerem Y. Camsari.  A full-stack view of probabilistic computing with p-bits: Devices, architectures, and algorithms.  _IEEE Journal on Exploratory Solid-State Computational Devices and Circuits_ , 9(1):1–11, 2023.
  * Camsari et al. [2021] Kerem Y Camsari, Mustafa Mert Torunbalci, William A Borders, Hideo Ohno, and Shunsuke Fukami.  Double-free-layer magnetic tunnel junctions for probabilistic bits.  _Physical Review Applied_ , 15(4):044049, 2021\.
  * Sun et al. [2023b] Jonathan Z. Sun, Christopher Safranski, Philip Trouilloud, Christopher D’Emic, Pouya Hashemi, and Guohan Hu.  Easy-plane dominant stochastic magnetic tunnel junction with synthetic antiferromagnetic layers.  _Phys. Rev. B_ , 108:064418, 2023b.
  * Zhao and Cao [2007] Wei Zhao and Yu Cao.  Predictive technology model for nano-cmos design exploration.  _ACM Journal on Emerging Technologies in Computing Systems (JETC)_ , 3(1):1–es, 2007.
  * [63] Rikuto Ota, Keito Kobayashi, Keisuke Hayakawa, Shun Kanai, Kerem Y. Camsari, Hideo Ohno, and Shunsuke Fukami.  Voltage-insensitive stochastic magnetic tunnel junctions with double free layers.  unpublished.
  * Camsari et al. [2017] Kerem Yunus Camsari, Sayeef Salahuddin, and Supriyo Datta.  Implementing p-bits with embedded mtj.  _IEEE Electron Device Letters_ , 38(12):1767–1770, 2017.
  * Clark et al. [2016] Lawrence T. Clark, Vinay Vashishtha, Lucian Shifren, Aditya Gujja, Saurabh Sinha, Brian Cline, Chandarasekaran Ramamurthy, and Greg Yeric.  Asap7: A 7-nm finfet predictive process design kit.  _Microelectronics Journal_ , 53:105–115, 2016.  ISSN 0026-2692.  doi: https://doi.org/10.1016/j.mejo.2016.04.006.  URL https://www.sciencedirect.com/science/article/pii/S002626921630026X.
  * Sakib et al. [2021] Mohammad Nazmus Sakib, Hamed Vakili, Samiran Ganguly, Mircea Stan, and Avik W. Ghosh.  Compact spice model of topological textures on magnetic racetracks for design space exploration.  _2021 International Conference on Simulation of Semiconductor Processes and Devices (SISPAD)_ , 2021.
  * Ganguly et al. [2023] Samiran Ganguly, Kerem Y. Camsari, Avik W. Ghosh, and Nibir K. Dhar.  Circuits and systems modeling of quantum systems in SPICE.  _SPIE DCS: Quantum Information Science, Sensing, and Computation XV_ , 12517:1251708, 2023.