Note
Click here to download the full example code
Loading a Config¶
Config
objects can be loaded from disk and saved to disk.
import trueq as tq
import numpy as np
# load the config file from disk
config = tq.Config.from_yaml("config.yaml")
We can construct ony of the gates defined in this config file.
config.MS(phi=np.pi / 2)
They can also be constructed inside the python session. The easiest way to construct
standard configurations is with basic()
. In the following
example, our config will contain \(X\) and \(Z\) pauli rotations, along with a
single static two qubit gate:
config = tq.Config.basic(entangler=tq.Gate.cz)
config.cz()
Total running time of the script: ( 0 minutes 0.086 seconds)