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("config.yaml")


We can construct ony of the gates defined in this config file.

config.MS(phi=np.pi / 2)

Name:
• Test.MS
Likeness:
• Non-Clifford
Parameters:
• phi = 1.570796
Generators:
• 'XX': 1.571
Matrix:

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("Example", entangler=tq.Gate.cz)

config.cz()

Name:
• Example.cz
Aliases:
• Gate.cz
Likeness:
• CNOT
Generators:
• 'IZ': 90.0
• 'ZI': 90.0
• 'ZZ': -90.0
Matrix:

Total running time of the script: ( 0 minutes 0.113 seconds)

Gallery generated by Sphinx-Gallery