Add circuit evaluation function for testing.