Transparent shader causes noise

The array of cubes below is a single object (lots of cubes joined together)


I am assigning transparency/ diffuse materials assigned to individual cubes to make them hide/show, but have noticed the transparent cubes cause noise in the render (see bottome left of picture below)


It seems many (1000) samples will reduce this, but its not an ideal solutition. Is there a way of fixing this, or a different way of making the other cubes invisible?

1). Try increasing the number of min-bounces for the transparent depth setting in the render context.
2). If you need the entire object at once invisible to some ray types, then don’t use a transparent shader at all. Instead, uncheck some of the checkboxes in the light visibility panel in the object context (near the bottom), this will tell Cycles to skip light paths for the entire object instead of evaluating it on a material level so it will be faster as a result.