  Universal fault-tolerant quantum computers will require the use of efficient
protocols to implement encoded operations necessary in the execution of
algorithms. In this work, we show how solvers for satisfiability modulo
theories (SMT solvers) can be used to automate the construction of Clifford
circuits with certain fault-tolerance properties and we apply our techniques to
a fault-tolerant magic-state-preparation protocol. Part of the protocol
requires converting magic states encoded in the color code to magic states
encoded in the surface code. Since the teleportation step involves decoding a
color code merged with a surface code, we develop a decoding algorithm that is
applicable to such codes.
