In the last 75 years, two nuclear weapons have been detonated as an act of war; the bombings of Hiroshima and Nagasaki in 1945, at the end of WWII. Despite tensions being high between the US and the USSR during the Cold War, and several close calls, there have been no additional nuclear weapons detonated as acts of war.
Currently, estimated nuclear weapon stockpiles are 15,000 warheads worldwide, mostly in the US and Russia, and there are eight or nine states that possess nuclear weapons (China, France, Russia, United Kingdom, United States, India, North Korea, Pakistan, and Israel which remains officially ambiguous). The use of these nuclear weapons could be catastrophic.
Will a nuclear weapon be detonated as an act of war by 2050?
This question will resolve as Yes if there is any nuclear detonation as an act of war between January 1, 2020 and January 1, 2050. Resolution will be by credible media reports. The detonation must be deliberate; accidental, inadvertent, or testing/peaceful detonations will not qualify (see fine print). Attacks using strategic and tactical nuclear weapons are both sufficient to qualify.
[2021-11-23]: Edited to clarify the definition of "deliberate" detonations.
Barrett et al. 2013 defined terms to distinguish between causes of nuclear detonations:
In an accidental or unauthorized launch or detonation, system safeguards or procedures to maintain control over nuclear weapons fail in such a way that a nuclear weapon or missile launches or explodes without direction from leaders.
In an inadvertent detonation, the attacking nation mistakenly concludes that it is under nuclear attack and launches one or more nuclear weapons in what it believes is a counterattack.
In a deliberate detonation, the attacking nation decides to launch one or more nuclear weapons either in response to a genuine nuclear attack or without believing that it is under nuclear attack.