The film’s director, J.J. Abrams, and its stars have been similarly enthusiastic about the opportunity to film at the classified facility. "We were there just trying to shoot a movie, but all around us, these innovative scientists are working on technologies that will likely help the whole world," said Abrams. "The idea that one day the research at NIF could create clean, limitless energy is so exciting…. These people are doing research that could alter the destiny of the planet the way the wheel or the light bulb did."

Benedict Cumberbatch, who plays a villain and is evidently something of a science nerd, told a reporter that NIF "is trying to create hydrogen fusion by using lasers fired at extraordinary speeds through various lenses. If they can hit this target of hydrogen — which is half the breadth of a human hair in this huge cell — they will create this alternate energy supply which could power San Francisco for a year with one burst."

And John Cho, who plays helmsman Hikaru Sulu, has told reporters somewhat sheepishly how he and co-star Karl Urban (who plays Dr. Leonard McCoy) were pranked by their cast mates and the crew into smearing white "neutron cream" on their noses and cheeks to neutralize the radiation emitted by NIF, and to jump up and down frequently while shaking their hands "to shake the neutrons out." (Cumberbatch tells a similar story.)

But all the glowing praise and tales of Hollywood hijinks are misleading the public about NIF’s true purpose while also masking a very troubling reality, one that lab officials — and their federal overseers at the National Nuclear Security Administration and the Department of Energy (DOE) — would clearly prefer not to discuss: NIF is not designed to produce "clean, limitless energy," it is years behind schedule and billions of dollars over budget, it has thus far failed to ignite the fusion reaction for which it was built, and there is a growing acceptance that it probably will never be able to generate a fusion reaction that produces more energy than was required to initiate it.

NIF is essentially an extremely large, very powerful laser. It was designed to produce a 500-trillion-watt pulse focused on a single, small cylindrical gold-plated target (called a hohlraum), heating it very rapidly and causing it to radiate intense X-rays. Those X-rays, in turn, trigger ignition of a two-millimeter capsule of frozen deuterium-tritium fuel that surrounds a tiny amount of deuterium-tritium gas, producing a self-sustaining fusion reaction more energetic than the pulse that initiated the process. (Each firing of the laser requires 1,000-times more energy than the United States consumes at any given moment.)

All the components are housed in a building large enough to contain three football fields. The NIF’s 287,000-pound, 10-meter-diameter spherical target chamber — into which 192 laser beamlines converge — stands in for the warp core of the USS Enterprise in the film. (Although it looks nothing like the warp cores previously featured in any of the television or film incarnations of Star Trek, it is convincing, perhaps because it is real. And as NIF officials have pointed out, the Enterprise‘s faster-than-light warp engines also run on deuterium fuel.)

NIF is a successor to Livermore’s earlier Nova laser (which also failed to achieve ignition). Conceived in the early 1990s and funded out of DOE’s weapons activities account — not the science or energy account — as the centerpiece of the department’s new Stockpile Stewardship and Management Program, NIF was supposed to simulate the temperatures and densities at the very earliest stages of the ignition of a thermonuclear bomb. This, in turn, would verify and improve complex computer simulations, facilitate a better understanding of how modified or aging weapons materials would behave, and allow the United States to test the reliability of nuclear weapons without actually blowing them up.(Congress halted underground nuclear explosions in September 1992.)

The program began in 1994 with an estimated budget of about $1.1 billion (with another $1 billion for research and development) and a projected completion date in 2002. However, a variety of significant construction and engineering challenges delayed completion and rapidly drove up the costs (facts that the NIF managers withheld from Congress and the secretary of energy for years). A DOE review in 2000 increased the budget estimate to $3.3 billion and pushed back completion to 2006. A 2000 General Accounting Office (GAO) assessment pegged the cost at $3.9 billion and was not optimistic about the anticipated completion date. In a report the following year, the GAO estimated the cost to completion at $4.2 billion, and a completion date of 2008. Construction was formally finished in 2009, and initial experiments began the following year.

While NIF has conducted more than 1,000 laser "shots" and set multiple records for laser power — including a 500-terawatt shot on July 5, 2012 — the latest goal of achieving ignition by October 1, 2012 (set in 2009) came and went. For reasons unknown, the laser’s energy is only generating pressures in the target of 150 billion times the Earth’s atmosphere — about half of what is required for ignition. Moses told the San Francisco Chronicle earlier this month that he cannot predict when — or if — ignition will ever be achieved. "Our goal is of course ignition," he said. "The goal is to get there or understand why you don’t." Moses estimates that total costs have reached $5 billion, although a local grassroots watchdog organization asserts costs are closer to $7.5 billion, because the laboratory has been allowed to charge some of NIF’s costs to other programs. NIF’s current annual costs are at least $400 million. (By comparison, the estimated budget for Star Trek Into Darkness was $190 million.)

It’s worth noting that this is not the first time that Star Trek has repurposed actual nuclear hardware. The 1996 film Star Trek: First Contact shot some scenes at the Titan Missile Museum near Tucson, Arizona, where a fiberglass shell covering a decommissioned Titan II intercontinental ballistic missile stood in for the Phoenix, Earth’s first warp-capable spaceship.

Although NIF’s weapons-related role may be fading, thanks to growing congressional frustration with slipping deadlines, a failure to achieve its primary objective, and the budgetary effects of sequestration, Star Trek has given some NIF personnel a brief bit of glory, albeit in a way that foreshadows a less than rosy future. As Simon Pegg, who plays Chief Engineer Montgomery Scott ("Scotty"), explained to io9.com, "All of those guys with red shirts in the warp core [are] all just guys from NIF who just wanted to be in Star Trek. Bruno [Van Wonterghem], the project leader there, who is the guy who will discover fusion and will go down as the next Edison" is in the background. If Moses, Van Wonterghem, and their colleagues are true Trek aficionados, the irony won’t be lost on them. In Star Trek lore, anonymous crewmembers wearing red shirts are usually the first to die.

On the other hand, the film’s probable box office success makes it likely there will be future installments. Which means NIF, whose slogan is "Bringing star power to Earth," could live on as possibly the world’s most expensive movie set — and its employees could continue to work as extras, trading one kind of star power for another.