# Qutrit Control for Bucket Brigade RAM Using Transmon Systems
## Appendix C  
Boulder Opal uses a graph structure to represent a computation, with all important parameters and optimizable signals being parts of the graph. To compute the pulse parameters that implemented our target operators, the _run_optimization_ method of Boulder Opal was used on the constructed graph. This method performs a gradient-based optimization fit to find the best parameters that minimize the cost function. In our scenario, the parameters were the amplitude and phase of the pulse, which was represented as a piecewise constant (Pwc) function. Pwc functions are functions that are 'glued' from constant segments, with each segment having different values for the optimizable parameters. An optimization process fits these parameters so that the overall function minimizes the cost function. The cost was the operational fidelity defined in Equation (16). The snippet in Listing 15, taken from the official Boulder Opal documentation, depicts how a graph can be created to describe the problem of computing an infidelity. The target operation is the identity, and this is compared to one signal that performs a _sigma_z_ for a duration of 0.1 s followed by a \(-sigma\_z\) for another 0.1 s. When no noise is considered, the two operations are the same and, thus, the infidelity is equal to zero. ```
``` >>>sigma_z=np.array([[1,0],[0,-1]]) >>>hamiltonian=graph.pwc(...durations=np.array([0.1,0.1]),values=np.array([sigma_z,-sigma_z])...) >>>target=graph.target(np.eye(2)) >>>infidelity=graph.infidelity_pwc(...hamiltonian=hamiltonian,target=target,name=\"infidelity\"...) >>>result=bo.execute_graph(graph=graph,output_node_names=\"infidelity\") >>>result[\"output\"][\"infidelity\"][\"value\"] 0.0
```

Listing 10: Example of an infidelity calculation. Defining the cost to be minimized using Boulder Opal can be easily performed by using code as the one depicted in Listing 11. In this example, \(z\_sqr\) is the matrix of the ideal gate \(\sqrt{Z}\) acting on the subspace of the first qutrit, while the Hamiltonian variable is the parametrized pulse to be optimized. ```
cost=graph.infidelity_pwc(  hamiltonian=hamiltonian,  target=graph.target(operator=z_sqr), )
```

Listing 11: Example of an infidelity calculation. ## References

* (1) [PERSON]; [PERSON] [PERSON]; [PERSON]; [PERSON] [PERSON]; [PERSON] [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; et al. Blueprint for a high-performance fluxonium quantum processor. _PRX Quantum_**2022**, \(3\), 037001. [CrossRef]
* (2) [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON] Charge-insensitive qubit design derived from the Cooper pair box. _Phys. Rev. A--At. Mol. Opt. Phys._**2007**, _76_, 042319. [CrossRef]
* (3) [PERSON] Single-qubit operations in the double-donor structure driven by optical and voltage pulses. _Phys. Rev. B--Condens. Matter Mater. Phys._**2007**, _76_, 035328. [CrossRef]
* (4) [PERSON]; [PERSON] Universal quantum gates. In _Mathematics of Quantum Computation_; Chapman and Hall/CRC: Boca Raton, FL, USA, 2002; pp. 117-134. * (5) [PERSON]; [PERSON]; [PERSON]; [PERSON] Qudits and high-dimensional quantum computing. _Front. Phys._**2020**, \(8\), 589504. [CrossRef]
* (6) [PERSON]; [PERSON] Implementation of a quantum adiabatic algorithm for factorization on two qudits. _J. Exp. Theor. Phys._**2012**, _114_, 923-932. [CrossRef]
* (7) [PERSON]; [PERSON] [PERSON]; [PERSON] Efficient Quantum Circuit Decompositions via Intermediate Qudits. _arXiv_**2020**, arXiv:2002.10592. * (8) [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON] Asymptotic improvements to quantum circuits via qutrits. In Proceedings of the 46 th International Symposium on Computer Architecture, Phoenix, AZ, USA, 22-26 June 2019; pp. 554-566. * (9) [PERSON]; [PERSON] [PERSON] Encoding two-qubit logical states and quantum operations using the energy states of a physical system. _Technologies_**2021**, _10_, 1. [CrossRef]
* (10) [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON] [PERSON] Universal qudit gate synthesis for transmons.