To anyone who has ever said that prize-winning Washington Post columnist and popular spy novelist David Ignatius is too much of an apologist for the CIA, his new book is a dramatic rebuttal. "The Quantum Spy" is a fascinating, beautifully textured thriller in which the CIA comes across as a racist, sexist institution whose biases play right into the hands of hostile foreign powers.

“The Quantum Spy,” by David Ignatius (W.W. Norton)

The MacGuffin here is the competition between the United States and China to develop a quantum computer that will crack codes and perform other spy work millions of times faster than conventional machines. A Seattle firm seems to be close enough to making a key breakthrough that the agency forces it to hide its work from public view even as its owner, super-geek Jason Schmidt, wants all the world to benefit from the technology. A running argument among several characters throughout the novel is over high-tech openness vs. secrecy.

Ignatius’s likable protagonist is Harris Chang, a rising star at the CIA. He grew up in Flagstaff and is a patriot through and through; he served bravely and successfully as an Army officer in Iraq before being recruited to be a spy. Chang reads stories of political intrigue in 19th-century Trollope to understand the ways of present-day Washington, which he finds unnerving. He’s also puzzled and hurt by the notion among some colleagues and at the FBI that there’s something about being Chinese American that makes one susceptible to becoming a traitor for Beijing.

This misguided notion is shared by Li Zian, head of the Chinese Ministry of State Security, who tries to recruit Chang through a mole the MSS has planted in the agency. Chang’s boss, snarky, culturally clueless John Vandel, develops a plan to catch the mole and disrupt the MSS, which is also under siege from the intelligence branch of the Chinese military. It all gets plausibly ultra-complicated, what with the internecine squabbles and double- and triple-crosses on both sides of the Pacific.

The author David Ignatius (Stephen Voss)

Ignatius even makes the scientific information on quantum computers comprehensible to the lay reader. Nor is there too much of it. We take the word of the CIA director that quantum computing “is a paradigm shift. It’s like Galileo and Newton.” And beating the Chinese in the quantum computer race is “like completing the Manhattan Project and catching the Rosenbergs, all at once.”

“The Quantum Spy” honors the conventions of a good spy novel, including vivid depictions of colorful locales, from Singapore to Beijing, Vancouver, Mexico City and Amsterdam. It’s like a Jason Bourne thriller, except brainy and believable. There’s lots of smartly observed D.C. local color, too, from CIA hideaways on Glebe Road to Old Town, where the chief mole suspect lives.

As entertaining as this novel is, it’s also disturbing in its depiction of racial and gender prejudice in a place where these attitudes aren’t simply unjust; they get in the way of the institution’s worthy mission. A security specialist named Kate Sturm talks about how “she loved the agency, but she hated the way women got shunted off into marginal areas, where they were glorified ‘reports officers,’ serving the male ‘case officers.’ ” Another female agent is treated so badly that she gets even in an especially nasty way.

As a spy novelist, there are some things Ignatius isn’t. He doesn’t write the beautiful sentences of John le Carré, and his narrative lacks the perfectly poised architecture of Charles McCarry’s CIA novels. But for inside dope on the day-to-day work and personal lives among America’s espionage personnel, Ignatius is unbeatable. On the acknowledgments page, he says the book is entirely fictional, but that’s the one thing in the book I had trouble believing.

Richard Lipez writes the Don Strachey PI novels under the name Richard Stevenson. The most recent is www.dropdead.

At 7 p.m. on Thursday. David Ignatius will be at Politics & Prose, 5015 Connecticut Ave. NW., Washington, D.C.

The Quantum spy

By David Ignatius

W.W. Norton. 323 pp. $25.95