EXHIBIT 23.1 CONSENT OF ERNST & YOUNG LLP, INDEPENDENT AUDITORS We consent to the incorporation by reference in the Registration Statement (Forms S-8 No. 333-43114 and No. 333-89082) pertaining to the 2000 Equity Incentive Plan and the 2000 Employee Stock Purchase Plan of ViroLogic, Inc. and in the Registration Statements (Forms S-3 No. 333-65716, No. 333-70562, No. 333-86892, No. 333-102273, No. 333-102995 and No. 333-103980) and related Prospectuses of ViroLogic, Inc. of our report dated February 6, 2004, except for Notes 7 and 11, as to which the date is March 22, 2004, with respect to the financial statements of ViroLogic, Inc. included in this Annual Report (Form 10-K) for the year ended December 31, 2003. /s/ ERNST & YOUNG LLP Palo Alto, California March 22, 2004