Documentation
¶
Index ¶
- Constants
- Variables
- func StringInSlice(a string, list []string) bool
- type BmQSimulator
- func (sim *BmQSimulator) ApplyTemplate(mode string) (string, error)
- func (sim *BmQSimulator) ApplyTemplateBundle(flavor string, bundle string) error
- func (sim *BmQSimulator) BmMatrixFromOperation(op []*bmline.BasmLine) (*bmmatrix.BmMatrixSquareComplex, error)
- func (sim *BmQSimulator) BmQSimulatorInit()
- func (sim *BmQSimulator) Dump() string
- func (sim *BmQSimulator) EmitBMAPIMaps(hwflavor string) (string, error)
- func (sim *BmQSimulator) MatrixFromOp(line *bmline.BasmLine) (*bmmatrix.BmMatrixSquareComplex, error)
- func (sim *BmQSimulator) P(line *bmline.BasmLine) (*bmmatrix.BmMatrixSquareComplex, error)
- func (sim *BmQSimulator) Phase(line *bmline.BasmLine) (*bmmatrix.BmMatrixSquareComplex, error)
- func (sim *BmQSimulator) QasmToBmMatrices(qasm *bmline.BasmBody) ([]*bmmatrix.BmMatrixSquareComplex, error)
- func (sim *BmQSimulator) QbitsNum() int
- func (sim *BmQSimulator) RX(line *bmline.BasmLine) (*bmmatrix.BmMatrixSquareComplex, error)
- func (sim *BmQSimulator) RY(line *bmline.BasmLine) (*bmmatrix.BmMatrixSquareComplex, error)
- func (sim *BmQSimulator) RZ(line *bmline.BasmLine) (*bmmatrix.BmMatrixSquareComplex, error)
- func (sim *BmQSimulator) RunSoftwareSimulation() error
- func (sim *BmQSimulator) SetDebug()
- func (sim *BmQSimulator) SetVerbose()
- func (sim *BmQSimulator) StateSize() int
- func (sim *BmQSimulator) SwapQbits(m *bmmatrix.BmMatrixSquareComplex, s1, s2 int) *bmmatrix.BmMatrixSquareComplex
- func (sim *BmQSimulator) VerifyConditions(mode string) error
- type IOmap
- type StateArray
Constants ¶
View Source
const ( HLSRealBundle = uint8(0) + iota HLSComplexBundle )
View Source
const (
CPynqApiComplex = `` /* 4035-byte string literal not displayed */
)
View Source
const (
CPynqApiReal = `` /* 1448-byte string literal not displayed */
)
View Source
const (
CppOpenCLComplex = `` /* 8023-byte string literal not displayed */
)
View Source
const (
CppOpenCLReal = `` /* 3886-byte string literal not displayed */
)
View Source
const (
HLSCircuitCCComplex = `` /* 2345-byte string literal not displayed */
)
View Source
const (
HLSCircuitCCReal = `` /* 1531-byte string literal not displayed */
)
View Source
const (
HLSCircuitH = `#include <ap_float.h>
void circuit(unsigned int N, ap_float<32,8> *vectorState);
`
)
View Source
const (
HLSMakefile = `` /* 227-byte string literal not displayed */
)
View Source
const (
HLSPythonPynqComplex = `` /* 691-byte string literal not displayed */
)
View Source
const (
HLSPythonPynqReal = `` /* 685-byte string literal not displayed */
)
View Source
const (
HLSRunHlsTcl = `` /* 362-byte string literal not displayed */
)
View Source
const (
PythonPynqComplex = `` /* 3322-byte string literal not displayed */
)
View Source
const (
PythonPynqReal = `` /* 3299-byte string literal not displayed */
)
View Source
const (
SeqHardcodedAddTreeComplex = `` /* 6660-byte string literal not displayed */
)
View Source
const (
SeqHardcodedComplex = `` /* 4512-byte string literal not displayed */
)
View Source
const (
SeqHardcodedReal = `` /* 3105-byte string literal not displayed */
)
Variables ¶
View Source
var AppFlavors = map[string]string{ "python_pynq_real": PythonPynqReal, "python_pynq_complex": PythonPynqComplex, "c_pynqapi_real": CPynqApiReal, "c_pynqapi_complex": CPynqApiComplex, "cpp_opencl_real": CppOpenCLReal, "cpp_opencl_complex": CppOpenCLComplex, }
View Source
var AppFlavorsTags = map[string][]string{
"python_pynq_real": {"real"},
"python_pynq_complex": {"complex"},
"c_pynqapi_real": {"real"},
"c_pynqapi_complex": {"complex"},
"cpp_opencl_real": {"real"},
"cpp_opencl_complex": {"complex"},
}
View Source
var HLSFlavors = map[string]uint8{ "seq_hardcoded_real": HLSRealBundle, "seq_hardcoded_complex": HLSComplexBundle, }
View Source
var HLSFlavorsTags = map[string][]string{
"seq_hardcoded_real": {"real"},
"seq_hardcoded_complex": {"complex"},
}
View Source
var HardwareFlavors = map[string]string{ "seq_hardcoded_real": SeqHardcodedReal, "seq_hardcoded_complex": SeqHardcodedComplex, "seq_hardcoded_addtree_complex": SeqHardcodedAddTreeComplex, }
View Source
var HardwareFlavorsTags = map[string][]string{
"seq_hardcoded_real": {"real"},
"seq_hardcoded_complex": {"complex"},
"seq_hardcoded_addtree_complex": {"complex"},
}
Functions ¶
func StringInSlice ¶
Types ¶
type BmQSimulator ¶
type BmQSimulator struct {
Mtx []*bmmatrix.BmMatrixSquareComplex
Inputs []StateArray
Outputs []StateArray
// contains filtered or unexported fields
}
func (*BmQSimulator) ApplyTemplate ¶
func (sim *BmQSimulator) ApplyTemplate(mode string) (string, error)
func (*BmQSimulator) ApplyTemplateBundle ¶
func (sim *BmQSimulator) ApplyTemplateBundle(flavor string, bundle string) error
func (*BmQSimulator) BmMatrixFromOperation ¶
func (sim *BmQSimulator) BmMatrixFromOperation(op []*bmline.BasmLine) (*bmmatrix.BmMatrixSquareComplex, error)
func (*BmQSimulator) BmQSimulatorInit ¶
func (sim *BmQSimulator) BmQSimulatorInit()
BmQSimulatorInit initializes the BmQSimulator
func (*BmQSimulator) Dump ¶
func (sim *BmQSimulator) Dump() string
func (*BmQSimulator) EmitBMAPIMaps ¶
func (sim *BmQSimulator) EmitBMAPIMaps(hwflavor string) (string, error)
func (*BmQSimulator) MatrixFromOp ¶
func (sim *BmQSimulator) MatrixFromOp(line *bmline.BasmLine) (*bmmatrix.BmMatrixSquareComplex, error)
func (*BmQSimulator) P ¶
func (sim *BmQSimulator) P(line *bmline.BasmLine) (*bmmatrix.BmMatrixSquareComplex, error)
func (*BmQSimulator) Phase ¶
func (sim *BmQSimulator) Phase(line *bmline.BasmLine) (*bmmatrix.BmMatrixSquareComplex, error)
func (*BmQSimulator) QasmToBmMatrices ¶
func (sim *BmQSimulator) QasmToBmMatrices(qasm *bmline.BasmBody) ([]*bmmatrix.BmMatrixSquareComplex, error)
QasmToBmMatrices converts a QASM file to a list of BmMatrixSquareComplex, the input is a BasmBody with all the metadata and the list of quantum instructions
func (*BmQSimulator) QbitsNum ¶
func (sim *BmQSimulator) QbitsNum() int
func (*BmQSimulator) RX ¶
func (sim *BmQSimulator) RX(line *bmline.BasmLine) (*bmmatrix.BmMatrixSquareComplex, error)
func (*BmQSimulator) RY ¶
func (sim *BmQSimulator) RY(line *bmline.BasmLine) (*bmmatrix.BmMatrixSquareComplex, error)
func (*BmQSimulator) RZ ¶
func (sim *BmQSimulator) RZ(line *bmline.BasmLine) (*bmmatrix.BmMatrixSquareComplex, error)
func (*BmQSimulator) RunSoftwareSimulation ¶
func (sim *BmQSimulator) RunSoftwareSimulation() error
func (*BmQSimulator) SetDebug ¶
func (sim *BmQSimulator) SetDebug()
func (*BmQSimulator) SetVerbose ¶
func (sim *BmQSimulator) SetVerbose()
func (*BmQSimulator) StateSize ¶
func (sim *BmQSimulator) StateSize() int
func (*BmQSimulator) SwapQbits ¶
func (sim *BmQSimulator) SwapQbits(m *bmmatrix.BmMatrixSquareComplex, s1, s2 int) *bmmatrix.BmMatrixSquareComplex
func (*BmQSimulator) VerifyConditions ¶
func (sim *BmQSimulator) VerifyConditions(mode string) error
type StateArray ¶
Source Files
¶
- bmqsim.go
- files_cppopencl_complex.go
- files_cppopencl_real.go
- files_cpynqapi_complex.go
- files_cpynqapi_real.go
- files_hls_circuitcc_complex.go
- files_hls_circuitcc_real.go
- files_hls_circuith.go
- files_hls_makefile.go
- files_hls_pythonpynq_complex.go
- files_hls_pythonpynq_real.go
- files_hls_run_hls_tcl.go
- files_pythonpynq_complex.go
- files_pythonpynq_real.go
- files_seqhardcoded_addtree_complex.go
- files_seqhardcoded_complex.go
- files_seqhardcoded_real.go
- parametric.go
- templates.go
- utils.go
Click to show internal directories.
Click to hide internal directories.
