create_graph_state¶
-
forest.benchmarking.entangled_states.
create_graph_state
(graph: networkx.classes.graph.Graph, use_pragmas=False)¶ Write a program to create a graph state according to the specified graph
A graph state involves Hadamarding all your qubits and then applying a CZ for each edge in the graph. A graph state and the ability to measure it however you want gives you universal quantum computation. Some good references are [MBQC] and [MBCS].
Similar to a Bell state / GHZ state, we can try to prepare a graph state and measure how well we’ve done according to expected parities.
[MBQC] A One-Way Quantum Computer. Raussendorf et al. Phys. Rev. Lett. 86, 5188 (2001). https://doi.org/10.1103/PhysRevLett.86.5188 https://arxiv.org/abs/quant-ph/0010033 [MBCS] Measurement-based quantum computation with cluster states. Raussendorf et al. Phys. Rev. A 68, 022312 (2003). https://dx.doi.org/10.1103/PhysRevA.68.022312 https://arxiv.org/abs/quant-ph/0301052 Parameters: - graph – The graph. Nodes are used as arguments to gates, so they should be qubit-like.
- use_pragmas – Use COMMUTING_BLOCKS pragmas to hint at the compiler
Returns: A program that constructs a graph state.