Safe Haskell | None |
---|---|
Language | Haskell2010 |
Executing Quil programs.
- runProgram :: RandomGen g => Int -> [BitData] -> [Instruction] -> Rand g Machine
- runProgramWithStdGen :: StdGen -> Int -> [BitData] -> [Instruction] -> Machine
- runProgramWithStdRandom :: Int -> [BitData] -> [Instruction] -> IO Machine
- executeInstructions :: RandomGen g => [Instruction] -> Machine -> Rand g Machine
- executeInstruction :: RandomGen g => Instruction -> Machine -> Rand g Machine
- compileGate :: Parameters -> [Expression] -> [QBit] -> Arguments -> Operator
- compileExpression :: Parameters -> Expression -> Arguments -> Number
Execution
:: RandomGen g | |
=> Int | The number of qubits. |
-> [BitData] | The classical bits. |
-> [Instruction] | The instructions |
-> Rand g Machine | Action for the resulting state of the machine. |
Run a program, starting from the ground state and using the global random number generator.
:: StdGen | The random number generator. |
-> Int | The number of qubits. |
-> [BitData] | The classical bits. |
-> [Instruction] | The instructions |
-> Machine | The resulting state of the machine. |
Create an action to run a program, starting from the ground state.
runProgramWithStdRandom Source #
:: Int | The number of qubits. |
-> [BitData] | The classical bits. |
-> [Instruction] | The instructions |
-> IO Machine | Action for the resulting state of the machine. |
Run a program, starting from the ground state and using a particular random-number generator.
:: RandomGen g | |
=> [Instruction] | The instructions |
-> Machine | The state of the machine. |
-> Rand g Machine | Action for the resulting state of the machine. |
Execute a series of instructions.
:: RandomGen g | |
=> Instruction | The instruction. |
-> Machine | The state of the machine. |
-> Rand g Machine | Action for the resulting state of the machine. |
Execute an instruction.
Compilation
:: Parameters | The formal parameters. |
-> [Expression] | The expressions for the matrix elements. |
-> [QBit] | Which qubits to operate on. |
-> Arguments | The argument. |
-> Operator | The resulting operator. |
Compile a gate.
:: Parameters | The formal parameters. |
-> Expression | The expression. |
-> Arguments | The argument. |
-> Number | The result. |
Compile an expression.