The monarch, 94, and William, 39, who is second-in-line to the throne, visited the Defence Science and Technology Laboratory (Dstl), near Salisbury, and formally opened the new Energetics Analysis Centre on Thursday.
HELLO! understands that all of those who came into close contact with the Queen and the Duke during their visit - 48 people - have been tested for COVID-19. Specific advice has been sought from the medical household and all relevant parties and all necessary precautions taken, working closely with Dstl.
The Queen arrived at the engagement by helicopter while the Duke travelled by car.
William last accompanied his grandmother on an external public engagement in July 2017, when they met members of the community affected by the Grenfell Tower fire.
It also marked the first time we've seen Her Majesty publicly reunited with one of her family members in public after spending lockdown at Windsor Castle with the Duke of Edinburgh.
WATCH: The Queen and Prince William open the Dstl's new Energetics Analysis Centre during joint royal engagement
The monarch and her husband attended their granddaughter Princess Beatrice's wedding to Edoardo Mapelli Mozzi in July before departing for their annual summer break in Balmoral in August. The Cambridges were reportedly among the Queen's family members to visit Her Majesty in Scotland during the school holidays.
The Queen then spent some time privately with Prince Philip on the Sandringham estate before returning to Windsor Castle last week.
Keep clicking for more photos...
During their joint outing, the Queen and Prince William were given a private tour of the Energetics Enclosure, where they viewed displays of weaponry and tactics used in counterintelligence.
In the Energetics Analysis Centre, they viewed a demonstration of a Forensic Explosives Investigation and met staff employed in Counter Terrorism and Security.
The Queen and William watched an explosive-detection scenario as police sniffer dog Max was tasked with finding explosives in a white van.
The Queen asked: "Is he more interested in the ball or the explosives?", and smiled when told: "Always the ball."
The monarch and the Duke also met Dstl staff involved in identifying the nerve agent and subsequent clear up of the Novichok incident of 2018, as well as scientists providing vital support to the UK response of the COVID-19 pandemic, working in analytic research areas and deploying microbiologists to NHS hospitals to increase testing capacities.
The Queen wore a Stewart Parvin old rose cashmere coat and silk dress of autumnal woodland florals with a matching hat by Rachel Trevor Morgan.
Her Majesty also added a further sweet touch to her outfit, wearing herAndrew Grima yellow gold, diamond and carved ruby brooch - which was a romantic gift from husband Prince Philip dating back to 1966.
She also added pearl earrings, a pretty pink lipstick and her trusty Launer London handbag.
The Queen was on good form as she quipped while signing the guest book: "Well it proves we've been here, doesn’t it?"
Her Majesty's public outing was the first to have taken outside a royal residence in seven months. She was last seen at the Commonwealth Day service at Westminster Abbey with the royal family in March.